Project

General

Profile

Actions

Feature #20497

closed

New options noRescale and resoultionFactor for getImgResource()

Added by Stefan Geith almost 15 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2009-05-24
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

Sometimes a higher resolution as the display-resolution of an Image is needed.
E.g. if you want to render PDFs from your HTML-Output, you coulld need higher resolutions for images, if you want to print them.
This is not possible in the moment.

New options for the imgResource that would be helpful:
noRescale=1 -> creates image, as ususal, but doenst resize original file
resolutionFactor=n -> creates an image, that has n times higher resoultion than displayed

Imagine an uploaded Image of size 1500x1000 pixel.
If you create an IMAGE-Tag by TS with width=320m, then the Image will be rendered to 480x320 pixels and the width/height-params of the created <img>-tag will be also 480x320.
If you want to zoom-in on the website or you want to create a PDF from the page, then the resolution is to low.

With use of noResize=1an IMAGE-Tag will be rendered with width/height-params 480x320, but the src-param will be the original image (having 1500x100 pixels).

With use of resolutionFactor=2 an IMAGE-Tag will be rendered with the Image scaled to 960x640 pixels and the width/height-params of the created <img>-tag set to 480x320.

(issue imported from #M11177)


Files

0011177-noRescale-resolutionFactor.patch (3.35 KB) 0011177-noRescale-resolutionFactor.patch Administrator Admin, 2009-05-24 15:48
0011177-noRescale-resolutionFactor.ts (1.02 KB) 0011177-noRescale-resolutionFactor.ts Administrator Admin, 2009-05-24 15:48
0011177v2-noRescale-resolutionFactor.patch (3.76 KB) 0011177v2-noRescale-resolutionFactor.patch Administrator Admin, 2009-05-25 10:17
0011177v2-noRescale-resolutionFactor.ts (1.39 KB) 0011177v2-noRescale-resolutionFactor.ts Administrator Admin, 2009-05-25 10:17
tsref-for-0011177.txt (1.72 KB) tsref-for-0011177.txt Administrator Admin, 2009-08-28 12:49
11177_noscale.patch (2.15 KB) 11177_noscale.patch Administrator Admin, 2010-05-06 01:35
11177_noscale-v2.patch (2.63 KB) 11177_noscale-v2.patch Administrator Admin, 2010-05-06 08:49
Actions #1

Updated by Stefan Geith almost 15 years ago

See http://geithware.de/rfc11177.html for the TS-Example

Actions #2

Updated by Stefan Geith almost 15 years ago

Franz Koch suggested to use a real resulution-property.

Patch v2 implements this and TS v2 is the demo TS for this new patch.
Result can be seen at http://geithware.de/rfc11177.html

Actions #3

Updated by Stefan Geith over 14 years ago

New with pathch v2:
- Now a resolution-parameter is used. 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 parameter 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 dpi (!)
- 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.

Actions #4

Updated by Stefan Geith over 14 years ago

Documentation for TSref added

Actions #5

Updated by Stefan Geith almost 14 years ago

11177_noscale.patch misses to transfer 'noScale' to the options array.
11177_noscale_v2.patch ist working.

Actions #6

Updated by Benni Mack over 13 years ago

- Committed the noScale patch (v3) to trunk (rev. 9371)
- Added your documentation to the pending documentation wiki page
- Created a new patch and a new bug report for the "resolutionFactor"
feature. (http://bugs.typo3.org/view.php?id=16375) - please send it to
the core list.

Actions #7

Updated by Susanne Moog about 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF