Jump to content

Recommended Posts

Posted

My website is a photography website. So photo quality is important to us, but naturally there are constraints on what can be achieved. We do ask users to resize their images prior to uploading, but I do not have any restrictions on image size for save or for display set. (We are a very small forum, so if a members forgets to resize  an image we ask them to fix that or we resize it for them.)

I recently tested changes to uploaded JPG files. We are using GD with JPG and WebP Quality = 100. Any uploaded JPG file is altered as compared to the original JPG. The quality of the image is slightly decreased. Why is that? I had thought that setting JPG Quality = 100 would prevent such changes?

Posted

Do you have an example of what you're seeing here? There may be some degradation of the file during any upload process but typically that is minimal.

Posted (edited)

I would think that uploaded files of any type shouldn't change just from uploading? We often upload non-JPG files to share (via downloads) and they never change. Like PDFs or raw photo files like NEFs, TIFFs, ARWs and so forth.

We detected the differences between the original JPG and the website JPG by layering the two files in Photoshop and setting the top layer to Difference. The Diff frame was pushed a bit using Auto-Contrast because the JPG changes can be subtle if the original JPG was saved with high quality. Here is one example showing typical JPG compression changes around edges. I was testing here with a very large ((too large)), high quality file. I'll try to get another more reasonable upload change and post that later.

These JPG changes are not of earth shaking importance, but being a photography website we really would like to know what is happening or how to prevent it.

Could contain: Pattern, Accessories, Ornament, Computer, Electronics, Pc, Fractal

Edited by annedi
Posted
14 minutes ago, annedi said:

I would think that uploaded files of any type shouldn't change just from uploading?

It's a technical limitation of utilizing GD for upload processing. Things like PDFs, etc... that don't go through it would not be impacted by it.

Posted
16 hours ago, annedi said:

Does GD resample the upload? Is there someplace I see what happens in the code?

Yes, the file will be compressed. If you need less compression to happen, you can change this in your Admin CP > Files > Image Settings > JPG and WebP Quality.

Setting that to 100 will provide the least amount of compression, however the image library (which is necessary for things like cropping, orientation, resizing, and so forth) may still alter the image slightly. You may also get better results by using ImageMagick, if you aren't already, however that would require your host to install it if it hasn't been already.

Posted (edited)

If you need less compression to happen, you can change this in your Admin CP > Files > Image Settings > JPG and WebP Quality.

I already did that !! As reported above I have JPG quality = 100.

I'll retry with ImageMagick. Currently it is not working, so it might need reinstallation with appropriate flags.

1) So nobody knows what PHP/Image function changes the quality?

2) Can the "Image library", GD, or ImageMagick be bypassed? (....probably not, but I'm curious anyway)

 

Edited by annedi
added 2nd question
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...