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

Compress image takes a lot of time in mobiles, solve without losing the orientation #65

Open
Heshade opened this issue Mar 6, 2019 · 2 comments

Comments

@Heshade
Copy link

Heshade commented Mar 6, 2019

That solves the time issue, but you are not able to display the image correctly orientated, is it possible to reduce the time without losing the orientation?

Originally posted by @Heshade in #56 (comment)

@Heshade Heshade changed the title Compress image a lot of time in android, solve whitout losing the orientation Compress image takes a lot of time in mobiles, solve whitout losing the orientation Mar 6, 2019
@Heshade Heshade changed the title Compress image takes a lot of time in mobiles, solve whitout losing the orientation Compress image takes a lot of time in mobiles, solve whithout losing the orientation Mar 6, 2019
@Heshade Heshade changed the title Compress image takes a lot of time in mobiles, solve whithout losing the orientation Compress image takes a lot of time in mobiles, solve without losing the orientation Mar 6, 2019
@georaldc
Copy link

You have to preserve image metadata before using compressorjs, then re-attach the exif data back after compressjs does its thing (you could use something like http://www.perry.cz/files/ExifRestorer.js to achieve this). This way, you can let your consuming web server handle file rotation instead of javascript.

@bchr02
Copy link

bchr02 commented Jun 28, 2020

I wonder if the example here would help: https://stackoverflow.com/a/44849182

EXIF is stored in the beginning part of a file so the following text on the readme If the size of target image is too large (e.g., greater than 10 MB), you should disable this option to avoid out-of-memory crash. doesn't make sense to me if implemented properly.

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

No branches or pull requests

4 participants