cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
val_tibay
Frequent Visitor

Changing the image format of Camera Control output

Hi there, 

 

I am using Power Apps to pass on images taken by the camera to a PowerAutomate flow where I process the data and put it into a report. I have done this by creating a Collection containing the photos and other user inputs. I have then converted this to a JSON array using the JSON('Collection',IncludeBinaryData) function and pass it on to a SharePoint list to be processed by the flow.

 

In my flow, I then parse the JSON array so I can separate out the metadata and pass the images into a Word template using the Microsoft Word Connector. However, I've found that with some images, the base64 strings are too large and cannot be read by the Word Connector (giving an error that the string is not valid base64 even when I have checked the strings with some online base64 decoders).

I've found that with iOS, the app returns jpeg files which are small enough to be processed (<100kB) and everything works correctly. However with Android, the app is returning much larger pngs (>400kB) which is causing errors.

Is there a way to make the app return jpegs in Android or is this a limitation in PowerApps?

 

I made a post relating to my PowerAutomate issues here but I decided to post here since I am stuck on the PowerApps side now.

 

Thank you 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @val_tibay ,

I do not use the Word connector, but I can relate to the camera control, which is used extensively on both Android devices (and iOS) in a number of apps. I store these in a Library as JPGs using the dataUriToBinary conversion directly from the camera output ControlName.Photo through a Flow. Maybe there is a path for you with this process.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @val_tibay ,

I do not use the Word connector, but I can relate to the camera control, which is used extensively on both Android devices (and iOS) in a number of apps. I store these in a Library as JPGs using the dataUriToBinary conversion directly from the camera output ControlName.Photo through a Flow. Maybe there is a path for you with this process.

View solution in original post

Hi @WA ,

I decided to use this method to save the image to a library first before retreiving and inserting into the Word document. This works as as expected now, thank you!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (29,301)