Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ImagePicker doesn't always rotate pictures correctly

ANSWERED

I’m seeing many user reports with wrongly rotated photos when they’re trying to upload pictures with the ImagePicker component in the settings. Seems to be an Android error. Can someone look in to that?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I think this confirms my theory. The EXIF Orientation field for that image is 'Bottom Right', whereas a normal image has 'Top Left'. That means the image seems to have been taken with the camera upside-down. The pixels within the image are rotated 180 degrees from normal, and the Orientation EXIF field is used by most software to correct for that when displaying the image.

 

It seems that the Android Image Picker component doesn't take the Orientation EXIF field into account. I tried that image in a Fitbit image clockface, and the image was inverted in companion settings and on the clockface (which is probably what your user saw).

 

Ideally, the Image Picker should take Orientation into account. It might be possible to edit the EXIF field to make it normal (eg, using ExifTool), but then the image should appear inverted in all software (which would at least be consistent!).The image would then need to be rotated.

 

FWIW, you can view EXIF info using IrfanView. My Windows file manager (xplorer2) can also display the EXIF Orientation field. Paintshop Pro also allows viewing and (maybe) editing of EXIF fields.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
16 REPLIES 16

Hi @wim.va - have noticed that too, try making the image smaller. There seems to be problems with very large images, that force the app to rotate a portrait image to landscape.

Author | ch, passion for improvement.

Best Answer
0 Votes

Yeah, but the watchfaces I've created have mostly the image in full on the background, so they're 336x336 on the squircle devices. Seems like a bug that should be fixed in the Fitbit mobile app to me.

Best Answer
0 Votes

@wim.va  - if your image is already 336x336 the orientation won't need changing, or may be can you clarify further.

Author | ch, passion for improvement.

Best Answer
0 Votes

So people upload pictures via the ImagePicker component in the settings of the clockface. That image is sometimes rotated wrongly when uploaded to the device. So the Fitbit app doesn't get all the correct meta data to correctly rotate the image when sending it to the device. I'm seeing this on Android users by the way. iOS seems to run fine.

Best Answer
0 Votes

@wim.va - does this happen with small images or big ones on Android?

Author | ch, passion for improvement.

Best Answer
0 Votes

The users can choose pictures from their own Photos gallery. So probably large. But they are converted to 336x336 before sending to the watch. Also, this has been working fine for years. I didn't change any code on this. It's a bug in the Fitbit app that should be fixed.

Best Answer
0 Votes

@wim.va - what's changing is newer model phones are taking bigger pictures.

 

It is a problem I've noticed too.

 

Can you simulate it?

Author | ch, passion for improvement.

Best Answer
0 Votes

@wim.va - why the Imagepicker rotates the image when it is large is a mystery but if you want to compare with your system try CardImage, it should confirm the same issue.

 

Can you find a way to tell ImagePicker not to rotate or tell the users to shrink the image?

Author | ch, passion for improvement.

Best Answer
0 Votes

I suspect that something (Android OS or Android version of Fitbit app) has changed its interpretation of the Orientation field of the EXIF image metadata that's often embedded in image files by cameras. I have an image editor that can display the contents of that field. If anyone posts an image that misbehaves and one that behaves, I'll report what those fields say.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I'll try to get some images from my next user reports on this if they're willing to share. I'm on iOS, so I don't have this myself. At the moment I'm telling them to take a screenshot of the picture they want, and upload the screenshot in the ImagePicker, which works. But it's not an elegant solution ofcourse, as this should be fixed. 

 

Hope to get some example images soon!

Best Answer

@wim.va  - I get Android users to edit the photo in the phone Gallery, click Edit and the 3 dots and reduce size, but a screenshot should produce a smaller image.

Author | ch, passion for improvement.

Best Answer
0 Votes

Allright, I've found a user willing to share a pictures publicly: 20230107_145116.jpg

Best Answer
0 Votes

Oh great, this is resized by the forum ofcourse. Here is a WeTransfer link (which will expire within 7 days...)

https://we.tl/t-57cEefoiR7

Best Answer
0 Votes

I think this confirms my theory. The EXIF Orientation field for that image is 'Bottom Right', whereas a normal image has 'Top Left'. That means the image seems to have been taken with the camera upside-down. The pixels within the image are rotated 180 degrees from normal, and the Orientation EXIF field is used by most software to correct for that when displaying the image.

 

It seems that the Android Image Picker component doesn't take the Orientation EXIF field into account. I tried that image in a Fitbit image clockface, and the image was inverted in companion settings and on the clockface (which is probably what your user saw).

 

Ideally, the Image Picker should take Orientation into account. It might be possible to edit the EXIF field to make it normal (eg, using ExifTool), but then the image should appear inverted in all software (which would at least be consistent!).The image would then need to be rotated.

 

FWIW, you can view EXIF info using IrfanView. My Windows file manager (xplorer2) can also display the EXIF Orientation field. Paintshop Pro also allows viewing and (maybe) editing of EXIF fields.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

That explains it indeed. Then I hope Fitbit devs see this information so they can work on this 🙂

Best Answer
0 Votes

*nods* —since some of my products are affected by it too. 😉

Peter McLennan
Gondwana Software
Best Answer
0 Votes