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

Error reading "meta" box: got box type "mdat" instead #15

Closed
EnguerranMeens opened this issue May 1, 2023 · 3 comments
Closed

Error reading "meta" box: got box type "mdat" instead #15

EnguerranMeens opened this issue May 1, 2023 · 3 comments

Comments

@EnguerranMeens
Copy link

Hello !

Today, I tried to use your library to convert HEIC to JPEG. However, when I attempted to use it, I encountered an error. I tried to debug the issue by executing the command directly :

/Applications/MAMP/htdocs/captus/vendor/maestroerror/php-heic-to-jpg/src/../bin/php-heic-to-jpg-darwin-amd64 "/pathtomyfile/8ivB0GLCbsWkfeHnfTbzZDC4pJP9YOAFeb9giBCH.heic" "/pathtomyfilet/8ivB0GLCbsWkfeHnfTbzZDC4pJP9YOAFeb9giBCH.heic-1943393784644fce698a1fe9.91263079"

I got this error :

2023/05/01 16:36:39 error reading "meta" box: got box type "mdat" instead

My code :

$fileIsHeic = HeicToJpg::isHeic(public_path($data['hunts'][$i]['imagesTemplates'][$k]['image']));
if ($fileIsHeic) {
$imageName = $this->generateRandomString(10);
HeicToJpg::convertOnMac(public_path($data['hunts'][$i]['imagesTemplates'][$k]['image']), "amd64")->saveAs(public_path("/upload/tmp/test.jpg"));
$data['hunts'][$i]['imagesTemplates'][$k]['image'] = "/upload/tmp/" . $imageName . ".jpg";
dump("ok");die();
}

Can you help me ?

Thanks !

@MaestroError
Copy link
Owner

Hi, @EnguerranMeens! Thanks for the feedback. I already know about this error, it happens when you are trying to convert a non-iPhone generated HEIF files (from Samsung or web) and I am working to add support for "mdat" types too 👍 I will let you know about the update, but can't say now how long will it take, sorry

@EnguerranMeens
Copy link
Author

Hello !
Thanks for your answer and for the explanation !

@MaestroError
Copy link
Owner

New release is here! @EnguerranMeens Please refer to the docs update, let me know if you will have any questions 👍

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

No branches or pull requests

2 participants