pngImage.Mutate desaturates an image #2792
Answered
by
JimBobSquarePants
alejandroLoz
asked this question in
Q&A
|
So I have this code to overlay an SVG on top of a PNG: Things work fine if back.png is a colored image. But when it's a B&W image output.png gets desaturated. (I'm using .net 5) This is overlay.svg: |
Answered by
JimBobSquarePants
Aug 15, 2024
Replies: 1 comment 1 reply
|
ImageSharp preserves the input image encoded format so if your PNG is grayscal on input, it's going to be grayscale on saving unless you specifically set the PNG metadata or use an explicit encoder. BTW. ImageSHarp.Drawing can parse an SVG into a path for drawing. |
1 reply
Answer selected by
alejandroLoz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


ImageSharp preserves the input image encoded format so if your PNG is grayscal on input, it's going to be grayscale on saving unless you specifically set the PNG metadata or use an explicit encoder.
BTW. ImageSHarp.Drawing can parse an SVG into a path for drawing.