Project

General

Profile

Actions

Bug #57075

closed

TYPO3 version 6.2beta images scale wrong when setting height in content element

Added by Vincent Mans about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Category:
Image Cropping
Target version:
Start date:
2014-03-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

sample.tif (13.8 KB) sample.tif Xavier Perseguers, 2014-03-20 12:04
sample.png (271 Bytes) sample.png Xavier Perseguers, 2014-03-20 12:13
Actions #2

Updated by Xavier Perseguers about 10 years ago

Adding a sample TIFF image (652x791 as in description) so that we can try to reproduce.

Actions #3

Updated by Xavier Perseguers about 10 years ago

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)

Actions #4

Updated by Xavier Perseguers about 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.

Actions #5

Updated by Gerrit Code Review about 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

Actions #6

Updated by Gerrit Code Review about 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

Actions #7

Updated by Xavier Perseguers about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF