Image upload rotates vertical image

Asked

Viewed 66 times

-1

I have a script that uploads the images and creates 2 files: width 1200 and width 50.

It works normally, but when the photo is vertical (height greater than width) it rotates the image in upload alone.

I noticed that even when uploading directly by Cpanel, when opening the image it is rotated.

If I open the image in photohop and save as a new one, then it works normal

  • 1

    https://answall.com/questions/34866/tag-img-ao-carregar-uma-imagem-do-banco-ela-aparece-deitada

1 answer

0

The camera saves information in the Orientation column as the image should be rotated for better viewing, some programs read this information and process accordingly.

Below the view of a part of this header. inserir a descrição da imagem aqui

See the Orientation field. In this case this is normal and the photo will not be rotated.

Download the program Imagemagick to help you change that information.

Look for more information about this here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.