Skip to main content
Topic: timthumb -> rotate image (Read 1721 times) previous topic - next topic

timthumb -> rotate image

Hi,
In classic, when uploading a picture wich is in portrait with for example 1944x2542px size the app rotates the picture in list, view, edit.
However, the file on the server (localhost/xampp) has not been rotated. I tested with and without the active resize options.

How can i fix this?

Thanks.


Re: timthumb -> rotate image

Reply #2
Hi Wilvin,

I have noticed that it's not happening with all images that have the same size mention above.
Can you send me your email adress so i can send you the picture ( too big to post here), so you can investigate

Thanks

Re: timthumb -> rotate image

Reply #3
I think this is the problem (see below links)  because if I clean the exif with the images that cause the problem, everything is fine. I think you should then add a function that does this by default or by option.

https://medium.com/thetiltblog/fixing-rotated-mobile-image-uploads-in-php-803bb96a852c

https://stackoverflow.com/questions/12774411/php-resizing-image-on-upload-rotates-the-image-when-i-dont-want-it-to

Re: timthumb -> rotate image

Reply #4
@Eroll did this fix your issue? 👇
I think this is the problem (see below links)  because if I clean the exif with the images that cause the problem, everything is fine. I think you should then add a function that does this by default or by option.

https://medium.com/thetiltblog/fixing-rotated-mobile-image-uploads-in-php-803bb96a852c

https://stackoverflow.com/questions/12774411/php-resizing-image-on-upload-rotates-the-image-when-i-dont-want-it-to

Re: timthumb -> rotate image

Reply #5
Yes and no. Removing the exif on the photo solved my issue but i do it with photoshop. but i didnt try to make it trough php with a function.
What i suggest is that you implement such a function into phprad, by design


Re: timthumb -> rotate image

Reply #7
Thank you.

To make it clear, currently phprad displays the photo according to the information contained in the Exif infos (if any) of the downloaded photo. So if you have any exif information that says the photo is horizontal, php rad will show it horizontally even if you rotate the image vertically before uploading it.
Many people do not know that this information is written in the file and therefore they think that the rotation they made before the upload is permanent.
What would be interesting to have as a feature is the ability to disable the reading or even erase Exif informations in a uploaded photo.

I already met this problem before in an application (made with phprad) for a cocktail contest where some photos taken with smartphones were rotated at the time of upload. I had to manually edit each of these photos.

Cheers.
Arnaud.