Skip to first unread message

Kelley

unread,
Feb 17, 2016, 11:55:50 AM2/17/16
to MIT App Inventor Forum
I want to use photographs that my device has taken as background images. I have the code that does that, but the photo always auto rotates 90 off when it is set as the background (Drawing canvas). How do I make it orient the same way as the program?
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Taifun

unread,
Feb 17, 2016, 12:51:57 PM2/17/16
to MIT App Inventor Forum
this is a known issue for some devices.

Probably you have seen, that I'm offering an Image Metadata Extension to read the metadata of an image file
If you take a picture in landscape format using my example app, what will be displayed on your device for image height and image width?

You could use that extension and check, if the width from the image metadata is identical to the width of the displayed image. If yes, image is correctly displayed, if no, then rotate the image, see also https://groups.google.com/d/msg/mitappinventortest/x9Hu0Zvu2Xo/3dXoo7t6DQAJ

The App Inventor Extensions are currently in testing. See the announcement for more information about how to use an App Inventor Extension. 
         
Taifun

Scott Ferguson

unread,
Feb 17, 2016, 2:40:46 PM2/17/16
to MIT App Inventor Forum
A workaround for this is to insert the picture into an imagesprite that is set to fill parent in width and height.
The problem with that is you cannot draw over an imagesprite like you can draw over the canvas BackgroundImage.
---

Italo

unread,
Feb 17, 2016, 4:21:11 PM2/17/16
to MIT App Inventor Forum
Scott, that is correct, but also, after you place the sprite, you can save the canvas image and reload it as the background. That way you can draw on top of it.

Scott Ferguson

unread,
Feb 17, 2016, 4:34:22 PM2/17/16
to MIT App Inventor Forum
+1, Italo!
Reply all
Reply to author
Forward
0 new messages