rotate images / attachments

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

Re: rotate images / attachments

Post by thecoalman » Sun Aug 13, 2017 5:48 pm

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.

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

Re: rotate images / attachments

Post by DWFII » Sun Aug 13, 2017 5:50 pm

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

Re: rotate images / attachments

Post by Mick » Sun Aug 13, 2017 5:51 pm

thecoalman wrote:
Sun Aug 13, 2017 5:48 pm
extensions 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

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

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: rotate images / attachments

Post by thecoalman » Sun Aug 13, 2017 6:04 pm

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.

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

Re: rotate images / attachments

Post by Mick » Sun Aug 13, 2017 6:04 pm

DWFII wrote:
Sun Aug 13, 2017 5:50 pm
as 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

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

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: rotate images / attachments

Post by thecoalman » Sun Aug 13, 2017 6:08 pm

Mick wrote:
Sun Aug 13, 2017 5:51 pm
thecoalman wrote:
Sun Aug 13, 2017 5:48 pm
extensions 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.

rxu
Extensions Development Team
Posts: 2866
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: rotate images / attachments

Post by rxu » 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 (so that composer.json should be located in the image_rotator folder).

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: rotate images / attachments

Post by thecoalman » Sun Aug 13, 2017 6:18 pm

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.

rxu
Extensions Development Team
Posts: 2866
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: rotate images / attachments

Post by rxu » Sun Aug 13, 2017 6:23 pm

My english vocabulary is probably too limited to explain it correctly. I give up.

User avatar
3Di
Registered User
Posts: 12998
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: rotate images / attachments

Post by 3Di » Sun Aug 13, 2017 6:34 pm

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
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate

:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

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

Re: rotate images / attachments

Post by DWFII » Sun Aug 13, 2017 6:38 pm

Mick wrote:
Sun Aug 13, 2017 6:04 pm
DWFII wrote:
Sun Aug 13, 2017 5:50 pm
as 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: 2801
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: rotate images / attachments

Post by thecoalman » Sun Aug 13, 2017 6:43 pm

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?

User avatar
3Di
Registered User
Posts: 12998
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: rotate images / attachments

Post by 3Di » 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
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate

:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

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: rotate images / attachments

Post by thecoalman » Sun Aug 13, 2017 6:55 pm

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.

User avatar
3Di
Registered User
Posts: 12998
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: rotate images / attachments

Post by 3Di » Sun Aug 13, 2017 7:00 pm

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.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate

:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Post Reply

Return to “phpBB Discussion”

Who is online

Users browsing this forum: AmigoJack, Crizzo, Helios7, hewmac06, websoikeo365, Zurek and 259 guests