Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Image is changed and made larger when no processing is requested. #208
Good morning. I was just testing the case where we want ImageProcessor.Web to output and cache the image but not change it in any way and found the cached image file ended up bigger (in terms of file size) than the source.
I'm attaching both images below.
The source is 526K and the cached version is 572. I don't know how to see what is different in them. Their resolution is the same. The only thing I can think of is that I've seen this kind of thing when using PNG Crush (sometimes images get bigger when crushed). Is it a difference in the compression algorithm used?
Is there a way to tell ImageProcessor.web to do nothing to the image except cache it?
+1 for me too
@dsargent3220 What you're seeing is down to the built in .NET encoder - It's not great so I'm trying to work on a way to improve the output. The current development code will bypass the .NET encoder if no processing is needed but uses post processing to ensure that the output is as optimized as possible. Could you build from source (sorry, no nightlies yet) and test against that?
@kenyus Something doesn't seem right about your description. For an image to shrink 800kb simply by resaving it seems infeasible to me. Do you have postprocessing installed? Are you changing format? Is it actually a png or a bitmap with the incorrect extension.
Could you post the original image online?
Images with no processing requirements no longer go through the ImageFactory pipeline. They will still however be cached and optionally postprocessed. JimBobSquarePants#208 Former-commit-id: 6e807cf Former-commit-id: 8c808d59ab8ee5ea4b7c85549e9286edf9376aef Former-commit-id: 0bc164c Former-commit-id: fe33138e9c398b889d97bb1d358b54c323ab1308