Bug #54533
closedimgResource.noScale doesn't scale image tag
0%
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
Updated by Mathias Schreiber about 10 years ago
- Target version set to 7.1 (Cleanup)
- Sprint Focus set to On Location Sprint
Updated by Frans Saris about 10 years ago
- Category changed from Image Cropping 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.
Updated by Frans Saris almost 10 years 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.
Updated by Anja Leichsenring about 9 years ago
- Sprint Focus deleted (
On Location Sprint)