jlippold / WifiSMS

iphone webserver gateway for SMS
192 stars 68 forks source link

Pic next to name remains rotated #1

Open timbudtwo opened 13 years ago

timbudtwo commented 13 years ago

I assume the Iphone uses orientation information stored in EXIF, seeing as some photos pulled off are rotated unless you pull it into photoshop. Similarly, when using your web interface, the images that it pulls from the phone are rotated if the orientation was landscape when the photo was taken. Checking the exif for orientation information would fix this and make it certain that user photos are oriented properly.

Excellent application, though. This has been an oft requested feature for quite some time.

timbudtwo commented 13 years ago

Looking around it seems like you will need something to directly read the exif data. This jquery script can directly read it: http://www.nihilogic.dk/labs/exifjquery/jquery.exif.js

then you could use something like autorotate to read the pull on "orientation" whether it be 90, 180, or 270.

treason commented 13 years ago

ok so you are talking about the popup picture, not the picture preview bubble? So i guess for me to test I have to take a landscape photo right?

timbudtwo commented 13 years ago

There are pictures next to the names on the left. The conversations. On my screen a couple of them are rotated 90 degrees. I am assuming this is because iPhone uses exif orientation. I'll upload a picture later. Currently at work.

__ T

On Aug 3, 2011, at 9:39 AM, treason reply@reply.github.com wrote:

ok so you are talking about the popup picture, not the picture preview bubble? So i guess for me to test I have to take a landscape photo right?

Reply to this email directly or view it on GitHub: https://github.com/treason/WifiSMS/issues/1#issuecomment-1719466

Spidored commented 13 years ago

about the picture, the resize thumbnail is "compressed", this is not respecting the proportion.

This could help to handle a perfect thumbnail image :

The algorithm that i imagine will do : resize the image respecting the proportion, then save it to the disk. The resize can be done with CGImage functions.

In the following link, there's a premade function that create a thumbnail "Creating a Thumbnail Image from an Image Source" http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/ImageIOGuide/imageio_source/ikpg_source.html#//apple_ref/doc/uid/TP40005462-CH218-SW3

And here is the way to write an object CGImage to the disk (to save the JPG/PNG or else): http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/ImageIOGuide/ikpg_dest/ikpg_dest.html#//apple_ref/doc/uid/TP40005462-CH219-SW3

timbudtwo commented 13 years ago

this is what I was referring to in regards to rotation: http://img819.imageshack.us/img819/4315/rotation.jpg

timbudtwo commented 13 years ago

omg I keep hitting close and comment, sorry