You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love this package, thank you! But the extracted thumbnail doesn't have the right rotation - it always comes out as landscape even for raw images that are portrait. Any ideas for how to fix?
The text was updated successfully, but these errors were encountered:
Temporary fix with Sharp and exifr. Here I'm extracting the orientation using exifr, then setting the orientation manually using sharp's withMetadata.
Example:
constsharp=require('sharp')constdcraw=require('dcraw')constexifr=require('exifr')constgenerateThumbnailFromRawImage=asyncrawFile=>{constorientation=awaitexifr.orientation(rawFile)// extracts the orientation of the original imageconstjpgFile=dcraw(rawFile,{extractThumbnail: true})sharp(jpgFile).withMetadata({ orientation })// manually sets orientation in Sharp.toFile('output.jpg')}
I love this package, thank you! But the extracted thumbnail doesn't have the right rotation - it always comes out as landscape even for raw images that are portrait. Any ideas for how to fix?
The text was updated successfully, but these errors were encountered: