winston / attache-lambda

1 stars 0 forks source link

Auto Orientation of Image #3

Open winston opened 6 years ago

winston commented 6 years ago

Resources:

Exif Orientation

Code

Working with Images in Go

choonkeat commented 6 years ago

Wa swee thanks for digging up the links!!

The ghetto post too 钻牛角尖了, eg the first example of cos the info 600x450 is utterly useless except in the most contrived use case.

Too bad it’s got pagerank.

As far as most apps are concern, the goal is to auto orient correctly and then remove the orientation exif info, so there’s no confusion on how the devices / browsers will handle it.

winston commented 6 years ago

Tried to implement it briefly. It's not too bad with switch cases. Challenging part was figuring out which library to use to rotate and how to pass/typecast the images around. Hence punted that and focused on getting the other exif info in first. -- Cheers, Winston

choonkeat commented 6 years ago

how to pass/typecast the images around

after auto-orient, if possible, just write the bytes back into the file. should save us trouble of holding on to the image object in memory unnecessarily long