How does one load an extension?

I'm working through the "Become an APP Inventor" book, and am working on the "Tour Guide" project. My photos are being displayed in the APP as rotated upside down. This is occurring despite the fact that the preview function shows them with the correct orientation.

I tried flipping and saving the photos with a common Photo Viewer (Image Viewer on Ubuntu) and reloading them. After doing this, the preview function does show the change, the photo is upside down, but the image that is shown when running the app is still also upside down!

Why does this happen?

I see in other posts a recommendation that one make use of the following extension to fix this: pdfImgRotate.aia. Being new to this, I don't know how to include an extension in a project. I tried using the "Import Project" from the Projects dropdown, but all did was add this "extension" to my list of projects.

I've not been able to find any instructions on working with extensions. Can you tell me one makes use of an extension, or point me to instructions for this?

aia files are App Inventor projects
aix files are extensions
You can use any image extension, which offers a Rotate method

See the App Inventor Extensions document about how to use an App Inventor Extension

The extensions directory is here App Inventor Extensions | Pura Vida Apps

See here

Taifun

1 Like

Thank you! I didn't think to look on the Palette list. Part of it: I had "User Interface" open and the "Extensions" was off screen as a result.
Also thanks for the tip on the .aia vs .aix, and where to find the proper extension.
I see that iOS doesn't support extensions, but I'm willing to guess that iOS units won't arbitrarily flip pics.

A little more follow up here.

I wasn't able to get the extension TaifunImage.aix to rotate my image. However, by rotating the image manually using Ubuntu's ImageViewer and then rotating it back to upright, and reimporting to the app, the image displayed correctly. I suspect there is a field in the image that optionally pertains to orientation, and that it was left blank or random in the original photo, but the ImageViewer set it to the desired orientation and stored it in a field that AppInventor inspects.

For what it is worth, following is the code block I attempted, but it didn't flip the image upside down. I'd be interested in learning if there is an error in the image-flipping block.

Screenshot from 2024-11-08 15-09-23

What type of image do you have? jpg/png/webp other ?

see the example project from here App Inventor Extensions: Image | Pura Vida Apps and add these blocks

unknown

Taifun

1 Like

I'm using jpg in this instance.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.