Add PngWriteDefines
The PNG encoder has various options that are used when creating the output image. The following options should be added to the new PgnWriteDefines class:
- png:bit-depth (1,2,4,8,16 (maybe enum?))
- png:color-type (should use ColorType enum for the input)
- png:preserve-colormap
- png:preserve-iCCP
- png:exclude-chunks and png:exclude-chunks (flags enum (also add
allandnone))
Found this because I'm trying to save a black & white image as PNG with a bit depth of 8. Write method is defaulting to using bit depth of 1. Is there a workaround to use for now?
@PikminGuts92 I am not sure but I think you can do this: image.Settings.SetDefine(MagickFormat.Png, "bit-depth", "8").
@dlemstra Thank you. That seems to have done the trick.
The following options should also be included:
- png:compression-level
- png:compression-strategy (enum?)
- png:compression-filter