question

FRJohan-6434 avatar image
0 Votes"
FRJohan-6434 asked romungi-MSFT commented

JPG image is not supported

Hi,

I have problem with jpg files from a sony camera (ILCE-7M3). The API returns UnsupportedImageFormat. I have also tried v3.2 read with the same result.


HTTP request
POST https://happyride-ocr.cognitiveservices.azure.com/vision/v2.0/read/core/asyncBatchAnalyze HTTP/1.1
Host: happyride-ocr.cognitiveservices.azure.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: ••••••••••••••••••••

 {"url":"https://happyride.se/galleri/DSC09349.jpeg"}


Response content
x-envoy-upstream-service-time: 870
CSP-Billing-Usage: CognitiveServices.ComputerVision.Transaction=1
apim-request-id: 9a760e9f-494a-4e60-b689-e2f239bdbe2d
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Mon, 23 Aug 2021 08:27:18 GMT
Content-Length: 137
Content-Type: application/json; charset=utf-8

 {
   "error": {
     "code": "UnsupportedImageFormat",
     "message": "Image format unsupported. Supported formats include JPEG, PNG, BMP, PDF and TIFF."
   }
 }





azure-cognitive-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

romungi-MSFT avatar image
0 Votes"
romungi-MSFT answered romungi-MSFT commented

@FRJohan-6434 I think the only reason for this could be the file name extension. Although it is JPEG or JPG the URL contains the image with extension jpeg so the request fails. I have tried another image from this site and is seems to work.

https://happyride.se/wp-content/uploads/2021/05/CV-0422-2000x1333.jpg

Can you try the same image with .jpg extension?

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Unfortunately, changing the extension to .jpg does not help.
https://happyride.se/galleri/DSC09349.jpg

We only have problem with jpg's from Sony A7 III (ILCE-7M3).

Jpg's from Canon EOS-1D X, Sony A77 II (ILCA-77M2), NIKON D810 and more camera models works fine.

0 Votes 0 ·

@FRJohan-6434 I think with the 3.2 version of the analyze API the response is seen.

126693-image.png

I am able to replicate the issue with the .jpg extension files with the 2.x Batch Analyze API too. I think the issue might be with the input requirements or size of the file rather than the image from sony camera. Please check if you can use the 3.2 analyze API similar to the above screenshot.

0 Votes 0 ·
image.png (70.8 KiB)

Yes. Analyze 3.2 works with this jpg image, but i need to get the start number of the cyclist in the image.
OCR 3.2 - The jpg file was ok, but the OCR failed to return the start number.
Read 3.2 - Can read start numbers (of my others jpgs) but is not working with this jpg.

I am on a paid tier.

Thanks for your help!

0 Votes 0 ·
Show more comments