🇮🇳India priyanka277
priyanka277 → created an issue.
🇮🇳India priyanka277
This has nothing to do with Drupal as it's using PHP's default getimagesize() function which itself is giving the wrong info about height and width in above mentioned scenario.
I have use below code snippet to test the issue.
- The First image ls1.jpeg is a portrait image(500*1000)
- The second image ls2.jpeg is a manually rotated to 1000*500 which is returning width=500 and height=1000.
- The Third image ls3.jpeg is rotated using Ms Paint to 1000*500 which is returning width=1000 and height=500.
list($width, $height, $type, $attr) = getimagesize("\images\ls1.jpeg");
echo "<img src=\"\images\ls1.jpeg\" $attr alt=\"getimagesize() example\" />";
list($width, $height, $type, $attr) = getimagesize("\images\ls2.jpeg");
echo "<img src=\"\images\ls2.jpeg\" $attr alt=\"getimagesize() example\" />";
list($width, $height, $type, $attr) = getimagesize("\images\ls3.jpeg");
echo "<img src=\"\images\ls3.jpeg\" $attr alt=\"getimagesize() example\" />";
🇮🇳India priyanka277
This has nothing to do with Drupal as it's using PHP's default getimagesize() function which itself is giving the wrong info about height and width in above mentioned scenario.
I have use below code snippet to test the issue.
- The First image ls1.jpeg is a portrait image(500*1000)
- The second image ls2.jpeg is a manually rotated to 1000*500 which is returning width=500 and height=1000.
- The Third image ls3.jpeg is rotated using Ms Paint to 1000*500 which is returning width=1000 and height=500.
list($width, $height, $type, $attr) = getimagesize("\images\ls1.jpeg");
echo "<img src=\"\images\ls1.jpeg\" $attr alt=\"getimagesize() example\" />";
list($width, $height, $type, $attr) = getimagesize("\images\ls2.jpeg");
echo "<img src=\"\images\ls2.jpeg\" $attr alt=\"getimagesize() example\" />";
list($width, $height, $type, $attr) = getimagesize("\images\ls3.jpeg");
echo "<img src=\"\images\ls3.jpeg\" $attr alt=\"getimagesize() example\" />";
🇮🇳India priyanka277
This has nothing to do with Drupal as it's using PHP's default getimagesize() function which itself is giving the wrong info about height and width in above mentioned scenario.
I have use below code snippet to test the issue.
- The First image ls1.jpeg is a portrait image(500*1000)
- The second image ls2.jpeg is a manually rotated to 1000*500 which is returning width=500 and height=1000.
- The Third image ls3.jpeg is rotated using Ms Paint to 1000*500 which is returning width=1000 and height=500.
list($width, $height, $type, $attr) = getimagesize("\images\ls1.jpeg");
echo "<img src=\"\images\ls1.jpeg\" $attr alt=\"getimagesize() example\" />";
list($width, $height, $type, $attr) = getimagesize("\images\ls2.jpeg");
echo "<img src=\"\images\ls2.jpeg\" $attr alt=\"getimagesize() example\" />";
list($width, $height, $type, $attr) = getimagesize("\images\ls3.jpeg");
echo "<img src=\"\images\ls3.jpeg\" $attr alt=\"getimagesize() example\" />";