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

Steffen Ritter info at rs-websystems.de
Mon Aug 24 13:44:24 CEST 2009


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
> 
generally +1 by reading

but one question bothers me... setting the "dpi" tag of an image makes 
sense. but changing the pixel size does not... dpi is the "transform" 
from cm/inches to pixel... so to me this only makes sense if you deal 
with cm sizes... why sould you say i want an image 200x200px if you 
reallay want 2500x2500?
saying get me an image 2500x2500 setting dpi to 300, so that an 
graphicssoftware will have the right measures makes sense to me...

So what's the sense behind that? Or the use case of this behavoiur...

regards

Steffen


More information about the TYPO3-team-core mailing list