Closed bbugh closed 4 years ago
Hello.
I'm sorry, I can't be of much help to you right now since I'm on a vacation. But from the look at the PR it looks good.
Full package / base64: You could maybe try to go the build-your-own package route and import only the file readers and metadata parsers you need. There's an info about it in the Advanced API section, modularity subsection.
Orientation / rotation: aha. So exifr has some neat autorotation logic in the highlevel-api.mjs that you can't use directly but you can still take a look at it and copy-paste it. Or I could move it into a utility function and expose it so you can use it even after doing exifr.parse. btw. Also check out https://mutiny.cz/exifr/examples/orientation.html
Nevermind, exifr fatally errors on PNG and WEBP files.
Hey @bbugh and @svale, exif.js reads exif data from the image and acts accordingly. The thing is that exif data is available on .jpg and .tiff images only (from exif docs). So image types like .png, .gif etc. won't comply here. That's why probably exifr is no much difference with exif, and you haven't seen fixes for #41. Correct me please if I'm wrong about this???
This is a partial implementation to get started to fix #36. I don't know if it's necessary, because it doesn't seem to fix #41, which is why I was trying to make this PR. Our users take a lot of landscape images and it doesn't seem to be automatically rotating anymore.
Notes:
orientation
function of exifr as @MikeKovarik suggested, because we need to continue to receive the full exif data inverbose
modemini
, but that didn't work with an error about base64. Hopefully @MikeKovarik can chime in on this.scaleImage
has to be called one more callback level deep. I don't think this will affect anything since it's already all happening in a callback's callback (yo dawg) but I thought it worth mentioning.