[TYPO3-core] RFC #11177: Feature: New options noRescale and resolutionFactor for getImgResource()

Stefan Geith typo3dev2008.nospam1 at geithware.de
Tue Aug 4 09:25:07 CEST 2009


REMINDER

Stefan Geith schrieb:
> Patch v2:
> 
> - Now a resolution-parameter is used.
>   As IM/GM uses 72dpi by default, the resize-width is caluclated
>   by  width = width * resolution / 72
> - resolutions below 36dpi will be treated as if no resolution-
>   parameter is set
> - If no resolution paramter is given, functionality does not
>   change: IM/GM renders the requested image-size.
>   Note: the resolution that is stored within the jpg-file, will
>   always be the same, as in the original file.
> - If resolution=72 is set, the image is rendered as before, but
>   the resolution that is stored within the jpg-file is set to 72
> - for other resolutions, the image is rendered proportionally bigger
>   and the resolution that is stored within the jpg-file is set
>   to the requested resolution
> - if the resolution-parameter would require the image to be
>   upscaled, then the original image will be returned, because
>   upscaling doesnt make sense.
> 
> 
> 
> Franz Koch schrieb:
>> sorry, I like the general idea, but I don't like the way it's done. 
>> The "resolutionFactor" is somewhat odd to me. For me it would make 
>> much more sense to actually define the dpi (Dots Per Inch), so that 
>> based on the given width and height and the dpi you can calculate the 
>> total dimensions (default for screen are 72dpi). Would make much more 
>> sense to me and could actually be used for print images. By setting 
>> this option the internal dpi value of the image should also get 
>> changed (shouldn't be a problem with imageMagick I guess).
> 
> OK - see patch.
> 
> /Stefan
> 



More information about the TYPO3-team-core mailing list