rotate images / attachments

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Get Involved
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: rotate images / attachments

Post by tojag »

Hi
Will it be resolved in next release of phpBB?
Regards
iPad - bad orientation
iPad - bad orientation
Android phone -  ok
Android phone - ok
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: rotate images / attachments

Post by 3Di »

tojag wrote: Tue Jul 03, 2018 8:51 am Will it be resolved in next release of phpBB?
viewtopic.php?f=456&t=2477256
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
dtleahy
Registered User
Posts: 169
Joined: Sun Aug 24, 2008 5:47 pm

Re: rotate images / attachments

Post by dtleahy »

(forgive this cross post - the other was in a 'general' area where it probably won't get seen)

As far as I can tell, the issue of thumbnail images being rotated has not been "fixed" yet. I realize that some phpbb members/developers do not see this as a phpbb issue that needs fixin', but again I add my name to the chorus of phpbb board admins that don't care which piece (phpbb code, plupload code, ImageMagic code, extension code) is broken or who's fault it is - we just want a solution.

Telling 2000 forum members never to rotate their smart phones and tablets (and in some cases, digital cameras) is not the solution.

In most cases, a "forum" is no longer a "bulletin board" full of text. Modern forums are image-heavy, and server space is cheaper, so more forums are now allowing attached images. The cameras/phones/tablets produce huge files, needed for printing, but we sure don't want those giant files in our servers for monitor display (so the plupload "quality" attribute is critical.) Improperly rotated thumbnails from attachments are making phpbb look bad. None of the members know about the 3rd party libraries and code that is used along with phpbb - they simply see it as phpbb developers unable to solve the issue. It will appear as phpbb's flaw until solved.

There are some very good software developers here, both within the phpbb core team, and other developers adding extensions. I'm an old dinosaur programmer and a newbie at php, or I would dive in to the code. I'll bet someone here could fix the issue in an hour of programming. Maybe 3Di already is, but once the issue is resolved, it really should be in the phpbb core code, not in an extension.
KYPREO
Registered User
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: rotate images / attachments

Post by KYPREO »

dtleahy wrote: Sat Sep 08, 2018 8:30 pm (forgive this cross post - the other was in a 'general' area where it probably won't get seen)

As far as I can tell, the issue of thumbnail images being rotated has not been "fixed" yet. I realize that some phpbb members/developers do not see this as a phpbb issue that needs fixin', but again I add my name to the chorus of phpbb board admins that don't care which piece (phpbb code, plupload code, ImageMagic code, extension code) is broken or who's fault it is - we just want a solution.

Telling 2000 forum members never to rotate their smart phones and tablets (and in some cases, digital cameras) is not the solution.

*snip*
100% agree with everything written above.

Thanks to 3Di, we're part way there, but the extension is in Alpha and currently won't work with plupload feature which pretty much every image on my board uses since they are uploaded direct from smartphone with massive resolution. From what I can tell, plupload strips EXIF data, so there is no image rotation metadata to translate correct image orientation. The forum would need to rotate the image to match the EXIF data first, then reduce its size.
phpBB user since 2002
www.AusRotary.com
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: rotate images / attachments

Post by Mick »

I saw this linked in another EXIF topic, makes interesting reading https://www.daveperrett.com/articles/20 ... -a-ghetto/
  • "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
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: rotate images / attachments

Post by 3Di »

I can't get some spare time to finish my extension actually, it's on the tops of my list though.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: rotate images / attachments

Post by Mick »

A friend of mine had his landscape gardner over to do some work but said he couldn't do anything as the garden was portrait.
  • "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
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: rotate images / attachments

Post by AmigoJack »

Mick wrote: Mon Sep 10, 2018 6:46 aminteresting reading https://www.daveperrett.com/articles/20 ... -a-ghetto/
The author mixes multiple issues - if you trace it down to what happens where then you understand more clearly the issues:
  1. When picture files are created, their dimensions are always correct. There is not one single picture file where one needs to think "is width actually the height?" - such thinking only happens by omitting other details.
  2. When the device which created the picture is able to provide more details (camera was held rotated) then it may store this as EXIF metadata. Let's all assume the device does this in the correct way.
  3. EXIF metadata: is it present or not? When having a file without EXIF metadata nobody knows if it was recorded rotated - neither your internet browser, nor any other software.
  4. If a software can interpret EXIF data then it is also free to display the picture in a different way (without modifying the file). Rotated 90° clockwise? Sure, let me display it in such a way. The original file dimensions are still 1920x1080, it's just that what is displayed is now presented in 1080x1920 due to rotation. Internet browsers try to do this, and picture viewer programs in general.
  5. If a software can interpret EXIF data then it may modify the file. Rotated 90° clockwise? Sure, let me transpose the data so the file dimensions become 1920x1080. I should eliminate that part of EXIF metadata which initially led me to do this, tho (a couple of software does not so, and then other software still interpretes the EXIF metadata and acts accordingly). ImageMagick and a couple of websites do this.
  6. (Monitors can be rotated, too. Most graphic card drivers are able to rotate their output likewise. No software is expected to recognize your monitor's orientation, and luckily no software does so - it's up to the driver/operating system to control this.)
That's the whole magic. And it has to be understood in a cascading way:
  1. If the internet browser interprets EXIF metadata to display a picture differently then no other software (i.e. the website) should interfere. Problems then apply to internet browser bugs. This also means: don't upload your files to websites/online storages which modify your files - if you do so then you are part of the problem.
  2. If the website wants to modify the picture files according to their EXIF metadata then it must kill anything that could be (re)interpreted by the internet browser. Problems then apply to the website. This also means: those are no original files anymore - if you're not doing backups in case something goes wrong then you are part of the problem.
  3. If the device stores wrong/no EXIF metadata to begin with then problems apply to that one. This also means: if you don't check that yourself or you do/can not update the firmware then you are part of the problem.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
Post Reply

Return to “phpBB Discussion”