cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
eduardo13
Level: Powered On

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
v-zhos-msft
Level 10

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

Hi @eduardo13 ,

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

3 REPLIES 3
WDRC
Level: Powered On

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

@eduardo13 

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

v-zhos-msft
Level 10

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

Hi @eduardo13 ,

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

eduardo13
Level: Powered On

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

@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
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 181 members 5,369 guests
Please welcome our newest community members: