BuildIt.CognitiveServices.ComputerVisionAPIV10Extensions.GetThumbnail C# (CSharp) Метод

GetThumbnail() публичный статический Метод

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 <p/> 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. <p/> 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. <h4>Http Method</h4> POST
public static GetThumbnail ( this operations, double width, double height, bool smartCropping = true, string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string) ) : void
operations this /// The operations group for this extension method. ///
width double /// Width of the thumbnail. It must be between 1 and 1024. Recommended /// minimum of 50. ///
height double /// Height of the thumbnail. It must be between 1 and 1024. Recommended /// minimum of 50. ///
smartCropping bool /// Boolean flag for enabling smart cropping. ///
subscriptionKey string /// subscription key in url ///
ocpApimSubscriptionKey string /// subscription key in header ///
Результат void
            public static void GetThumbnail(this IComputerVisionAPIV10 operations, double width, double height, bool? smartCropping = true, string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string))
            {
                System.Threading.Tasks.Task.Factory.StartNew(s => ((IComputerVisionAPIV10)s).GetThumbnailAsync(width, height, smartCropping, subscriptionKey, ocpApimSubscriptionKey), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None,  System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }