ComputerVisionImpl.generateThumbnailWithServiceResponseAsync Method

Definition

Overloads

generateThumbnailWithServiceResponseAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

generateThumbnailWithServiceResponseAsync(int width, int height, String url, Boolean smartCropping, String modelVersion)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

generateThumbnailWithServiceResponseAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

public Observable<ServiceResponse<InputStream>> generateThumbnailWithServiceResponseAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

Parameters

width
int

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height
int

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

url
java.lang.String

Publicly reachable URL of an image.

generateThumbnailOptionalParameter
GenerateThumbnailOptionalParameter

the object representing the optional parameters to be set before calling this API

Returns

rx.Observable<com.microsoft.rest.ServiceResponse<java.io.InputStream>>

the observable to the InputStream object

generateThumbnailWithServiceResponseAsync(int width, int height, String url, Boolean smartCropping, String modelVersion)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

public Observable<ServiceResponse<InputStream>> generateThumbnailWithServiceResponseAsync(int width, int height, String url, Boolean smartCropping, String modelVersion)

Parameters

width
int

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height
int

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

url
java.lang.String

Publicly reachable URL of an image.

smartCropping
java.lang.Boolean

Boolean flag for enabling smart cropping.

modelVersion
java.lang.String

Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".

Returns

rx.Observable<com.microsoft.rest.ServiceResponse<java.io.InputStream>>

the observable to the InputStream object

Applies to