Replies: 1 comment
-
Howdy. There are two common mistakes when using Streams. I'd check these first:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. Thank you for this amazing library. I have one interesting problem. While we were testing your library, I had to be sure that the quality and the size of the image will be something desirable, therefor we saved each processed image as .jpg file in order to inspect it. For something like this I just used basic example by calling ProcessImage method like this:
`var settings = new ProcessImageSettings()
{
Width = 1920,
Height = 1080,
ResizeMode = CropScaleMode.Max,
SaveFormat = FileFormat.Jpeg,
JpegQuality = 70,
Image that was ~ 8MB (3264x1836) before processing, is ~ 200KB (1920x1080) after calling MagicImageProcessor which is really great!
Now we had to store these images into the database, which was the whole point of compressing images workflow, to save on load time and space. I have used code that I found here in the following issue: link here - keep in mind that I pass identical ProcessImageSettings object, same values no difference.
After using code you suggested, now I get different result. When saving output stream as image in order to test that everything works great again, same image is now ~ 2.8MB which is a lot to store per image, since in our project we load around 600 images every time the app starts. What could be the cause of such huge difference in image processing? To apply quick fix I will just save the image to the output, and then convert the image back to byte[], but there has to be a better option than that. Any thoughts on this? Thanks
Beta Was this translation helpful? Give feedback.
All reactions