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 GPS latitude and longitude are lost when HEIC is converted to jpeg #5

Open
ryaa opened this issue Nov 4, 2019 · 2 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ryaa
Copy link

ryaa commented Nov 4, 2019

Here is the file that I tried to convert to jpeg (please unzip it to get the original HEIC image) and output jpeg does not contain EXIF GPS data.

cheers.heic.zip

The code is as follows:

        const HEICBlobFile: Blob = await this.makeImageIntoBlob(heicImagePath);

        const JPEGBlobFile: Blob = await heic2any({
            // required: the HEIF blob file
            blob: HEICBlobFile,
            // (optional) MIME type of the target file
            // it can be "image/jpeg", "image/png" or "image/gif"
            // defaults to "image/png"
            toType: 'image/jpeg',
            // conversion quality
            // a number ranging from 0 to 1
            quality: 0.8
        });

and then I save the jpeg file and it has no GPS data in EXIF.

@ryaa
Copy link
Author

ryaa commented Nov 7, 2019

It seems that EXIF can't be preserved since canvas is used to convert the image.

@alexcorvi
Copy link
Owner

This is a current limitation of the library. The development process of this library is focusing on viewing a browser-consumable version of a heic file.
So this would typically be solved in the issue.
I'll keep this issue open and note any updates on the process.

@alexcorvi alexcorvi added enhancement New feature or request help wanted Extra attention is needed labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants