Image Analysis - Error code may be missing when Input image is too large

Tomas Kristof 0 Reputation points
2024-05-28T11:59:45.77+00:00

Hi,

When I call Image Analysis (v4.0, via C# SDK) with 20MB+ image, I receive this error (see that there is no InvalidImageSize error code:

The image size is not allowed to be zero or larger than 20971520 bytes. Status: 400 (Bad Request) ErrorCode: InvalidRequest
 
Content: {"error":{"code":"InvalidRequest","message":"The image size is not allowed to be zero or larger than 20971520 bytes."}}

Is the error code intentionally missing? I would expect the same behavior as in other error cases - eg. when the image has wrong dimensions, I receive this error with a specified error code:

The image dimension is not allowed to be smaller than 50 and larger than 16000. Status: 400 (Bad Request) ErrorCode: InvalidRequest
 
Content: {"error":{"code":"InvalidRequest","message":"The image dimension is not allowed to be smaller than 50 and larger than 16000.","innererror":{"code":"InvalidImageSize","message":"The image dimension is not allowed to be smaller than 50 and larger than 16000."}}}

Are the Image Analysis error codes for version 4.0 the same as for version 3.2?

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
338 questions
{count} votes