i want automatically rotate a image if in landscape without rotating mobile

25 views
Skip to first unread message

Peppe Czeta

unread,
May 11, 2019, 12:15:49 PM5/11/19
to MIT App Inventor Forum
i want automatically rotate a image if landscape without activate the screen orientation, how can i?
I tryed with screen width > screen height,  but  the image is inside a canvas and it doesn't work 

TimAI2

unread,
May 11, 2019, 1:00:06 PM5/11/19
to MIT App Inventor Forum
Try


Look for the isLandscape and Rotate blocks/examples

Peppe Czeta

unread,
May 11, 2019, 1:39:10 PM5/11/19
to MIT App Inventor Forum
alredy tryed, bt doesn't work, when i take a landscape pic canvas stop to work 
123.png

TimAI2

unread,
May 11, 2019, 1:52:09 PM5/11/19
to MIT App Inventor Forum
I believe the rotated image is in memory, you need to save the file for changes to persist

Peppe Czeta

unread,
May 11, 2019, 2:22:18 PM5/11/19
to mitappinv...@googlegroups.com
i think i have to rotate the canvas, 'cose the image is rotate but not into the canvas, also if i pick it from my gallery 

TimAI2

unread,
May 11, 2019, 2:58:00 PM5/11/19
to MIT App Inventor Forum
I believe you are over complicating things
Handle the image rotation first and save the file, then apply to canvas as background image

Peppe Czeta

unread,
May 11, 2019, 3:38:38 PM5/11/19
to MIT App Inventor Forum
yeah, i was...thanks! 
Reply all
Reply to author
Forward
0 new messages