-
Notifications
You must be signed in to change notification settings - Fork 529
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
ExifMetadataReader::readFile() does not return Exif data #728
Comments
I did this test:
print_r((new ExifMetadataReader())->readFile('./Arbitro.tiff'));
print_r((new ExifMetadataReader())->readFile('./Canon_40D.jpg')); The output is:
So it seems to me that everything is working as expected... What do you get if you run the following code? |
I get:
|
Could you post here your image? |
You can also try the following line, this is similar to how Imagine reads the EXIF data: var_dump(exif_read_data('data://image/jpeg;base64,'.base64_encode(file_get_contents($path)), null, true, false)); |
This gives me fatal error Update: If I remove |
What do you get when you run |
|
What do you get with the following line? var_dump(exif_read_data('data://image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAABAAEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9/KKKKAP/2Q==', null, true, false)); |
Still |
Looks like your installation doesn’t support data URIs even though the You can verify my assumption by running this: |
|
If you set allow_url_fopen=1 in your php.ini the issue should get fixed. |
Thanks for helping me debug this. If there is no way to make it work without url fopen enabled, maybe it should be somewhere in the |
@stevekr I'm not sure what you mean with this. Could you explain it in other words? |
For example put it in |
What about something like #729 ? |
Even better :) |
I looked up the PHP documentation for We should probably check if the documentation is wrong or if there is something else at the root of this issue. |
I tried to set |
Yes, I will. |
I can do that, if you prefer |
That would be great, thanks! |
There's already a bug report: https://bugs.php.net/bug.php?id=47336 I added this comment: https://bugs.php.net/bug.php?id=47336#1575618618 |
Issue description
No Exif data returned when using
(new ExifMetadataReader())->readFile($path)
whileexif_read_data($path, null, true, false)
works fine.What version of Imagine are you using?
1.2.2
What's the PHP version you are using?
7.3.11
What's the imaging library you are using [gd/imagick/gmagick/any]?
any
What's the imaging library configuration
--
Minimal PHP code to reproduce the error:
The text was updated successfully, but these errors were encountered: