-
-
Notifications
You must be signed in to change notification settings - Fork 309
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 tool addition breaks importing PNG and GIFs #413
Comments
Note: If I do a |
Hi @alex-phillips thank you for quickly pointing that out. We will try to fix that one quickly. |
Hi @alex-phillips |
Just created a PR to fix this issue. Please give it a try. |
@tmp-hallenser Still no - same errors. Tried with |
Did you run |
@tmp-hallenser if the composer part is missing, do you think we should catch this error and place a log line for it ? |
Running it in docker and did a fresh build, but after I manually ran install / upgrade, then it worked fine. Thanks guys! |
It looks like a fresh install won't do, an upgrade is necessary. Curious if there's a version that should be bumped in the composer.json file? |
Thx for the feedback! Once it's merged into master, a fresh install should be fine. |
I hate to bring this up again, but with latest, setting exiftool to |
Hm, that's strange. Just tested it on my dev environment and it works for me. Did you try it with a clean installation? Does it happen for all PNGs? Can you provide the console output (esp. the details of the failure)? |
@tmp-hallenser Here's a screenshot of the output. I can post more if its needed, but didn't want a giant image if it was unnecessary. |
@alex-phillips The issue is the extraction of the meta data which fails. Can you share a sample file? |
Thanks for the file. That's really strange. The error happens in line 297 which means, the
I realized that your file contains a creation date which is not extracted - I'll fix that as well. |
exiftool output:
vardump output:
|
Looks like you're exploding by 'x', but my OS (for some reason) returns as a space. Perhaps a regex to determine if you should explode by 'x' or by space? |
if (preg_match('#^\d+x\d+$#', $value)) {
$value_splitted = explode("x", $value);
} else {
$value_splitted = explode(" ", $value);
} |
@tmp-hallenser even better: preg_match("#^(\d+)[^\d]+(\d+)$#", $value, $matches);
$value_splitted = array_slice($matches, 1); |
I can open a PR if you want :-P |
I've just pushed 'fix_413_part_2' to https://github.com/LycheeOrg/php-exif.git You can give it a try |
thanks for the drill down |
Awesome! I was having the same issue with GIFs but this fixes that as well. Thanks again! |
Detailed description of the problem
Unless I'm missing a package (I've installed php-exif and exiftool), I'm now getting a 500 error when importing PNG or GIF files. I've tried both with has_exiftool = 0 and = 1.
Error when
has_exiftool=0
:Error when
has_exiftool=1
JPEG images work fine in both cases.
Steps to reproduce the issue
Fresh install of lychee-laravel > upload file > choose PNG or GIF
Output of the diagnostics
Browser and system
lychee-laravel master on Linux (alpine)
The text was updated successfully, but these errors were encountered: