cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Computer Vision API - "Input data is not a valid image"

Hi fellow Flowers,

 

I am trying to create a sample app with PowerApps where the user will be able to take a picture of a document and use the resulting image to convert into text. This kind of exercice (processing images) has been well documented elsewhere so there should not be a problem since I copied the process step by step. However, I am still not succeding even though I tried every possible option.

 

 

This is the function in PowerApps - "Flow Definitivo" is the name of the function from Flow, and TextResultOCR is the variable where I'll get the text from. My Flow has the following structure:

 

 

The error that I am getting is at the API level, which tells me that the input data is not a valid image (I tried to convert the image to .jpg at the SharePoint module level, but I'll still get the same error, even though I can confirm that the pic is saved in SharePoint with the correct format.

 

 

 

I imagine that a lot of you have already tried to do something with Cognitive Services just because it is an exciting feature, and maybe you can help me with this. Thank you very much in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage
Solution Sage

Hi @Anonymous ,

As the error message shown: "Input data is not a valid image"  .

I suggest you add Get file content after Create file action.

Then use the File Content in the Image Content.

Please take a try with the following workaround:

10.png

Best Regards,

Zhongys

View solution in original post

3 REPLIES 3
Helper V
Helper V

@Anonymous 

I am getting something similar but it is to do with the image size, it does not seem to want to taek a normal image from a mobile phone, so i am intested in what sort of answer you get.  My image is on 2500x4500, the limits are around 3500x3500.

Regards,

Andrew

Solution Sage
Solution Sage

Hi @Anonymous ,

As the error message shown: "Input data is not a valid image"  .

I suggest you add Get file content after Create file action.

Then use the File Content in the Image Content.

Please take a try with the following workaround:

10.png

Best Regards,

Zhongys

View solution in original post

Anonymous
Not applicable

@WDRC 640 x 480 here, so there's no limitation in that department.

 

In any case, thank you Zhongys, it worked as a charm! But it's strange that was I following exactly what other people were doing but was getting a different result. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (14,127)