rotate images / attachments

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Ideas Centre
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: rotate images / attachments

Post by thecoalman »

DWFII wrote: Sun Aug 13, 2017 2:58 pm Bottom line...is there some way I, as Admin, can rotate images?
Sorry for the hijack. ;)

rxu wrote: Sun Aug 13, 2017 4:57 pm
I know such an extension, but it's in beta, requires PHP exif library connected and only handles jpeg images. So, handle with care ;)
https://github.com/AlexSheer/phpbb3.1-R ... ched-Image
I'm just working my way into phpBB again, extensions are new to me. In the ext folder I created a folder called github and inside of that I created a folder called rotate. I uploaded all the files from your link to rotate. It doesn't show up as extension in the ACP.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: rotate images / attachments

Post by DWFII »

And I might add that looking at @thecoalman's photo above, it appears rotated here. But when it is clicked on, the expanded photo is rotated back to the proper aspect / orientation.
Mick wrote: Sun Aug 13, 2017 5:45 pm Do you have an example URL where this happens? I'm not saying I have a fix or anything I'm just interested to see what's going on.
as far as an example...well try this link: http://www.thehcc.org/forum/viewtopic.p ... 880#p41880

And it happens on two computers (one in the shop and the other in the house)
Last edited by DWFII on Sun Aug 13, 2017 5:51 pm, edited 1 time in total.
DWFII
In the High Desert of Central Oregon
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26455
Joined: Fri Aug 29, 2008 9:49 am

Re: rotate images / attachments

Post by Mick »

thecoalman wrote: Sun Aug 13, 2017 5:48 pmextensions are new to me
https://www.phpbb.com/extensions/installing/ and each extension has installation instructions, or should.
  • "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
thecoalman
Community Team Member
Community Team Member
Posts: 5850
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: rotate images / attachments

Post by thecoalman »

Mick wrote: Sun Aug 13, 2017 5:45 pm Do you have an example URL where this happens? I'm not saying I have a fix or anything I'm just interested to see what's going on.
What is being described is exactly what I posted with the image, if you click the thumbnail for full size it's correctly oriented. I don;t know if it's getting resized here but on my test forum it was and it's handled correctly by plupload.

Briefly if you or anyone else does not understand this the file is stored exactly the same if it were film camera. If you turn the camera upside down with a film camera your negative is upside down on the negative roll, the same thing occurs here with the digital image. The difference being in the EXIF is setting for orientation or which end is "up". The browser or whatever software that supports it can orient the image correctly....

When you are manipulating the image such as resizing it you need to either preserve the original EXIF data or rotate it correctly based on the EXIF data, Pluplaod is doing one of these two things. The server side thumbnail on the other hand is not handled correctly, the EXIF is stripped during resizing leaving you with sideways image.
Last edited by thecoalman on Sun Aug 13, 2017 6:10 pm, edited 2 times in total.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26455
Joined: Fri Aug 29, 2008 9:49 am

Re: rotate images / attachments

Post by Mick »

DWFII wrote: Sun Aug 13, 2017 5:50 pmas far as an example
Thanks.

It seems the ones that are orientated incorrectly were taken in 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
thecoalman
Community Team Member
Community Team Member
Posts: 5850
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: rotate images / attachments

Post by thecoalman »

Mick wrote: Sun Aug 13, 2017 5:51 pm
thecoalman wrote: Sun Aug 13, 2017 5:48 pmextensions are new to me
https://www.phpbb.com/extensions/installing/ and each extension has installation instructions, or should.
Followed that already and quick test of another extension from here works fine. The posted link is off of github, not sure what the problem is but just pointing out I don't see it in the ACP.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
rxu
Extensions Development Team
Posts: 3711
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: rotate images / attachments

Post by rxu »

The path should be ext/sheer/image_rotator, no github etc stuff.
You need to unzip all files into it (so that composer.json should be located in the image_rotator folder).
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: rotate images / attachments

Post by thecoalman »

rxu wrote: Sun Aug 13, 2017 6:15 pm The path should be ext/sheer/image_rotator, no github etc stuff.
You need to unzip all files into it (where composer.json is located).
Thanks, I see it is defined in the services file under the config file now.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
rxu
Extensions Development Team
Posts: 3711
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: rotate images / attachments

Post by rxu »

My english vocabulary is probably too limited to explain it correctly. I give up.
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 »

created a folder called github and inside of that I created a folder called rotate.
Wrong, roll back this bit.

Inside of your /ext/ folder create a folder called sheer and inside of that create a folder called image_rotator

Final result should be ext/sheer/image_rotator

Now decompress the file you got from github and copy/paste the content of it (there should be a couple of folders and the composer.json file)
inside of the folder image_rotator
BTW, are you uploading images directly from your phone to you board as attachs?
If so, read this http://php.net/manual/de/function.exif- ... php#110894
🆓 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
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: rotate images / attachments

Post by DWFII »

Mick wrote: Sun Aug 13, 2017 6:04 pm
DWFII wrote: Sun Aug 13, 2017 5:50 pmas far as an example
Thanks.

It seems the ones that are orientated incorrectly were taken in portrait?
I don't know...I don't think so. I didn't take the photos. I have the Samsung S6. It takes photos fine and they post fine.

It is only these ten that were taken with an IPhone that have problems. That said, every time I have seen the IPhone in use it was in being held in landscape orientation relative to the subject.

On edit: looking at the photos again I would guess that in every case the button was to the right relative to the orientation of the thumbnail when the photo was taken.
Last edited by DWFII on Sun Aug 13, 2017 6:45 pm, edited 2 times in total.
DWFII
In the High Desert of Central Oregon
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: rotate images / attachments

Post by thecoalman »

rxu wrote: Sun Aug 13, 2017 6:23 pm My english vocabulary is probably too limited to explain it correctly. I give up.
I perfectly understood what you meant. :)

I have it enabled, I was under the impression this was going to allow you to rotate already uploaded images. This is only for new uploads, correct?

The PHP EXIF extension is installed on the server. The images are still not rotated correctly on upload, you have this working with 3.2?
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
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 »

thecoalman wrote: Sun Aug 13, 2017 6:43 pm @
Did you read this?
viewtopic.php?p=14803111#p14803111
🆓 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
thecoalman
Community Team Member
Community Team Member
Posts: 5850
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: rotate images / attachments

Post by thecoalman »

3Di wrote: Sun Aug 13, 2017 6:50 pm
thecoalman wrote: Sun Aug 13, 2017 6:43 pm @
Did you read this?
viewtopic.php?p=14803111#p14803111
Did you read this?
thecoalman wrote: Sun Aug 13, 2017 6:43 pm I have it enabled,
Or this part:
thecoalman wrote: Sun Aug 13, 2017 6:18 pm I see it is defined in the services file

Code: Select all

services:
    sheer.image_rotator.listener:
        class: sheer\image_rotator\event\listener
        arguments:
            - %core.root_path%
            - @config
        tags:
            - { name: event.listener }
My problem was not knowing the path was defined and where, now I know.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
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 »

This point: http://php.net/manual/de/function.exif- ... php#110894

About physical button on your phone and attachs posted via phone etc..

You may need an App which gives you the chance to have a soft button which rotates accordingly to your physical rotation, speculation here. I don't have this issues with my android and the right app, I don't use the physical button.
🆓 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
Post Reply

Return to “phpBB Discussion”