Closed Atomosk closed 1 year ago
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. https://github.com/barnhill/barcodelib/pull/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.
Also calling Encode multiple times does not dispose previously generated image.
I think the
_Encoded_Image
field should be removed from theBarcode
class. Methods likeGetSizeOfImage
andSaveImage
are just facade on top of theImage
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.