static DoEncode returns disposed Image
Atomosk opened this issue · comments
Also calling Encode multiple times does not dispose previously generated image.
I think the _Encoded_Image
field should be removed from the Barcode
class. Methods like GetSizeOfImage
and SaveImage
are just facade on top of the Image
and have nothing to do with barcode generation itself, so for a better backward compatibility they can be moved to an image extensions methods.
If those changes are ok, I can make a PR.
I welcome all PRs. I'll review them as they come in.
I agree with you that it should be removed. Ive removed it in a branch Im working on when I get a chance that refactors how the library draws and removes this image as there is no need to hold onto this image at all.
Pull request is out with the changes to remove the _Encoded_Image and a massive refactor to remove usage of System.Drawing.Common which is not compatible with Linux and MacOS. #152
This has taken a while to get out with job changes and all thats been going on. But this should be a much more compatible library now.