Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exif_read_data() returns fields incorrectly for camera RAW files #17483

Open
t-rutter opened this issue Jan 16, 2025 · 1 comment
Open

exif_read_data() returns fields incorrectly for camera RAW files #17483

t-rutter opened this issue Jan 16, 2025 · 1 comment

Comments

@t-rutter
Copy link

Description

May possibly be related to #11020

The following code:

<?php
$exifData = @exif_read_data($filePath);
echo $exifData['StripOffsets'] ."\n";
echo $exifData['StripByteCounts'] ."\n";
print_r($exifData['BitsPerSample'])

Resulted in this output:

160528
57600
Array
(
    [0] => 8
    [1] => 8
    [2] => 8
)

StripOffsets does not reference either the start of the main image data or any other data portions like previews.

Below are values return by exiftool and been check to be valid
But I expected this output instead:

1557504
16916475
Array
(
    [0] => 14
    [1] => 14
    [2] => 14
)

exif_read_data() should return valid field values or not return them.
No warnings or errors from PHP

PHP Version

PHP 8.2.21

Operating System

Synology DSM 7.2.2-72806 Update 2

@cmb69
Copy link
Member

cmb69 commented Jan 21, 2025

Please attach a demo image which shows the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants