Image orientation in plupload, using EXIF

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Image orientation in plupload, using EXIF

Post by david63 »

3Di wrote: Sun Sep 09, 2018 12:56 pm Who picks up a nice shiny new digital SLR camera nowadays?
Me
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Dog Cow
Registered User
Posts: 2507
Joined: Fri Jan 28, 2005 12:14 am
Contact:

Re: Image orientation in plupload, using EXIF

Post by Dog Cow »

Mick wrote: Sun Sep 09, 2018 7:34 amThe world is in landscape so what possesses people using phones to constantly take portrait images of cars and mountains and houses? It makes no sense to me.
Lazy people who want to use only one hand to hold their camera thing. You can hold them sideways with one hand too, but it's awkward. Otherwise you need two hands, and that's just tooooo inconvenient. Actually, I think portrait-mode movies are far more atrocious. :x
sp3ctre
Registered User
Posts: 321
Joined: Sun Jul 15, 2007 11:06 am

Re: Image orientation in plupload, using EXIF

Post by sp3ctre »

Lots of fantastic photography is portrait. Sure, plenty of people do it because they are lazy or don’t “get it”, but portrait photography definitely has it’s place.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Image orientation in plupload, using EXIF

Post by canonknipser »

Recently I found an older article about the problem: https://www.daveperrett.com/articles/20 ... -a-ghetto/ - even if the article is more than years old, most of it ist still valid
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5850
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Image orientation in plupload, using EXIF

Post by thecoalman »

canonknipser wrote: Sun Sep 09, 2018 8:45 pm Recently I found an older article about the problem: https://www.daveperrett.com/articles/20 ... -a-ghetto/ - even if the article is more than years old, most of it ist still valid
I didn't read the article but this is something the phones and other devices should of never implemented. They should of been storing the raw files with the correct orientation. As the article pointed out it's not just a phpBB issue and can lead to all kinds of problems. If you are using older editor for example that doesn't support it suppose you flip the image. If the EXIF is unedited when you view it in software that does support it now it's flipped the wrong way again....
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Image orientation in plupload, using EXIF

Post by v12mike »

On my forums have applied the change:
sp3ctre wrote: Sat Jul 01, 2017 7:35 pm In /phpbb/plupload/plupload.php (around line 269)

Code: Select all

'resize: {width: %d, height: %d, quality: 85},',
... becomes...

Code: Select all

'resize: {width: %d, height: %d, quality: 85,preserve_headers: false},',
and updated plupload to v2.3.6.

These 2 changes seem to have fixed the image rotation issue.

[edit] I just tested again, and the fix was just the update of plupload to v2.3.6, the edit to the php file is not needed (and perhaps not desirable).

I can't find a bug report in Jira to have this applied to a later release of phpBB, have I missed something? Or should I raise one.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26456
Joined: Fri Aug 29, 2008 9:49 am

Re: Image orientation in plupload, using EXIF

Post by Mick »

Yes, create one, if it already exists it will get marked up as a dupe.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Image orientation in plupload, using EXIF

Post by v12mike »

KYPREO
Registered User
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: Image orientation in plupload, using EXIF

Post by KYPREO »

v12mike wrote: Wed Oct 17, 2018 2:36 pm [edit] I just tested again, and the fix was just the update of plupload to v2.3.6, the edit to the php file is not needed (and perhaps not desirable).
This is fantastic if plupload has addressed the problem! Thanks for sharing. There is an extension which will implement the EXIF rotation data where image resizing is not implemented in the ACP, but that doesn't work where plupload is involved.

Is it possible to explain what is required to manually replace the plupload component of phpBB to the newer version? I can see where at least one of the files that ships with plupload is located within phpbb (FORUM/assets/plupload/plupload.full.min.js - which shows I'm running v2.3.3]. Is that it?
phpBB user since 2002
www.AusRotary.com
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Image orientation in plupload, using EXIF

Post by v12mike »

KYPREO wrote: Fri Oct 26, 2018 1:32 am Is it possible to explain what is required to manually replace the plupload component of phpBB to the newer version? I can see where at least one of the files that ships with plupload is located within phpbb (FORUM/assets/plupload/plupload.full.min.js - which shows I'm running v2.3.3]. Is that it?
Yes, that is the file to replace with the corresponding file from the plupload release 2.3.6. Simple.

The new version (2.3.6) of plupload should now be included in the phpBB v3.2.4 release.
KYPREO
Registered User
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: Image orientation in plupload, using EXIF

Post by KYPREO »

v12mike wrote: Fri Oct 26, 2018 7:16 am Yes, that is the file to replace with the corresponding file from the plupload release 2.3.6. Simple.

The new version (2.3.6) of plupload should now be included in the phpBB v3.2.4 release.
Brilliant. Thank you kindly. I will do some testing!
phpBB user since 2002
www.AusRotary.com
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Image orientation in plupload, using EXIF

Post by tojag »

Yes! It works! :)
v12mike big thanks! :)
KYPREO
Registered User
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: Image orientation in plupload, using EXIF

Post by KYPREO »

Hmmm. Hasn't exactly worked for me. I replaced FORUM/assets/plupload/plupload.full.min.js with the new v.2.3.6.

But, the attachments don't render in post with the correct orientation. However, if you open the direct URL of the uploaded image in a new tab it is correctly oriented. The means the EXIF data is just being retained and properly interpreted by the browser, but not phpBB.

Now, looking into it further, since replacing with plupload 2.3.6, all attachments retain their complete EXIF data, including GPS coordinates. This was not the case previously and EXIF was stripped (which is a good thing!)

The preserve headers false option can be used to strip EXIF but i didn't actually have this flag before. I had an unmodified plupload.php.

I have tried changing max image dimensions to zero, and same result (but obviously image size then isn't reduced). Then, to ensure i hadn't changed something manually into the past, i went and replaced phpbb/plupload/plupload.php with the version that shipped with my forum download package (v.3.2.2). No change.

I wonder where I'm going wrong? 🤔 perhaps because I'm still on 3.2.2?
phpBB user since 2002
www.AusRotary.com
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Image orientation in plupload, using EXIF

Post by tojag »

Keypro, I put a picture from iPad but under Firefox in Windows. Before updating the file plupload.full.min.js it was wrong (like 1st picture here), at the moment is ok. But my user wrote to me that when he putting a photo directly from the iPad, it is still wrong :( I have to check it on the iPad/iPhone.

Is it possible that the image published from the iPad displays wrong, and the same image published from another system displays correctly? It seems impossible.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5850
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Image orientation in plupload, using EXIF

Post by thecoalman »

KYPREO wrote: Sat Oct 27, 2018 11:15 am But, the attachments don't render in post with the correct orientation. However, if you open the direct URL of the uploaded image in a new tab it is correctly oriented. The means the EXIF data is just being retained and properly interpreted by the browser, but not phpBB.
Plupload only handles the full size image it doesn't handle the thumbnail.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Post Reply

Return to “phpBB Discussion”