[3.2][3.3][ALPHA] EXIR - Exif Image Rotation 📸

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

[3.2][3.3][ALPHA] EXIR - Exif Image Rotation 📸

Post by 3Di »

Extension Name: Exif Image Rotation
Author: 3Di
Author note: Based on the AmigoJack's work here.

Extension Description: Auto rotates attachment images with exif data 'Orientation'
Check for free your IMGs for 'Orientation': https://www.get-metadata.com/

Author note (2): The destination IMG will be manipulated using memory resources, image rotation might fail because of needing much memory, the outcome is always a re-encoded picture, which means no (quality) lossless operation is involved. As per default the quality is set to 95, which preserves the filesize approx., bringing you a decent image quality, good I can say. All of the Exif metadata will be stripped with this operation. Creator: gd-jpeg v1.0 (using IJG JPEG v90), quality = 95.

Extension Version: 1.0.0-alpha

Requirements: phpBB => 3.2.2, PHP => 5.5, PHP extension 'exif'.
Extra Requirements: The extension works, as well as with all the other pre-existing requirements, only if the
  • ACP/attachments settings "Maximum image dimensions:" is set to 0x0.
phpBB 3.3 fix compatibility: viewtopic.php?p=15459226#p15459226

Extension Download: https://github.com/3D-I/phpBB-Exif-Imag ... master.zip
Extension installation: Copy the extension to ./ext/threedi/exir
Last edited by 3Di on Mon Jul 27, 2020 2:33 am, edited 13 times in total.
🆓 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
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

Here is how a 🐞 bug should be reported. https://github.com/3D-I/phpBB-Exif-Imag ... new/choose
phpBB version:


PHP version:


Any hard-coded snippet?


Any other attachment's related extension installed, if yes which one:



Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

Additional context
Add any other context about the problem here.
Last edited by 3Di on Fri Jul 06, 2018 12:54 pm, edited 3 times in total.
🆓 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
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by </Solidjeuh> »

This will be a great ext! But not gonna install Alpha.. :)
This only works for attachments? Would be great if it also works with "Dmzx Image Upload": https://www.dmzx-web.net/viewtopic.php?t=2464#p14597
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

Froddelaar wrote: Thu Jun 28, 2018 5:54 pm This will be a great ext! But not gonna install Alpha.. :)
I will change the prefix to RC if you want :lol: Or use it on a test board, you know already the answer. :P

Btw, how can I go RC if no one tries it before becoming a tester? Bah.. :?

This will work only with attachments, if those have any exif data 'orientation' that can be read.
Else no logic will be applied, like if the extension is not active.
Last edited by 3Di on Thu Jun 28, 2018 6:08 pm, edited 1 time in total.
🆓 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
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

Extension available for download (1.0.0-alpha), see first post.
🆓 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
fagbutlil
I've Been Banned!
Posts: 77
Joined: Wed Mar 07, 2018 10:56 pm

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by fagbutlil »

Took 2 pics samsung s8 1 landscap 1 the other way posted and only the 1 was the right way dunt know if thats how its ment to work or not?
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

fagbutlil wrote: Thu Jun 28, 2018 10:12 pm Took 2 pics samsung s8 1 landscap 1 the other way posted and only the 1 was the right way dunt know if thats how its ment to work or not?
Please plain English, I am not a native speaker, I don't slang either. :)

I've got:
I took 2 pics with a Samsung s8, one in landscape and one in portrait,.. :?:
... from this point I am lost. :?
🆓 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
fagbutlil
I've Been Banned!
Posts: 77
Joined: Wed Mar 07, 2018 10:56 pm

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by fagbutlil »

Plain english then it did not rotate :lol: failed to work no workie.

I landed up taking a selfie for the sake of it.
KYPREO
Registered User
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by KYPREO »

Great work on taking on this important fix!
fagbutlil wrote: Thu Jun 28, 2018 10:12 pm Took 2 pics samsung s8 1 landscap 1 the other way posted and only the 1 was the right way dunt know if thats how its ment to work or not?
This could be because the photo was not actually taken in portrait. I have a Samsung 8 and it is sometimes a bit slow for the position sensor to recognise the orientation of the phone. To ensure this was not a case of user error, perhaps take another photo but ensure the orientation icon is definitely in portrait mode.

Otherwise there is something else going on. Perhaps the way Samsung 8 implements EXIF orientation data?

The ideal fix for this would be to have rotate icon next to attachments or inline attachments in the preview window, allowing the user to see the orientiation error and fix it in the post itself. This is the best fix IMO as it overcomes user error and allows users to go back and edit a post if they their attachment isn't properly rotated. For this to work, it would need to rotate the physical image file already uploaded to the server.

