strange behavior in imageManipulation for cropVariants

Viewed 28

As a source file I have a square image (500x500). As soon as I use the cropArea, the preview shows that the entire area has been selected (500x500px)

'cropVariants' => [
        'default' => [
            'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.crop_variant.default',
            'allowedAspectRatios' => [
                '1:1' => [
                    'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.1_1',
                    'value' => 1.0
                ]
            ],
            'selectedRatio' => '1:1',
            'cropArea' => [
                'x' => 0.0,
                'y' => 0.0,
                'width' => 1.0,
                'height' => 1.0,
            ],
        ],
    ],

enter image description here

But in the database, however, the following data (sys_file_reference) is stored: (problem y-coordinate)

{"default":{"cropArea":{"height":1,"width":1,"x":0,"y":-0.002},"selectedRatio":"1:1","focusArea":null}}

In Fluid this is my code:

<f:image src="{item.image.0.reference.uid}" alt="{item.image.0.reference.description}" treatIdAsReference="1" />

As a result that image is rendered in fluid with 500 x 499 pixels. (1px is missing) enter image description here

Any idea how I can adjust the behavior? so that the y-coordinate is also set to 0 and the whole selection is rendered?

0 Answers
Related