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
{{ message }}
Repository navigation
Question: Is it possible to autoOrient Images? #711
Yes, the above code did work fine as expected.
Just the difference was gm would overwrite the original file with the auto-oriented result. And sharp would return new result and we had to do toFile to save it to new file.
So, we just had to do little tweak to fit our needs but that really wasn't a big deal.
Activity
lovell commentedon Feb 13, 2017
Hello, did you see the rotate operation?
kabirbaidhya commentedon Feb 15, 2017
Okay, seems like it's possible with a little tweak. Thanks.
lovell commentedon Feb 15, 2017
Are you able to expand on this comment? Is there something that could be improved?
Your example, using sharp instead of gm, would look something like:
kabirbaidhya commentedon Feb 15, 2017
Yes, the above code did work fine as expected.
Just the difference was
gmwould overwrite the original file with the auto-oriented result. Andsharpwould return new result and we had to dotoFileto save it to new file.So, we just had to do little tweak to fit our needs but that really wasn't a big deal.