However, I imagine this is far beyond the scope of what 3Di envisaged when commencing this extension!
Last edited by KYPREO on Thu Jun 28, 2018 11:27 pm, edited 1 time in total.
phpBB user since 2002
www.AusRotary.com
fagbutlil
I've Been Banned!
Posts: 77
Joined: Wed Mar 07, 2018 10:56 pm

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by fagbutlil »

May be some kind of rotate script that can fool the browser ?

maybe some thing like this https://stackoverflow.com/questions/167 ... javascript it has a demo.
Last edited by fagbutlil on Thu Jun 28, 2018 11:27 pm, edited 1 time in total.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

fagbutlil wrote: Thu Jun 28, 2018 11:20 pm Plain english then it did not rotate :lol: failed to work no workie.

I landed up taking a selfie for the sake of it.
You can decide whether to stay with your conviction or provide the necessary data for a test.
You could take those images from your camera, not manipulated by any software, and create an archive to download.

So I could test your truth.
3Di wrote: Thu Jun 28, 2018 6:01 pm This will work only with attachments, if those have any exif data 'orientation' that can be read.
Else no logic will be applied, like if the extension is not active.
🆓 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
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

KYPREO wrote: Thu Jun 28, 2018 11:23 pm Otherwise there is something else going on. Perhaps the way Samsung 8 implements EXIF orientation data?

The ideal fix for this would be to have rotate icon next to attachments or inline attachments in the preview window, allowing the user to see the orientiation error and fix it in the post itself. This is the best fix IMO as it overcomes user error and allows users to go back and edit a post if they their attachment isn't properly rotated. For this to work, it would need to rotate the physical image file already uploaded to the server.

However, I imagine this is far beyond the scope of what 3Di envisaged when commencing this extension!
For those Samsung > 5 lovers I suggest to try to switch to PHP 7.2 or greater, and report.
The image posted in the second post of this topic has been taken from a Samsung s5 and it works so far.

The future of this project is to have an Ajaxed feature as the natural fallback, in case. Let me get in full touch with this first, with PHP.
No need to rotate the physical image already uploaded to the server, also because this extension uses an event which does the job before of that, where the image have to be posted/stored, still.

Thanks for your feedback. :) Appreciated.

Generally speaking instead, for those who like to post criticism not surrogate by specific facts, programming errors and so on ...
.. but instead face the stage with something like "does not work" ... well, I do not have time to waste with games of this type, we're serious about it.
🆓 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
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

fagbutlil wrote: Thu Jun 28, 2018 11:25 pm May be some kind of rotate script that can fool the browser ?

maybe some thing like this https://stackoverflow.com/questions/167 ... javascript it has a demo.
I don't think so. :geek: How do you store the image with that? :)

If you speak code, you could take and fork the repo, do your stuffs with it and go ahead yourself.
It's free software, GPL'ed. ;)

Edit: have a read about Exif orientation: https://www.impulseadventure.com/photo/ ... ation.html
Last edited by 3Di on Thu Jun 28, 2018 11:54 pm, edited 1 time in total.
🆓 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
KYPREO
Registered User
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by KYPREO »

3Di wrote: Thu Jun 28, 2018 11:39 pm The future of this project is to have an Ajaxed feature as the natural fallback, in case. Let me get in full touch with this first, with PHP.
No need to rotate the physical image already uploaded to the server, also because this extension uses an event which does the job before of that, where the image have to be posted/stored, still.
This, I love! Well done and thanks.

I will give this a try on my board when I get a chance and provide feedback, although I am on php 7.1.7 currently.
phpBB user since 2002
www.AusRotary.com
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.2][ALPHA] EXIR - Exif Image Rotation

Post by 3Di »

KYPREO wrote: Thu Jun 28, 2018 11:54 pm
3Di wrote: Thu Jun 28, 2018 11:39 pm The future of this project is to have an Ajaxed feature as the natural fallback, in case. Let me get in full touch with this first, with PHP.
No need to rotate the physical image already uploaded to the server, also because this extension uses an event which does the job before of that, where the image have to be posted/stored, still.
This, I love! Well done and thanks.

I will give this a try on my board when I get a chance and provide feedback, although I am on php 7.1.7 currently.
I did tests with PHP 5.5.38 to 7.xx to 7.1.xx to 7.2.xx :) PHP 7.2 got some more exifs, a lot.

If you want, I allow you to PM me an archive of pictures (not manipulated) to use for my private tests, it doesn't matter the Phone/Exif.
🆓 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

Return to “Extensions in Development”