Project

General

Profile

Actions

Bug #79511

closed

GIFBUILDER will not crop images

Added by Maximilian Ziermaier about 7 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
-
Start date:
2017-01-26
Due date:
% Done:

0%

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

Description

If i crop a watermark image with GIFBUILDER, it will work with a crop-X-value of 0.
If i crop with a X-value of 30 it will throw a error (see screenshot)

There is a incomplete filename in the call imageCreateFromFile("/home/www/p384125/html/typo3/fileadmin/_processed_/5/d/csm_3D_a059d90")
This immage ist correctly saved in .._processed_/5/d/ with filename csm_3D_a059d90350.gif

my code for the watermark:

    file = GIFBUILDER
    file {
        XY = [10.w],[10.h]
        format = jpg
        quality = 90
        maxW = 1920
        maxH = 1080

        10 = IMAGE
        10 {
            file {
                import.field = uid
                treatIdAsReference = 1
                width.field = imageWidth
                maxW.field = maxImageWidth
                maxW.noTrimWrap = ||c|
                #crop = 0,0,1498,829
                crop = 30,0,1498,829
            }
        }

        15 = IMAGE
        15.file = fileadmin/copyright.png
        15.mask = fileadmin/copyright-mask2.png
    }


Files

csm_3D_a059d90350.gif (430 KB) csm_3D_a059d90350.gif Maximilian Ziermaier, 2017-01-26 23:24
hc_301.png (161 KB) hc_301.png Maximilian Ziermaier, 2017-01-26 23:24
Actions #1

Updated by Maximilian Ziermaier about 7 years ago

  • Category set to Image Cropping
Actions #2

Updated by Riccardo De Contardi over 6 years ago

  • Category changed from Image Cropping to Image Generation / GIFBUILDER
Actions #3

Updated by Simon Schaufelberger about 2 years ago

  • Description updated (diff)
Actions #4

Updated by Andreas Nedbal 7 months ago

  • Status changed from New to Closed

GIFBUILDER handles IMAGE objects differently to regular image objects, as to why cropping does not seem to have an effect here. So the image needs to be cropped beforehand, or the entire image needs to be cropped using a CROP object.

This is also elaborated at the top of the GIFBUILDER object documentation, stating:

Confusion could happen, because "TEXT" and "IMAGE" are objects in both areas; note that they are different each time!

Aside that, the code for loading an image (from the exception trace) has changed quite a bit since version 7 and it's probably impossible to reproduce why the file extension was only lost temporarily in this case (as the image was saved at least once per issue description).

Actions

Also available in: Atom PDF