Bug #54533

imgResource.noScale doesn't scale image tag

Added by Clément MICHELET over 7 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
Due date:
% Done:

0%

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

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

Related to TYPO3 Core - Bug #62400: Lot of entries in sys_file_processed with name=NULL and identifier emptyRejectedAndreas Wolf2014-10-22

Actions
Related to TYPO3 Core - Bug #61181: FAL: file maxW and maxH are ignoredRejected2014-08-25

Actions
Related to TYPO3 Core - Bug #44105: Image size does not get updatedClosed2012-12-19

Actions
Related to TYPO3 Core - Bug #59216: Image dimensions (width/height) are 0 when not scaledClosed2014-05-30

Actions
#1

Updated by Philipp Gampe over 7 years ago

Looks like a problem of FAL.

#2

Updated by Mathias Schreiber over 6 years ago

  • Target version set to 7.1 (Cleanup)
  • Sprint Focus set to On Location Sprint
#3

Updated by Frans Saris over 6 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.

#4

Updated by Frans Saris over 6 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.

#5

Updated by Anja Leichsenring over 5 years ago

  • Sprint Focus deleted (On Location Sprint)

Also available in: Atom PDF