David Newman
Forum Replies Created
-
The washed out look in the grayscale image http://goo.gl/Lz9077 have been fixed.
With regards to the http://goo.gl/A9Waal WebP image; the conversion process is using the original image quality of 70 and some parts of the image seem to have better image quality as WebP and some better in the JPEG, but this is obviously subjective. If you would like the WebP image to be of higher quality, then you will need to upload a higher quality JPEG.
Agreed on making the docs clearer and less ambiguous. I have altered the description to be clearer on the quality setting vs image quality.
I think maybe you are misinterpreting the sentence in the docs. It states that the “original unaltered image quality” will be used and not the original unaltered image. If you run an image inspection program, like ImageMagick’s identify utility on Linux, you will see the source and Photon images have exactly the same quality setting. It has been unaltered by Photon, although it has been passed through GraphicsMagick to ensure the image is valid (as mentioned before this isn’t going to change due to abuse prevention measures).
We also use the lossless compression utility
jpegoptimhttp://www.freecode.com/projects/jpegoptim/ to convert the JPEG to progressive and provide the smallest possible losslessly compressed image.These features have been added in order to ensure that site users get the safest, best looking and fastest possible user experience.
The Photon cache needed to be cleared for your images. If you open the images now you will see they have no colour changes.
We have ensured that JPEGs honour the
quality=100request for WEBP output, in line with how PNGs have been doing so. When you retest your images, in browsers that support the format, I am sure you will clearly see the difference.However, with regards to completely turning off processing of source images, it is not possible as we pass all images through our image validation and processing pipelines to ensure the service is not abused in any way.
Right, after even deeper investigation…the issue is related to viewing the images in a browser that supports the WEBP image format, mostly likely suspect is Chrome (ref: https://developer.wordpress.com/2015/06/25/photon-webp-image-support/ ).
If you open the same Photon URLs in Firefox / Safari / IE you should not see the colour or quality issues. The way WEBP treats quality is inherently different to JPEG and how it deals with grayscale is also different. We will take a critical look at these issues you have highlighted and tweak our WEBP implementation accordingly. Thanks for sticking to your guns and uncovering these, it’s very helpful indeed.
Yes, I understood what steps you had taken, which is why I mentioned the compression “on top of” compression issue. As suggested in the previous post, it is best practice to supply Photon with a high quality source image and not one that has already been compressed with a low quality setting by another software package.
For image 1, a quality setting of 30 is far too low for normal use and Photon (GraphicsMagick) is dropping some of the chroma subsampling (colour information) at this quality level. There is currently no plan to replace GraphicsMagick as the main backend image processing library for Photon and unfortunately this is the procedure it follows internally.
Apologies, before I switch context and neglect your second question, here is the answer 🙂
Is it possible to disable the Photon “reprocessing” of the original images?
Currently there is no way to switch off this feature.
TL;DR; Upload at good quality and tweak for visual acceptability using Photon’s
qualityandstripparameters.So, the first thing to clear up is the concept of quality. There is no hard definition of quality in the JPEG standard and it is handled differently by specific implementations in software packages, using different chroma subsampling, block boundaries, etc. What this means is that there is no explicit way of dealing with quality = X between software platforms. Therefore using another application to set the quality to X does not mean when the image is processed by another application it would be exactly the same visually or in file size. In fact you often get compression “on top of” compression, which is obviously undesirable as it can lead to blocky images.
The way Photon is intended to be used, is for you to have the source image uploaded at a high quality setting and then have Photon perform the compression you prefer (or are willing to accept) via the
qualityand optionalstripparameters. This avoids the scenario of having compression performed on an already heavily compressed image.When looking at the images in question. The first image looks quite different from a colour perspective and looking deeper confirms this. The quality of 30 in XnView is using a different chroma subsampling method when compared to GraphicsMagick, which is Photon’s backend image processing platform (2×1,1×1,1×1 vs 2×2,1×1,1×1). This is causing the artifacts in the image. In truth a quality setting of 30 in Photon is more often that not far too low.
The second image is actually being detected at a quality of 60. From a visual perspective both images have their pro’s and con’s. I my opinion the text is better in the Photon image, whereas the colour gradients are handled better in the Photoshop image. I guess it’s subjective, but in all honesty any image that contains text needs to be at a higher quality setting in order for it not to have artifacts at the text edges. The source image should be uploaded at a high quality and then Photon should be used to tweak, via the
qualityand optionalstripparameters, until an acceptable visual quality level is attained.