Thanks for the details. Here is the quick start sample for analyze local image using computer vision REST API and C#. Please follow the below quick-start and snapshot of the response for the input image that you are trying.
https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/csharp-analyze
Analyze Image API InvalidImageSize
Hello!
We are a college team trying to create a food waste reducing app using React Native, and our goal is to use the Analyze Image API.
My team is trying to send the HTTP request to analyze an image using the Analyze Image API and we are adding FormData as the request body with the local image from the device. Some images are able to get the 200 status response, but many of them gives us the error InvalidImageSize, even if the image is less than 4 mb. We are not sure why this would happen, but our guess is that while making the FormData for the HTTP request it makes the image too large.
Is there any way instead of FormData to unload local image from the device or simulator and not use the url from online? Any help would be greatly appreciated. Thanks!
1 answer
Sort by: Most helpful
-
Ramr-msft 17,741 Reputation points
2020-10-16T08:22:16.067+00:00