You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mutation to transparent background doesn't work sometimes #931
Your output images are 24bit. This can only happen when the PngEncoder instance has its ColorType property set to PngColorType.Rgb or when it is null and the PngMetadata within the image has the property set to PngColorType.Rgb.
You'll need to explicitly set the PngColorType to RgbWithAlpha in the encoder when encoding to the png to preserve transparency.
changed the title [-]Mutation to transparent background don't work sometimes[/-][+]Mutation to transparent background doesn't work sometimes[/+]on Jun 18, 2019
Activity
JimBobSquarePants commentedon Jun 13, 2019
Hi @xakep139
Your output images are 24bit. This can only happen when the
PngEncoderinstance has itsColorTypeproperty set toPngColorType.Rgbor when it is null and thePngMetadatawithin the image has the property set toPngColorType.Rgb.You'll need to explicitly set the
PngColorTypetoRgbWithAlphain the encoder when encoding to the png to preserve transparency.xakep139 commentedon Jun 13, 2019
@JimBobSquarePants, thanks for the quick response! Changing
ColorTypefor the encoder worked like a charm!Should this be reflected in samples?
JimBobSquarePants commentedon Jun 13, 2019
Most definitely. We need to give those samples some love.
antonfirsov commentedon Jun 13, 2019
A reminder that I should take care of this when l'll touch the samples because of #907.
xakep139 commentedon Jun 13, 2019
I suppose this issue should be closed ) Thanks for the help!
[-]Mutation to transparent background don't work sometimes[/-][+]Mutation to transparent background doesn't work sometimes[/+]