Feature No Code Attached Yet
avatar Ruud68
Ruud68
8 Jun 2023

Steps to reproduce the issue

upload an image that is 'rotated'

Expected result

the width and height of the image should be according how the image is displayed

Actual result

the width and height are not correct as you can see in the attached screen capture: the image is portrait but according to the width / height it is landscape which is not correct.

screen shot 2023-06-08 at 07 56 44

System information (as much as possible)

Additional comments

avatar Ruud68 Ruud68 - open - 8 Jun 2023
avatar Ruud68 Ruud68 - change - 8 Jun 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jun 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jun 2023
avatar dgrammatiko
dgrammatiko - comment - 8 Jun 2023

PHP side is not aware of orientation:

$props = Image::getImageFileProperties($path);
$obj->width = $props->width;
$obj->height = $props->height;

avatar Ruud68
Ruud68 - comment - 8 Jun 2023

I understand, and that is why the width and height are incorrect. So IMO it should be orientation aware and set the correct width / height for the image, or not give the (wrong) width / height at all, or come with a disclosure that width and height are not to be used as they can be wrong.

Having the wrong values defeats the purpose of these values. And I understand that this is a limited 'use case' where people upload images taken with their mobile etc.

avatar brianteeman
brianteeman - comment - 1 Aug 2023

As php is not aware of the orientation how do you propose to make it aware here

avatar dgrammatiko
dgrammatiko - comment - 1 Aug 2023

Exif

avatar Hackwar Hackwar - change - 11 Aug 2023
Labels Added: Feature
avatar Hackwar Hackwar - labeled - 11 Aug 2023

Add a Comment

Login with GitHub to post a comment