Project

General

Profile

Actions

Bug #17581

closed

Crop-Scaling the same image with different dimensions might produce wrong files

Added by Ernesto Baschny over 16 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2007-09-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If the same image needs to be generated more than once with different crop-scale configurations, it might occur that the same hash will be generated for both versions, so that the second crop-scaling will render the same image which was produced with the first crop-scaling.

Test with an 800x600 image:

page = PAGE
page {
10 = IMAGE
10 {
file = fileadmin/Blaue_Berge.jpg
file.width = 80c
file.height = 80c
wrap = <div>Image 80x80:<br/>|</div>
}
20 < .10
20.file.width = 100c
20.file.height = 80c
20.wrap = <div>Image 120x80:<br/>|</div>
}

Expected is two different files (and hashes), but we get the same hash twice (thus the same 80x80 file).
(issue imported from #M6261)


Files

6261.diff (925 Bytes) 6261.diff Administrator Admin, 2008-08-15 02:47
Actions #2

Updated by Christian Kuhn over 15 years ago

I am unable to reproduce this with an 800X600 image. Your given TS leads to two different files (and hashes) in current 4.3 trunk (revision 3978).

Attached your patch from the core list, if the issue is still valid but just doesn't occur in my current setup.

Actions #3

Updated by Stig Nørgaard Færch about 15 years ago

I can confirm this bug on TYPO3 4.0.12.
If have something like this:
file.width = 900c
file.height = 100c-100
and change it to
file.width = 900c
file.height = 50c-100
It will still output an image with 100pixels in height.

If I then change it into:
file.width = 900c
file.height = 50c-99
I will get an image with 50pixels in height.

If I go back to:
file.width = 900c
file.height = 50c-100
I will get 100 pixels again...

/Stig

Actions #4

Updated by Christian Kuhn about 15 years ago

I am still unable to reproduce this in trunk (r5064). Full TS used in test:

page.10 >
page.10 = IMAGE
page.10 {
file = fileadmin/img/testpic.png
file.width = 900c # Changing from 100c-100 to 50c-100 leads to different hashes for me!
file.height = 100c-100
wrap = <div>|</div>
}

This is my GFX section in localconf.php:
$TYPO3_CONF_VARS["GFX"]["TTFdpi"] = '96';
$TYPO3_CONF_VARS['GFX']['im_path'] = '/usr/bin/';
$TYPO3_CONF_VARS['GFX']['im_version_5'] = 'gm';
$TYPO3_CONF_VARS['GFX']['noIconProc'] = '0';

The code sections changed with 6261.diff are actually called, I still get different hashes without applied patch (something like typo3temp/pics/a123456789b.png).

Please check if this bug is still reproducible for you in trunk or latest 4.2

Actions #5

Updated by Jigal van Hemert almost 14 years ago

Tested in 4.2.12 and 4.4-trunk without the patch.
Could not reproduce in both installations.

Actions #6

Updated by Chris topher almost 14 years ago

Like Jigal and Steffen on Core List I cannot reproduce this.
Fixed in current versions. TYPO3 4.0 no longer is supported and so won't be fixed (if that should still be buggy there).

Actions #7

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF