cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Image Rotate

I'm having trouble saving an image with the new rotate image parameter, does it actually rotate the underlying image or do I need to save the ImageRotation value and apply that everywhere I need to view it?

 

What about saving to a collection, my image shows the unrotated version when looking at a saved collection with the image in it. I don't want to have to add another field to my collection, just want the rotated image to be saved.

 

 

8 REPLIES 8
Highlighted
Community Support
Community Support

Re: Image Rotate

Hi @chrisvdw,

 

Please take a try to add a Dropdown control, then specify the items property of the dropdown as below:

["ImageRotation.None","rotate90","rotate270","rotate180"]

After that, change the OnChange property of the Dropdown as below:

UpdateContext({Rotation: Dropdown1.Selected.Value})

At last, specify the ImageRotation property of the image with 

 

Rotation

 

Then change the Dropdown Value would be able to switch the image Rotation.

74.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate I
Advocate I

Re: Image Rotate

As i said the image does not retain the rotation when saved to a collection

Highlighted
Power Apps
Power Apps

Re: Image Rotate

The property only changes the image as it is displayed in the screen - it doesn't change the underlying image.

 

As of now, there's no way to retrieve / save the rotated image (which would something along the lines of a 'RotatedImage' output property in the image control). You can consider creating a new feature request in the PowerApps Ideas board for this.

Highlighted
Anonymous
Not applicable

Re: Image Rotate

I would save the rotation property in the collection also and use it when load the same image back in the gallery or wherever.

 

Collect(collectionName,{Item1:Value1,.....,Rotation : DropDown.selected.value})

Advocate III
Advocate III

Re: Image Rotate

This is helpful but @v-micsh-msft how do you reset the Image holder for the next image?  there is no OnHidden.  How can I update context in powerapps when the item is no longer visible?

Highlighted
Anonymous
Not applicable

Re: Image Rotate

You could add the extra collection field as suggested and make the image holder's rotation value tied to the value of that field.
Then each image would rotate as it needs to when displayed.
If the collection field is empty, the rotation parameter resets to nothing.
Also, a context is just a screen specific variable it can't be hidden.
Highlighted
Advocate III
Advocate III

Re: Image Rotate

@Anonymous how would you put it on the collection?  It is erroring everytime I try.  My collection is ClearCollect(colAttachments,BrowseGallery1.Selected.Attachments)  I would like to add it to this collection but I could not get it to not error.

 

All help is appreciated!

Highlighted
New Member

Re: Image Rotate

@v-micsh-msft  Thank you for this solution! it worked perfectly for me 😊

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,848)