rotate attached images

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Ideas Centre
DWFII
Registered User
Posts: 330
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

rotate attached images

Post by DWFII » Sat Aug 12, 2017 12:03 pm

How many people take photos with their cell phones and attach / post them to a forum, without first opening them in an graphics editing application, only to find that they post 90°rotated from proper orientation?

Wishing for an extension that will let admin reorient attached photos / images. Ideally one that will work with Lightbox.
DWFII
In the High Desert of Central Oregon

Fodboldman
Registered User
Posts: 2
Joined: Thu Aug 17, 2017 11:05 am
Name: Christian Dyring Poulsen
Contact:

Re: rotate attached images

Post by Fodboldman » Thu Aug 17, 2017 11:20 am

Christian Dyring
CEO at
https://fodboldoplevelser.dk

Andimp3
Registered User
Posts: 12
Joined: Tue Feb 13, 2018 7:47 pm
Contact:

Re: rotate attached images

Post by Andimp3 » Tue Jun 19, 2018 7:17 am

Could the problem be solved in 3.2.2? If so, how was it solved?

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3155
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: rotate attached images

Post by HiFiKabin » Tue Jun 19, 2018 10:23 am

Its a known bug in 3.2.2 viewtopic.php?f=556&t=2453611

Andimp3
Registered User
Posts: 12
Joined: Tue Feb 13, 2018 7:47 pm
Contact:

Re: rotate attached images

Post by Andimp3 » Tue Jun 19, 2018 11:08 am

??? What does the link from you have to do with the problem described here? I do not see any connection with the topic of this thread.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19995
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: rotate attached images

Post by Mick » Tue Jun 19, 2018 11:53 am

Andimp3 wrote:
Tue Jun 19, 2018 11:08 am
topic of this thread
That makes no sense, there are no threads in phpBB they are topics. So “the subject of this topic” would be more accurate.
"The more connected we get the more alone we become" - Kyle Broflovski

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

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3155
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: rotate attached images

Post by HiFiKabin » Tue Jun 19, 2018 11:58 am

This TOPIC is about some images being rotated by 90deg, my answer is about resolving the 90deg rotation problem, therefore I think it has everything to do with this TOPIC

Andimp3
Registered User
Posts: 12
Joined: Tue Feb 13, 2018 7:47 pm
Contact:

Re: rotate attached images

Post by Andimp3 » Tue Jun 19, 2018 12:23 pm

Sorry, but I may not understand you correctly. English is not my mother tongue.

You posted a link to the known bugs of 3.2.2. If I read what is there, then I find nothing there to the problem of the rotated images.

DWFII
Registered User
Posts: 330
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: rotate attached images

Post by DWFII » Tue Jun 19, 2018 1:26 pm

I agree with Andimp3--I don't find anything about rotating image in that topic either.

I might add...as OP...that the original post was requesting an extension. I may never upgrade to 3.2.2--I have a fairly extensively customized forum and, most importantly, it is stable. I'd like an extension that adds capability, rather than changing the core program.

(Not a dev, so work with me here please--I may not have the proper terminology but I think the intent is clear.)
DWFII
In the High Desert of Central Oregon

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3155
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: rotate attached images

Post by HiFiKabin » Tue Jun 19, 2018 3:09 pm

Apologies. I would have sworn I linked the correct post, but I didn't. :oops:

This is what you need to do

Line 269 of phpbb_root/phpbb/plupload/plupload.php

Find:

Code: Select all

				'resize: {width: %d, height: %d, quality: 85},',
Replace with:

Code: Select all

				'resize: {width: %d, height: %d, quality: 85, preserve_headers: false},',
Last edited by HiFiKabin on Tue Jun 19, 2018 4:07 pm, edited 1 time in total.
Reason: typo

Andimp3
Registered User
Posts: 12
Joined: Tue Feb 13, 2018 7:47 pm
Contact:

Re: rotate attached images

Post by Andimp3 » Tue Jun 19, 2018 3:20 pm

No problem !

Thanks for the information. I will test it today or tomorrow night.

Andimp3
Registered User
Posts: 12
Joined: Tue Feb 13, 2018 7:47 pm
Contact:

Re: rotate attached images

Post by Andimp3 » Tue Jun 19, 2018 5:07 pm

I tested your code change a few minutes ago.

Unfortunately it does not work.

If you want you can even take a look as a guest in my board.

I have to test 2 pictures taken with my iPhone X from the screen of my Macbooks. One by holding the iPhone in standard posture (power button on the right) and a picture with alignment power button below.

As you can see here, the image I took with Power Button below is rotated 180 degrees.

The image I took with the power button at the top is rotated 90 degrees to the left.

The first post in my test topic is without your changes, the second post after i incorporated your changes.

User avatar
</Solidjeuh>
Registered User
Posts: 965
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: rotate attached images

Post by </Solidjeuh> » Tue Jun 19, 2018 10:52 pm

Camera function in smartphones are not made to take "vertical" pictures.
You need to hold the phone horizontal to take pictures. Then phpBB will upload the image correctly.
I've seen this on many forums, and it' not a phpBB issue, but a users issue .. :roll:

http://www.businessinsider.com/taking-i ... &r=US&IR=T
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Muziek wordt ook toegevoegd in de playlist van
textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net

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

Re: rotate attached images

Post by KYPREO » Wed Jun 20, 2018 3:49 am

Froddelaar wrote:
Tue Jun 19, 2018 10:52 pm
Camera function in smartphones are not made to take "vertical" pictures.
You need to hold the phone horizontal to take pictures. Then phpBB will upload the image correctly.
I've seen this on many forums, and it' not a phpBB issue, but a users issue .. :roll:

http://www.businessinsider.com/taking-i ... &r=US&IR=T
This is false. The linked article is more about how photos taken in landscape mode are aesthetically superior to portrait mode. That may be so, however, phones clearly are made to take "vertical" photos. Whether on Android or iOS platform, if you take a photo vertically, it will view vertically on the phone and will be interpreted as being in portrait mode when uploaded to most of the popular web browsers, apps and photo platforms. Yet the same photo will be incorrectly orientated when uploaded using phpBB.

There are cases of user error (where the phone is actually in landscape mode and the user hasn't waited for the sensor in the phone to reorientate before taking a vertical photo). However, this does not explain the phenomenon which is the subject of this topic. The problem lies in part in the way image orientation is recorded in the image file on the iOS system - it is done through EXIF data, rather than actually saving the image in the orientation as it is intended to be displayed on screen. phpBB has no way of interpreting this EXIF data to correctly orient the image.

That said, I have portrait photos taken on my Samsung that display in landscape mode when uploaded as a phpBB attachment. So the problem appears to extend beyond iPhones/iPads.

The fact that other platforms can recognise correct image orientation and phpBB cannot makes it a phpBB problem. Users aren't going to move away from iOS or change their behaviour just because phpBB doesn't work like every other platform - they'll just get frustrated and use something like Instagram or Facebook instead and great phpBB boards suffer as a result. For my board, it is now the number 1 complaint I receive from users and I would love for it to be fixed. With 70% of traffic on my board from mobile devices and 99% of photos taken with a smartphone, it is actually a big deal.

I've tried many of the code suggestions posted on this board in the past and none actually work.

Even better would be a simple tool to allow the user to preview and rotate the image in the attachment tab as they're actually composing a new post. vBulletin has recently implemented a preview system for its attachments that works very well.
phpBB user since 2002
www.AusRotary.com

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19995
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: rotate attached images

Post by Mick » Wed Jun 20, 2018 7:56 am

Froddelaar wrote:
Tue Jun 19, 2018 10:52 pm
Camera function in smartphones are not made to take "vertical" pictures
And the world is in landscape too.
"The more connected we get the more alone we become" - Kyle Broflovski

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

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: ivailo95 and 16 guests