How do you rotate vertical image automatically after done take picture by camera in MIT App Inventor?

how to rotate only vertical image automatically after done take picture by camera in MIT App Inventor while horizontal image remain no rotate.

Request for a guide/help.
Urgently.
Thanks

Did you search the community for "rotate image" ?

To do it automatically you will need to know if the vertical(portrait) image is meant to be displayed vertically (as portrait orientation) or if it is meant to be displayed horizontally (as landscape).

The issues with images being displayed in the wrong orientation is often down to the device being used, some get it right, others do not.


is this method correct?
I used this method but it not sorking.
Can help suggest? or show me the correct way to do it

vertical(portrait) image is meant to be displayed vertically (as portrait orientation)
Can you show me how to do?
Thanks

image

ImageConvertor Extension

Sir can I know how the image recognize whether is horinzontal or vertical. I just want to rotate vertical image while horinzontal remain the same. Based on ur block I didnt see how you identify the image is horinzontal or vertical.

Please guide.
Thanks

I am just having a look at that part for you...

so the method you suggest will success to rotate only vertical image or will rotate both vertical and horizontal?

Can you please suggest a way to rotate only vertical image? thanks
really need ur help sir

The issue is knowing if the vertical image is in fact vertical, and /or if it requires rotating in the first place. As I previously stated, this may depend on your phone/device.....

yes if the vertical image is in fact vertical, it requires rotating in the first place.
Only want to rotate vertical images.
Any way to make the apps to recognize it is vertical image? then rotate 90 degree?
Horinzontal images will be remain non rotating
Please advise
Thanks

Try this:

screenOrientation.aia (52.5 KB)

It relies on the user to NOT rotate their device AFTER pressing the button to take a picture, and includes my ImageConvertor extension to physically rotate the image.

This works on my phone, which presents a portrait image rotated 90 degrees anti-clockwise in the image component.

You would probably want to include a manual option to rotate an image.

An alternative to this would be to use the Procam extension, which could possibly make life a bit easier for the user.