Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
http://www.tinywebgallery.com/forum/

EXIF extraction not working on PHP7
http://www.tinywebgallery.com/forum/php-photo-gallery-bugs-f5/exif-extraction-not-working-on-php7-t6725.html
Page 1 of 1

Author:  TJM [ 15. Mar 2020, 15:10 ]
Post subject:  EXIF extraction not working on PHP7

Hi,

Running the TWG 2.4.6 on PHP7.0.33 on Ubuntu.

I found that images were not rotating according to the Image->Enable Autorotate. I traced it to in exifReader.inc.php.. approx.line 550. switch($Tag). I suspect it is because all the tag defines in the start of the file are in hexadecimal format string and this no longer works ...

PHP RFC: Remove hex support in numeric strings
https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings

"Note: From PHP 7.0: The is_numeric() function will return FALSE for numeric strings in hexadecimal form (e.g. 0xf4c3b00c), as they are no longer considered as numeric strings."
https://www.w3schools.com/php/php_numbers.asp

I think the defines in the start of the file need to be changed to hex numbers, not hex strings, or the value in three switch statements (approx lines 380,555 and 1330) need to be converted to a hex string.

Thanks for the great software.

Author:  TinyWebGallery [ 15. Mar 2020, 20:23 ]
Post subject:  Re: EXIF extraction not working on PHP7

Do you have a fix already which works for you? Or an example image for me?

What do you mean with "start of the file". The image?

Best, Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/