Bug #54533
imgResource.noScale doesn't scale image tag
Status: | Rejected | Start date: | ||
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | File Abstraction Layer (FAL) | Spent time: | - | |
Target version: | 7.1 (Cleanup) | |||
TYPO3 Version: | 6.1 | Is Regression: | No | |
PHP Version: | 5.4 | Sprint Focus: | On Location Sprint | |
Complexity: |
Description
Using TYPOSCRIPT, I want to display an image. I use following code. There is no image processing because I can't install ImageMagick on my local environment (restriction).
lib.getLogo = IMAGE
lib.getLogo{
file = PATH_TO_MY_IMAGE
file{
width = 120m
height = 120m
maxW = 120
maxHeight = 120
noScale = 1
}
altText.data = ALT_TEXT
}
My image is displayed with his original size and not calculated size as it is defined in documentation :
If set, the image itself will never be scaled. Only width and height are calculated according to the other properties, so that the image is displayed resizedly, but the original file is used
In sys_file record, original size is correct.
In sys_file_processed, :
configuration =>
Array ( [width] => 120m [height] => 120m [fileExtension] => [maxWidth] => 120 [maxHeight] => 120 [minWidth] => 0 [minHeight] => 0 [noScale] => 1 [additionalParameters] => )
task_type =>
Image.CropScaleMask
width => 0
height => 0
Seems to be broken on width / height calculation.
Environment :- Windows 7
- XAMPP + PHP 5.4.19
- TYPO3 6.1.7
Related issues
History
#1 Updated by Philipp Gampe over 1 year ago
Looks like a problem of FAL.
#2 Updated by Mathias Schreiber 7 months ago
- Target version set to 7.1 (Cleanup)
- Sprint Focus set to On Location Sprint
#3 Updated by Frans Saris 7 months ago
- Category changed from Image Generation to File Abstraction Layer (FAL)
The image processing is needed to get the new file dimensions. TYPO3 uses the functionality of the file processing to get the new dimensions, the noscale parameter only overrules the real scaling of the image.
public function imageMagickConvert($imagefile, $newExt = '', $w = '', $h = '', $params = '', $frame = '', $options = array(), $mustCreate = FALSE) { if ($this->NO_IMAGE_MAGICK) { // Returning file info right away return $this->getImageDimensions($imagefile); }
To get this working it would mean a complete refactoring/reordering of the imageMagickConvert logic.
#4 Updated by Frans Saris 6 months ago
- Status changed from New to Rejected
You could use for instance layout.default.element to remove width and height from the tag and size the images with css.