[TYPO3-dev] Conceptual bug in t3lib_stdgraphic.php - cropscale reduces color depth to 8bit

JoH asenau info at cybercraft.de
Thu Nov 2 21:14:34 CET 2006


Today I used the so called "cropscale" feature for the first time and ran
into an ugly problem.

It took two people about 3 hours to find out that it was _not_ our
install-tool-setup that caused the images to look as ugly as can be but this
new function.
As soon as you are using the suffix c for the width and/or height of your
IMAGE or IMG_RESOURCE elements, the cropscale function is triggered and the
size of the image is changed as expected but the color depth is reduced to
8bit regardless of your install-tool-settings in the GFX section.

It took me quite some time to find out _why_ and _how_ this is done but then
I found the responsible part in t3lib_stdgraphic (and now I know it is
called "cropscale"). I don't know who is responsible for this feature but
the whole thing is just ridiculous.

The image file is scaled using ImageMagick and then cropped using GIFBUILDER
with a default setup, which (as we all know) is using GIF as the output
format, thus forcing the color depth to be 8bit. Nothing against a new
feature like "cropscaling", but it simply doesn't make sense if it kills the
quality of your images after all the efforts that have been put into the
"truecolorization" of the TYPO3 image editing functions.

As far as I was able to find out by googling around, there is a -crop
command for ImageMagick, so I don't see any reason for the use of GIFBUILDER
in this scenario. Maybe there is someone who can enlighten me, why the
ImageMagick command is not used at all.

Unless there is a good reason for not using this command, I will try to
create a patch to fix this behaviour as soon as possible and put it into the
bugtracker.

Are there any ImageMagick specialists around, that could provide me with the
best IM command for this job?

TIA

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com






More information about the TYPO3-dev mailing list