Rotate photo in Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Rotate photo in Android
Hi. I have learned that Androids take pictures using landscape. My app uses portrait layout.
I can deal with taking a picture using landscape, but when I bring it into the app, it displays sideways. I want to rotate it so it looks OK on the app.
I tried looking at revRotatePoly - but it it not for mobile applications.
How do I rotate an image 90 degress on an Android?
Thank you.
I can deal with taking a picture using landscape, but when I bring it into the app, it displays sideways. I want to rotate it so it looks OK on the app.
I tried looking at revRotatePoly - but it it not for mobile applications.
How do I rotate an image 90 degress on an Android?
Thank you.
Re: Rotate photo in Android
Hi cusingerBUSCw5N,
...
set the angle of img "xyz" to 90
...
Best
Klaus
...
set the angle of img "xyz" to 90
...
Best
Klaus
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Re: Rotate photo in Android
sorry - I didn't realize that the simple command rotate worked in android. As usual, I was looking for a more complex solution.
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Re: Rotate photo in Android
mobile didn't work.
Thank you Klaus - as usual, you are right on...
except, it needs to be -90
set the angle of image "libImage" to -90
does the trick
Thank you Klaus - as usual, you are right on...
except, it needs to be -90
set the angle of image "libImage" to -90
does the trick
Re: Rotate photo in Android
Hi cusingerBUSCw5N,
Setting the "angle" is non-destructive.
Best
Klaus
yep, "rotate" is more an "image editing" command, since it is destructive and will really ROTATE the complete image!cusingerBUSCw5N wrote:mobile didn't work.
Setting the "angle" is non-destructive.
Hey, but you didn't specify a direction!cusingerBUSCw5N wrote:except, it needs to be -90

Best
Klaus
Re: Rotate photo in Android
Thank Klaus for this post. I'm using it but having I resize the image by a scale factor that get to have the image at (a sort of) full screen, when then I rotate it, it keeps the original (big) size. Any advice?

Code: Select all
put (the width of image myImage/the width of this card) into resizeFactor -- (for example 5.4)
set the width of image myImage to the width of image myImage / resizeFactor
set the height of image myImage to the height of image myImage / resizeFactor
if the platform is "android" then
set the angle of image nomeImmagine to -90
end if
set the loc of image myImage to the loc of this card
Re: Rotate photo in Android
Hi Mag,
sorry, what is happening with the rect and widht and height of an image
when its angle <> 0 is still a complete mistery to me, so I avoid that
Best
Klaus
sorry, what is happening with the rect and widht and height of an image
when its angle <> 0 is still a complete mistery to me, so I avoid that

Best
Klaus
Re: Rotate photo in Android

Just replace all the above with:
Code: Select all
if the platform is "android" then
set the angle of image myImage to -90
end if
