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

Failure on Webkit Mac App #129

Open
ozgurozkan123 opened this issue Dec 15, 2020 · 4 comments
Open

Failure on Webkit Mac App #129

ozgurozkan123 opened this issue Dec 15, 2020 · 4 comments

Comments

@ozgurozkan123
Copy link

ozgurozkan123 commented Dec 15, 2020

Tested on Safari, Chrome and Webkit Mac app.

The file on this link: https://reminis-pip-pab.s3.amazonaws.com/DW_ET.jpg

It gives "Invalid JPEG metadata: Invalid segment size." error on Webkit Mac App. It is in function parseMetaData(file, callback, options, data) line 137

It gives a strange file attached below on load. It's 4 bytes jpeg. and canvas.toBlob gives null blob.
1607976297314_0_2da783815c7d850955cc9aba1edcd170

There is no problem with Chrome and Safari with the same code.

@blueimp
Copy link
Owner

blueimp commented Sep 25, 2021

Hi @ozgurozkan123, sorry for the late reply.
Unfortunately the file you provided is not accessible anymore.
Can you upload it somewhere more permanent so we can have a look?

@darkvovich
Copy link

I have the same problem with all my images =(

Chrome on Windows
osennyaya-doroga-les-trassa-asfalt

@blueimp
Copy link
Owner

blueimp commented Oct 20, 2021

@darkvovich
The Invalid JPEG metadata: Invalid segment size. error is logged if the length defined in a JPEG APPn segment exceeds the size of the maxMetaDataSize option or the size of the file.
It seems like the image blob generated from a Canvas for your picture contains a JPEG APP2 segment that is larger than what is defined as maxMetaDataSize for image head replacement (currently 256 bytes).
I'm not sure why the Canvas generated image contains a bigger sized meta data segment for your image (since canvas data does not retain JPEG meta data), but I'll release a fix that raises this to 1024 bytes.

blueimp added a commit that referenced this issue Oct 20, 2021
The image blob generated from a canvas for specific pictures contains a JPEG APP2 segment that is larger than 512 bytes.
See also #129.
@darkvovich
Copy link

Thx!

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

3 participants