Open Monsok opened 8 years ago
Since you are already using the jpegRenderer.Quality parameter I don't think there is much you can do to improve the quality. Just make sure you are not leaving that to the default value which I think is at 80% at any stage during the processing, for example if you are making intermediate renderings.
Just as a test, you could try either saving a BitmapImage (to double check if it's the jpeg compression that is to blame) or try rendering on the CPU only to make sure there is no quality loss when copying the textures to the CPU for example. (JpegRenderer.RenderOptions = RenderOptions.CPUOnly)
Thanks. I've figured out what causing the issue. It's has to do with the foreground resizing to match the background image.
I am developing an app that put text into a background image. The textblocks are placed on a canvas control as children and I render the canvas to PNG. Then I use the BlendEffect to blend it with a background image.
Here's my code
Here's the image as seen on my PC screen before it's saved to JPEG
Then when the image is saved to JPG, there's a noticeable reduction in the quality as seen below. Enlarge the image and pay attention to the edges of the font.
So what are my options if I want to get as close as to the original image quality?