The “Get Thumbnail” operation generates a thumbnail image for the uploaded image for the co-ordinates provided by the user. The cropping for the thumbnail is based on the Computer Vision API identifying the Area of Interest and applying those co-ordinates for cropping.
Smart cropping can also be applied to the image if the user wants to specify a different aspect ratio for the image.
API reference – https://bit.ly/2me3qUB
- Computer Vision service or Cognitive Services provisioned on Azure
- Postman App
- Supported image formats: JPEG, PNG, GIF, BMP.
- Image file size must be less than 4MB.
- Image dimensions must be between 50 x 50 and 4200 x 4200 pixels, and the image cannot be larger than 10 megapixels.
Get Thumbnail Operation
- Launch Postman
- Append your endpoint URL from pre-requisites step with /vision/2.0/generateThumbnail
- Provide the parameters (width, height and smartcropping) in the params tab.
- Provide the subscription key and content-type in Headers tab
- Provide the image URL in the Body tab.
- Following image is provided in the blob URL
- Here is the thumbnail image output from the API endpoint.
- If the smartcropping parameter is set to false then the API applies a different aspect ratio for the thumbnail image.
- Look at how the API is cropping by centering the object in the image if smartcropping parameter is set to true.