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

Xavier Perseguers typo3 at perseguers.ch
Mon May 25 09:21:56 CEST 2009


Hi,

Franz Koch wrote:
> Hi,
>> Solution:
>> New options for the imgResource that would be helpful:
>> noRescale=1 -> creates image, as ususal, but doesn't resize original file
>> resolutionFactor=N -> creates an image, that has N times higher 
>> resoultion than displayed
> 
> 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).
> 
> I'm also not sure if it would make sense to implement another option 
> like displayWidth and displayHeight, that would override the img-tag 
> properties. This would allow same functionality like your "noRescale" 
> option, but also allow resized images to be displayed in different 
> dimensions. But I haven't thought about that very well.

Me too, I'd very much prefer a dpi setting. There's already a factor 
that we need to set to 96 dpi for ImageMagick/GraphicsMagick in Install 
Tool. But this concept is only used for mapping text size on a screen. 
It has to other meaning as explained below as when we choose a 12pt 
font, it means 12x 1/72 inch and we need a way to map this on a screen. 
This is why Windows invented the concept of 72 dpi, to draw it as a 12 
pixel height character/glyph and Mac OS X uses 96 dpi to draw it as a 16 
pixel height character/glyph.

72dpi or whatever does not make any sense for screen. This information 
is only used when *printing* the document because you tell the driver 
how much far away each pixel of the image should be put from its 
neighbor. On a screen, you cannot say that, this is fixed and when you 
choose a resolution of 1280x1024, you do not configure the physical size 
of your display, only the number of pixels you want to show.

I found a good explanation of this [1]. Please have a look if it's not 
clear.

Now, I would say that in your case, we should use the very same setting 
set in Install Tool to render images.

[1] http://www.scantips.com/no72dpi.html

-- 
Xavier Perseguers
DBAL-Member

http://xavier.perseguers.ch/en/tutorials/typo3.html


More information about the TYPO3-team-core mailing list