From 269c7da0ce2c900a462b45b8335f892af03e4735 Mon Sep 17 00:00:00 2001 From: Sven Wappler Date: Mon, 21 Dec 2020 13:13:42 +0100 Subject: [PATCH] test --- composer.json | 15 +++++++++++++++ patches/93090-9a7debc.patch | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 composer.json create mode 100644 patches/93090-9a7debc.patch diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..fd4da73 --- /dev/null +++ b/composer.json @@ -0,0 +1,15 @@ +{ + "name": "wapplersystems/t3-patches", + "description" : "Patches for TYPO3 core", + "license": "GPL-2.0-or-later", + "require": { + "cweagans/composer-patches": "~1.0" + }, + "extra": { + "patches": { + "typo3/cms-core": { + "Patch 1": "https://www.drupal.org/files/issues/add_a_startup-1543858-30.patch" + } + } + } +} diff --git a/patches/93090-9a7debc.patch b/patches/93090-9a7debc.patch new file mode 100644 index 0000000..d314155 --- /dev/null +++ b/patches/93090-9a7debc.patch @@ -0,0 +1,19 @@ +diff --git a/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php b/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php +index d7c4db4..d3621ce 100644 +--- a/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php ++++ b/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php +@@ -2325,6 +2325,14 @@ + */ + public function getImageScale($info, $w, $h, $options) + { ++ // Cropping may change the aspect ratio of the image. ++ // The image info is modified to represent the image size after cropping. ++ if (($options['crop'] ?? null) instanceof Area) { ++ /** @var Area $cropArea */ ++ $cropArea = $options['crop']; ++ $info[0] = round($cropArea->getWidth()); ++ $info[1] = round($cropArea->getHeight()); ++ } + $out = []; + $max = strpos($w . $h, 'm') !== false ? 1 : 0; + if (strpos($w . $h, 'c') !== false) {