[TYPO3-core] RFC #13406: thumbs.php: Thumbnails for images with transparent background look ugly

Andreas Wolf typo3ml at andreaswolf.info
Thu Feb 4 09:22:43 CET 2010


Hello Bernhard,

Bernhard Kraft schrieb:
> Andreas Wolf schrieb:
> 
>> When viewing a thumbnail generated by thumbs.php for a file in the
>> backend, the background of transparent images gets filled and looks
>> really ugly. This seems to be related to a downsampling of the image's
>> colordepth. This downscaling is done in t3lib/thumbs.php, presumably to
>> save disk space and bandwidth.
> 
> I can not confirm this bug. In which case does it occur? Do you use
> ImageMagick or GraphicsMagick?

I saw it with GraphicsMagick, ImageMagick didn't work for thumbnail
generation at all (but that was only a short test right now, I did most
testing and bugfix development with GM).

> I attached a file to the bugtracker where this issue does not occur in my eyes:
> 
> http://bugs.typo3.org/file_download.php?file_id=10078&type=bug

Attached is an image where the bug occured for me. With this image, the
background was not ugly colorized, but instead the image looked strange
(because of downsampling to 16 colors). Obviously I also had some
GIF/PNG issue I didn't notice when doing the original bugfix - which
explains the colorized background with a full 32-bit PNG, because then
the 8-bit alpha channel is also mapped to the new 56-colors palette.

Anyways, I still think that downsampling even full-depth pictures to 56
colors is not the 2010 way of doing thumbnails ;) So we should drop this
limit altogether.
I'm not sure, but what about EXIF data in thumbnailed images? I saw that
they are sometimes preserved, as EXIF thumbnails are - so if they are,
we should strip them. This would save much more bandwidth and disk space
than downscaling small images.


Regards

Andreas


More information about the TYPO3-team-core mailing list