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
Jr. Extension Validator
Posts: 14935
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Image orientation in plupload, using EXIF

Post by david63 » Sun Sep 09, 2018 2:05 pm

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Dog Cow
Registered User
Posts: 2491
Joined: Fri Jan 28, 2005 12:14 am
Contact:

Re: Image orientation in plupload, using EXIF

Post by Dog Cow » Sun Sep 09, 2018 5:51 pm

Mick wrote:
Sun Sep 09, 2018 7:34 am
The 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
Moof!
Mac GUI Vault: Retro Apple II & Macintosh computing archive.
Inside Allerton bookMac GUIMac 512K Blog

sp3ctre
Registered User
Posts: 284
Joined: Sun Jul 15, 2007 11:06 am

Re: Image orientation in plupload, using EXIF

Post by sp3ctre » Sun Sep 09, 2018 6:26 pm

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: 1652
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Image orientation in plupload, using EXIF

Post by canonknipser » 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
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: 2801
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Image orientation in plupload, using EXIF

Post by thecoalman » Sun Sep 09, 2018 9:29 pm

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....

v12mike
Registered User
Posts: 262
Joined: Thu Jul 09, 2015 5:03 pm

Re: Image orientation in plupload, using EXIF

Post by v12mike » Wed Oct 17, 2018 2:36 pm

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: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Image orientation in plupload, using EXIF

Post by Mick » Wed Oct 17, 2018 6:30 pm

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

There are no ‘threads’ in phpBB, they are topics.

v12mike
Registered User
Posts: 262
Joined: Thu Jul 09, 2015 5:03 pm

Re: Image orientation in plupload, using EXIF

Post by v12mike » Thu Oct 18, 2018 6:08 am


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

Re: Image orientation in plupload, using EXIF

Post by KYPREO » Fri Oct 26, 2018 1:32 am

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: 262
Joined: Thu Jul 09, 2015 5:03 pm

Re: Image orientation in plupload, using EXIF

Post by v12mike » Fri Oct 26, 2018 7:16 am

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.

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

Re: Image orientation in plupload, using EXIF

Post by KYPREO » Fri Oct 26, 2018 7:29 am

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: 339
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Image orientation in plupload, using EXIF

Post by tojag » Fri Oct 26, 2018 8:33 pm

Yes! It works! :)
v12mike big thanks! :)

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

Re: Image orientation in plupload, using EXIF

Post by KYPREO » Sat Oct 27, 2018 11:15 am

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: 339
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Image orientation in plupload, using EXIF

Post by tojag » Sun Oct 28, 2018 9:57 pm

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: 2801
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Image orientation in plupload, using EXIF

Post by thecoalman » Sun Nov 04, 2018 4:20 am

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.

Post Reply

Return to “phpBB Discussion”

Who is online

Users browsing this forum: AmigoJack, Crizzo, Exabot [Bot], Helios7, hewmac06, Toxyy, websoikeo365, Zurek and 281 guests