Jump to content

Images Being Rotated Sideways


Johnny2

Recommended Posts

I'm using the following code to save a file from a form:

 

<?php
$item_ID=53;
// ADDS IMAGES TO IMAGES FOLDER
$image_name_1 = "$item_ID"."_img1".".jpg";
//Saves newly-named image file
move_uploaded_file($_FILES['img1']['tmp_name'],"../images/$image_name_1");

?>

 

The code works great.

However; some files become turned on their side when viewed on the website.

I'm taking a shot in the dark and thinking it has something to do with the way Windows 8 saves the file. Because if I take the same file and re-save it in photoshop, then upload that file, it is not turned on it's side.

 

Anyway, I cannot alter the code of windows, so is there some php code that I can use to make sure the image isn't turned on it's side when uploaded via my script?

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...