Bug #57075
closedTYPO3 version 6.2beta images scale wrong when setting height in content element
100%
Description
Below, copied text from my additions to the English list. That describes the issue the best I suppose.
On the same server I have 6.1.x and 6.2 beta6. The first one scales images
properly, the newest one does not. The proportions get lost. Test setup is
okay.
It occurs very clearly on tiffs. Anybody any clue?
===
For instance, a .tiff (or .tif) image with w * h.
Original size:
652 * 791 => ratio = 0.82
When setting height in content element to 125px the resulting image becomes:
196 * 125 => ratio = 1.57
The 196px width should be 103px width in stead.
Setting width to e.g. 125px results in this:
125 * 152 => ratio = 0.82
Portrait tifs are narrowed. There is no tif going okay, even square ones
are flattened. And of course, this customer has all the images as tif.
With the images as .png it goes okay.
So, in conclusion, setting the height on .tiff/.tif makes the wrong ratio.
Only in 6.2 because on the same server (so same ImageMagick) with 6.1.7 I
encounter no problems.
Additional information:
Configuration Presets > Image handling settings mentions this:
ImageMagick version 6 or higher was not found in standard system paths.
Strange, because it works in the Install Tool Test setup. And it works in
6.1.7. (Is this buggy as well?)
All configuration (if it matters):
[GFX][imagefile_ext] = gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pd
[GFX][gdlib_png] = 1 (if 0, same problems)
[GFX][im_noScaleUp] = 0 (or 1, no difference)
Quality and Type settings make no difference.
That's about it I guess. Smells buggy, but I have no idea.
===
Yes, I confirm that the original height/width is in the sys_file_metadata
table are correct.
By the way, I haven't found this on jpg's so far, but they appear to be
correct. Watching it closely with png's I found a minor shift in width, for
instance 101px in stead of what should be 103px. And I see this effect only
when setting height.
Files
Updated by Vincent Mans over 10 years ago
Suggestion: see also these threads, with comments from others.
http://lists.typo3.org/pipermail/typo3-english/2014-March/089466.html
http://lists.typo3.org/pipermail/typo3-english/2014-March/089472.html
Updated by Xavier Perseguers over 10 years ago
- File sample.tif sample.tif added
Adding a sample TIFF image (652x791 as in description) so that we can try to reproduce.
Updated by Xavier Perseguers over 10 years ago
- File sample.png sample.png added
- Status changed from New to Accepted
Original size:
652 * 791 => ratio = 0.82
Used attached sample.tif
When setting height in content element to 125px the resulting image becomes:
196 * 125 => ratio = 1.57
The 196px width should be 103px width in stead.
I get 187x125 which is ratio 1.496
Setting width to e.g. 125px results in this:
125 * 152 => ratio = 0.82
Same for me.
By the way, I haven't found this on jpg's so far, but they appear to be
correct. Watching it closely with png's I found a minor shift in width, for
instance 101px in stead of what should be 103px. And I see this effect only
when setting height.
I get 188x125 with sample.png (instead of 187 with TIFF), so there is indeed a 1px difference (but the ratio is wrong anyway)
Updated by Xavier Perseguers over 10 years ago
- Assignee set to Xavier Perseguers
- PHP Version set to 5.4
After a first quick debugging, it seems that the wrong FILEs are used to compute the resize ratio, which explains that ratio is wrong and we don't have the same values either.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28558
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28558
Updated by Xavier Perseguers over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 19d6e38f75904fd7212b2ff114d2a69ebafe2f16.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed