cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lk777
Helper III
Helper III

Add Picture control problems

Hi,

 

I gave up on a Camera control with its low image resolution and Power Automate flow's  lack of support for transform: rotate() (in convert to PDF process). So I decided to give a 'Add picture' control a chance but all my test results do no look promising.

 

I was really excited when I found "ImageRotation" property but it seems does nothing with the image, it just " rotates image before displaying it" but this rotation doesn't have any affect on the saved image.

 

What I am trying to achieve is to take a picture on the mobile device (a phone or a tablet)  in a portrait mode, to covert it to the PDF file and upload a PDF file to the Sharepoint document library (Flow).

 

My goal is to use a mobile device as a document scanner (I am aware of mobile  scan apps, just need to use a Powerapp for these purposes).

 

My settings:

ApplyEXIFOrientation - true

CalculateOriginalDimensions -true

ImagePosition - Fit

ImageRotation.Rotate270

 

When I take a picture in a portrait mode, it is displayed 90deg clockwise rotated  in "Add picture" control , so I set ImageRotation.Rotate270. The image looks (displays) ok but these changes are not saved.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@AndrewMWolfe ,

Screen OnVisible

 

Set(
   iRotate,
   0
);
Set(
   stRotate,
   "ImageRotation.None"
)

 

Rotate button OnSelect

 

If(
    iRotate < 3,
    Set(
        iRotate,
        iRotate + 1
    ),
    Set(
        iRotate,
        0
    )
);
Switch(
   iRotate,
   1,
   Set(
      stRotate,
      "rotate90"
   ),
   2,
   Set(
      stRotate,
      "rotate180"
   ),
   3,
   Set(
      stRotate,
      "rotate270"
   ),
   Set(
      stRotate,
      "ImageRotation.None"
   )
)

 

ImageRotation

 

stRotate

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

18 REPLIES 18
alrez
Community Support
Community Support

Hi,

 

Looking through your logic here, everything seems to be correct. I don't see any issues with your logic here, I am not certain what is causing your issue. This might be a better question for Microsoft Support, I'll include a link on how to create a case with them if you would like to go down that route. Otherwise if any other communities members might know feel free to chime in.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Alex,

Can you or anyone else confirm that this feature works for you?

 

This is my collection where all pictures are saved to (Button "Save"):

 

Collect(colPics,{Image:UploadedImage1.Image,FileNamePic:varPicFileName,html:htmlPictures.HtmlText})

 

 

UploadedImage1.Image - is this supposed to be a rotated image (I have set ImageRotation to Rotate270) or an original one?

If this is an original (loaded) image then how can I save a rotated image, if it is possible at all?

 

Thanks.

Hi @lk777 ,

I can tell you that the Rotation applies to the Control, not the image itself.

Hi @WarrenBelz ,

 

Based on how it works now, yes, it applies to the Control only. What is the point to have an image rotated in the Control w/o saving changes in the image? The 'Add picture' control is not an image viewer, is it? Is this a bug or it was designed this way? Another 'idea' to be submitted to the UserVoice?

It looks like there are no any built-in  PowerApps, Power Automate (html/css transform: rotate is not supported) tools to rotate an image/picture. I hope I am wrong. Using any 3rd party mobile scanner applications is what I am trying to avoid.

Hi @lk777 ,

We do over 30,000 field images annually, so understand your frustration, however as we use Power Apps to view them, I have a rotation tool as below - happy to share if this is useful

RotatePhoto.gif

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

 

I liked your rotation button, so I have figured out how it can be done. But, again, it is not what I need.

Hi @lk777 ,

Then the only answer (and I was reluctant to suggest this), but on another app Library we do the following:-

  • Sync with the local PC
  • View in thumbnails
  • Rotate the "sideways" photos
  • They then sync back with the right orientation

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @lk777 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

 

Thank you for following up. No, I didn't. I have submitted a ticket to MS but do not think they will help me. Can't find any out-of-box solutions. This is a purely mobile application (for road warriors) and pictures is just a part of it. Most likely Adobe Scan and Attachment control (Shane Young's solution with some my changes) is going to be the way to go. I have tried all options like Camera (640x480 only, landscape only, portrait is resized to the height 480), 'Add picture' - reasonable 2MP resolution but again landscape only, Attachment control w/'Take a picture' is not a choice because it just passes a phone picture file to the PowerApp with no resolution reduction which is huge. I am embedding a JSON of the image into the HTML file (transform: rotate is not supported by Flow) which has a 2MB size limitation, but anyway if an image size of one page is larger than 300KB it can't be considered as a solution for a document scanning in my case.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,270)