[TYPO3-dev] JPEG quality

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Aug 31 20:41:18 CEST 2010


> Hey ho!

Hey ho, let's go! ;)

>>> I tend to have a default of 55 and raise it up to
>>> 75 if needed.
>>
>> my default in TYPO3 is 70. Everything lower then that just looks awful
>> with 50% of the images.
>> When exporting images from Photoshop etc I'm using 55 as default, which
>> is about the same quality level as 70/75 with imagemagick.
>
> Ah, thanks for that hint. I didn't yet realize that Photoshop 55%
> will match to about 70/75% when using ImageMagick.

it's not a scientific research though - just my visual impression on 
what I remembered from some tests once.

>> The only thing you could do is to advise the customer to use PNG instead
>> of JPG for images that are no photos but stuff like diagrams.
>
> The problem with our TYPO3 installations using PNG is, that
> these images get _drastically_ huge after ImageMagick resizes them.
> (There must be some sort of issue with TYPO3 and the version
> of IM we use or anything else which would cause this.)

Yea, imagemagick is in general not the best conversion tool in terms of 
filesize. If I pic a image, scale it via TYPO3 and Photoshop, export 
them with the same quality settings and compare them, then the Photoshop 
file looks better and has smaller filesize.
In your case, you could check if the LZW compression is working - it 
might not work for GIF but should for PNGs though. But I'm not a expert 
on server side settings for this.


To complete the lecture about images and sizes :), the size of PNGs 
depends of course on the complexity of the image and it's original 
format. If the image was a JPG and should be rendered as PNG, then it's 
getting blown up in filesize by no means, due to the "noise" JPG is 
creating. But PNG/GIF resized and rendered as PNG again should have a 
moderate filesize though. Blurred edges and gradients also increase the 
filesize of PNGs of course - so sharpening and/or limiting the max 
colors will lead to smaller file sizes in those cases. PNG is only 
useful for "flat" graphics like diagrams, most Logos and images showing 
text and large areas of the same color. Anything with gradients or real 
photos is best saved as JPG.

Most times if a customer complains (at least in my case) they saved a 
diagram/graphic as JPG and wondered about the bad quality on red areas 
then. After publishing the image as PNG quality was quite fine and 
file-size (depending on the complexity) smaller or not much larger.

-- 
kind regards,
Franz Koch




More information about the TYPO3-dev mailing list