Jump to content

Recommended Posts

My question is pretty much what the title says.  If an image is uploaded from a computer it works fine.  When an image is uploaded from an iPad, it displays it upside down.

 

Has anyone ever heard of this ? Or dealt with it before ? 

 

If so, any suggestions on what I should do about it ?

Are you sure this is ALL pictures from an iPad? My first guess is that, since an iPad doesn't really have a permanent orientation, the pictures themselves were actually taken upside-down.

 

If they are ALL upside-down, you can flip anything coming from an iPad, but if it is just some, you would need some kind of orientation recognizing software to solve that problem.

IIRC Mac software may include orientation data in the picture: the actual image is upside-down but the metadata specifies that the image needs to be rotated. Problem is that software has to be aware of and able to read that metadata.

 

exif_read_data may be able to tell you. Try it on a flipped image: what does it return?

Edited by requinix

Jessica, you are usually a lot more help than this haha

 

The images we tried were taken in landscape.  We joked that maybe they were taken upside down, but its obviously hard to tell on an iPad.

 

requinix, I am going to try that out and see what happens.

 

Thanks everyone.

 

 

 

We just took images from every position and it always comes out wrong.

 

So, I tried this:

<?php
echo "resized_image.jpg:<br />\n";
$exif = exif_read_data('images/resized_image.jpg', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n";

$exif = exif_read_data('images/resized_image.jpg', 0, true);
echo "resized_image.jpg:<br />\n";
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: $val<br />\n";
    }
}
?>

...and it spit this out :

 

resized_image.jpg:
No header data found.
resized_image.jpg:
FILE.FileName: resized_image.jpg
FILE.FileDateTime: 1366072804
FILE.FileSize: 11831
FILE.FileType: 2
FILE.MimeType: image/jpeg
FILE.SectionsFound: COMMENT
COMPUTED.html: width="272" height="350"
COMPUTED.Height: 350
COMPUTED.Width: 272
COMPUTED.IsColor: 1
COMMENT.0: CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 80

 

 

I am either missing the orientation metadata or don't know where it is, OR don't know how to display it.

 

In the template I got the code from it printed this about the image they used:
 

test1.jpg:
No header data found.
test2.jpg:
FILE.FileName: test2.jpg
FILE.FileDateTime: 1017666176
FILE.FileSize: 1240
FILE.FileType: 2
FILE.SectionsFound: ANY_TAG, IFD0, THUMBNAIL, COMMENT
COMPUTED.html: width="1" height="1"
COMPUTED.Height: 1
COMPUTED.Width: 1
COMPUTED.IsColor: 1
COMPUTED.ByteOrderMotorola: 1
COMPUTED.UserComment: Exif test image.
COMPUTED.UserCommentEncoding: ASCII
COMPUTED.Copyright: Photo © M.Boerger, Edited by M.Boerger.
COMPUTED.Copyright.Photographer: Photo © M.Boerger
COMPUTED.Copyright.Editor: Edited by M.Boerger.
IFD0.Copyright: Photo © M.Boerger
IFD0.UserComment: ASCII
THUMBNAIL.JPEGInterchangeFormat: 134
THUMBNAIL.JPEGInterchangeFormatLength: 523
COMMENT.0: Comment #1.
COMMENT.1: Comment #2.
COMMENT.2: Comment #3end
THUMBNAIL.JPEGInterchangeFormat: 134
THUMBNAIL.Thumbnail.Height: 1
THUMBNAIL.Thumbnail.Height: 1

 

I don't see an orientation type thing there either though.

When you take a photo with an iPad or iPhone in order for it to be upside down on the actual device, you have to trick the phone into thinking its right side up.

 

You posted this in PHP coding - is the problem when you upload the photos through a script? Are they correct when you import them to your computer from the device? What tool do you use?

Ok... So I think it's the iPad...

 

I just tried with my iPhone (a landscape image) and it worked fine...

 

My boss just left for a little bit, but when he comes back I am going to see about him putting the images on his computer and seeing if they are right.

We got it to upload correctly.

 

This is how he said he got it to work:

 

"anything like crop or enhance.

then you save it and it's all is good.

anything you do to the image saves it and the orientation is set."

 

Not that its a perfect solution by any means, but it's something in the right direction.

 

I will be dealing with this more in the next week or so I'm sure...

 

Thank you lemmin, requinix, and Jessica

Your help is much appreciated.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.