Project

General

Profile

Actions

Bug #22269

closed

Cropping small images fails if noScaleUp is enabled

Added by Thomas Deinhamer over 14 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-03-11
Due date:
% Done:

0%

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

Description

If the install tool option noScaleUp is enabled, so images won't be scaled up, cropping images won't work, if the desired dimensions are larger than the processed image.

The result is some missing path information in the imageInfo array returned by $cObject->getImgResource().

Imho if the image dimensions are smaller than the desired dimensions, still valid pathes to the temporary file should be returned.

Example:

There's an image with the dimensions W 200px and H 200px.
If I crop-scale the image to dimensions like W 200c and H 300c the image tag still gets rendered, but the source attribute holds just the absRefPrefix, missing the path to the temporary image.

Note:

This happens with Extbase/Fluid using the image view helper.
If noScaleUp is set to 0 (disabled) the image will get displayed again, but it will also be scaled up.
(issue imported from #M13800)

Actions #1

Updated by Christian Zenker almost 12 years ago

  • Target version deleted (0)

I stumbled upon this issue, too. But I'm not sure if this is really a bug.

In your opinion, what was the desired output?
You can't just return a smaller image as a crop is supposed to return an image with exactly the given size.
You can't scale the image before cropping, because it is configured to not do it.
Another option would be to add a padding to the image. But that's also no solution - you would need to have a configurable background color and the position of the canvas.

So IMHO every behavior would be unexpected. The only viable option would be to add a noScaleUp option per image...

Actions #2

Updated by Mathias Schreiber almost 10 years ago

  • Description updated (diff)
  • Category deleted (Communication)
  • Status changed from New to Closed
  • Is Regression set to No
Actions

Also available in: Atom PDF