• Welcome to Simple Machines Community Forum. Please login or sign up.
December 05, 2021, 01:07:49 PM

News:

SMF 2.0.18 has been released! Please update. Read more.


Auto-Rotation of pictures

Started by bwaynef, February 07, 2016, 09:16:56 PM

Previous topic - Next topic

bwaynef

I've read several posts about this.  Essentially, someone posts a picture from their phone and when the attachment is accessed, its sideways.  Apparently the thumbnail that the iDevice creates is oriented correctly, but the image itself isn't.  I suspect that data is stored in EXIF data somewhere.

It's also my understanding that this has been handled in at least one gallery product, but I'm not positive of that.  I've read that its not broken and won't be fixed.  I've read its non-trivial.  I've read that simply because ipboard and vBulletin have a feature isn't justification enough for it to be implemented in smf.

I'm hemorrhaging users who are becoming accustomed to Facebook handling the resizing and auto-rotating of images with the click of the upload/post button.  Turns out, the only other major forum whose niche my forum shares also manages to handle both these issues with aplumb.

Could anyone point me to where those changes would need to be made if this can't be dealt with officially?

margarett

That's something I also think should exist but unfortunately it's out of my coding league...
This should be pretty much it
http://stackoverflow.com/questions/7489742/php-read-exif-data-and-adjust-orientation
(adapted to SMF's guts of course :P )
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

bwaynef

Quote from: bwaynef on February 07, 2016, 09:16:56 PMaplumb

It's aplomb.  Hopefully you'll let me blame this on posting late at night.

dougiefresh

Are you talking ONLY about attachments?  OR are you asking about regular images, such as those produced by the [url=x]y[/url] and [url]x[/url] constructs as well?  Cause I think I can whip something up for just attachments.....  If you are asking about image rotation for the other thing I mentioned, then that can definitely be time-consuming and would in most cases be better off storing the modified pictures on the server itself, you know, kinda like "process-once-show-many" process....

Antechinus

Nick Elk's code. They implemented this some time back. ;)

dougiefresh

The only problem with "borrowing" ElkArte's code is that the entire codebase has been rewritten.  I'd have to do a considerable amount of searching to borrow that code.....  It's a bit easier to borrow from their templates, as some of them haven't changed that much....

Antechinus

Ok, well the basic discussion was here, if it's any help: Image Orientation

dougiefresh

Thanks!  That actually helps a lot!

dougiefresh

I've finished the mod, however, I'm unable to test the mod.  I've submitted it over here so that someone brave might be the beta tester. 

It doesn't error on my machine, but I can't test because neither my localhost or shared server support getting the EXIF information.....

Rob Lightbody

Quote from: bwaynef on February 07, 2016, 09:16:56 PM
I'm hemorrhaging users who are becoming accustomed to Facebook handling the resizing and auto-rotating of images with the click of the upload/post button. 

Could anyone point me to where those changes would need to be made if this can't be dealt with officially?

I second that.  To compete with Facebook, somehow, this stuff just needs to work.

Kindred

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Advertisement: