[TYPO3-dev] passing params to image magick to clean jpgs from metadata

Steffen Kamper steffen at sk-typo3.de
Wed Aug 22 01:58:19 CEST 2007


Hi Tim,

"Tim Kleigrewe" <x27 at e27.com> schrieb im Newsbeitrag 
news:mailman.1.1187709907.31216.typo3-dev at lists.netfielders.de...
> hi steffen,
>
> but i want it in a global scope done with every displayed image and a
> simple useage. i could perhaps overwrite every use of IMAGE in
> typoscript, but thats a lot of work isn't it?
>
> we save up to 40k on each cleaned image, and that could be included
> elsewhere in every extension etc.
>
> btw, the jpg-quality var wasn't implemeted in typoscript too.
>
> im thinking about an xclass extension to stdGraphics that could solve
> the 'force process all images' with IM problem and recalculates images
> that allready have the right dimensions too.
>
> or am i still missing something?
>
> regards tim
>
>
>
>
> Steffen Kamper schrieb:
>> Hi,
>>
>> there is no need for hardcoded Params, they can be declared in 
>> Typoscript,
>> e.g.
>>
>> image.file.params = -sharpen 50  +profile "*" -quality 100
>>
>> vg  Steffen
>>
>> "Tim Kleigrewe" <x27 at e27.com> schrieb im Newsbeitrag
>> news:mailman.1.1187280849.11716.typo3-dev at lists.netfielders.de...
>>> hi list,
>>>
>>> an old topic but still not really solved - meta data/profiles in jpg
>>> images. a stupid browser named Win IE 5.5 even crashed by viewing images
>>> that contained mac xml/photoshop metadata. IM keeps this profile info by
>>> default.
>>>
>>> here an example of a user submitted image, not 'saved for web'. have a
>>> look at the binary to see lots of xml:
>>>
>>> http://demo.e27.com/VotingGalleryImage_430.jpg   (170k)
>>>
>>> and a clean variant with '-strip' or ' +profile "*"' recalculated
>>> parameter used by IM5:
>>>
>>> http://demo.e27.com/VotingGalleryImage_430_repaired.jpg (37k)
>>>
>>> that works fantastic, but i had to hardcode that parameter to the t3lib
>>> stdGraphic class 3 times.
>>>
>>> line 268: $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace RGB
>>> -sharpen 50  +profile "*" -quality '.$this->jpegQuality;
>>>
>>> the best practice would be in my opinion to have a localconf var that
>>> could be set with 'additional params' for IM. There are other possible
>>> usfull parameters that could be passed to IM from there e.g.
>>> '-copyright' if someone needs it.
>>>
>>> one problem left, an option to tell IM to recalculate images that are
>>> allready in the right size, or does this feature exist?
>>>
>>>
>>>
>>> regards tim
>>>
>>

for content there is still one image-object that is used more times, so that 
is an easy task.

for extensions you have to do it for each one, but this is because of a 
missing general approach.

If each extension would use tt_content.image for there images, it would be 
very easy for users to set general things at one place to all images like 
maxW, maxH etc.
Maybe this could be forced by some devs or be implemented in guidelines, the 
user would be happy with that.

vg  Steffen 






More information about the TYPO3-dev mailing list