Bug #80169

Epic #77810: Improve (responsive) image handling

Aspect ration is wrong in media element (fal) details

Added by Joerg Boesche over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Image Cropping
Target version:
Start date:
2017-03-07
Due date:
% Done:

100%

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

Description

2 Issues with the aspect ratio with the image manipulation tool.

  1. After editing the image with the image manipulation wizard and closing (Button: accept) the overlay, the aspect ratio is not updated in media view.
  2. After edtiting the image with the image manipulation wizard and saving the content element, the aspect ratio is wrong in media view.

See attached files.


Files


Related issues

Related to TYPO3 Core - Bug #89191: ImageManipulationWizard looses precision on large imagesClosed2019-09-17

Actions
#1

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51979

#2

Updated by Helmut Hummel over 4 years ago

After edtiting the image with the image manipulation wizard and saving the content element, the aspect ratio is wrong in media view.

I can't reproduce that. Can you post your configuration here?

#3

Updated by Joerg Boesche over 4 years ago

Helmut Hummel wrote:

After edtiting the image with the image manipulation wizard and saving the content element, the aspect ratio is wrong in media view.

I can't reproduce that. Can you post your configuration here?

This is my current configuration in EXT:example/Configuration/TCA/Overrides/sys_file_reference.php

$allowedAspectRatios = [
    '16:9' => [
        'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.16_9',
        'value' => 16 / 9
    ],
    '3:2' => [
        'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.3_2',
        'value' => 3 / 2
    ],
    '4:3' => [
        'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.4_3',
        'value' => 4 / 3
    ],
    '1:1' => [
        'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.1_1',
        'value' => 1 / 1
    ],
    'NaN' => [
        'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.free',
        'value' => 0.0
    ],
];
$cropArea = [
    'x' => 0.1,
    'y' => 0.0,
    'width' => 1.0,
    'height' => 0.8,
];
$focusArea = [
    'x' => 1 / 3,
    'y' => 1 / 3,
    'width' => 1 / 3,
    'height' => 1 / 3,
];

$coverAreas = [
         [
             'x' => 0.05,
             'y' => 0.85,
             'width' => 0.9,
             'height' => 0.1,
         ]
     ];

$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config'] = [
    'type' => 'imageManipulation',
    'cropVariants' => [
        'desktop' => [
            'title' => 'Desktop',
            'allowedAspectRatios' => $allowedAspectRatios,
            'cropArea' => $cropArea,
            'focusArea' => $focusArea,
            'coverAreas' => $coverAreas
        ],
        'tablet' => [
            'title' => 'Tablet',
            'allowedAspectRatios' => $allowedAspectRatios,
            'cropArea' => $cropArea,
            'focusArea' => $focusArea,
            'coverAreas' => $coverAreas
        ],
        'mobile' => [
            'title' => 'Mobile',
            'allowedAspectRatios' => $allowedAspectRatios,
            'cropArea' => $cropArea,
            'focusArea' => $focusArea,
            'coverAreas' => $coverAreas
        ],
    ],
];
#4

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51979

#5

Updated by Helmut Hummel over 4 years ago

ok, that helped. I could reproduce it now

#6

Updated by Helmut Hummel over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Riccardo De Contardi about 4 years ago

  • Status changed from Resolved to Closed
#8

Updated by Benni Mack almost 2 years ago

  • Related to Bug #89191: ImageManipulationWizard looses precision on large images added

Also available in: Atom PDF