Пример #1
0
        /// <summary>
        /// Crop image to face (square)
        /// </summary>
        /// Crop an image to the face (rectangular crop).  If there is more than one
        /// face present, choose the first one.
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='imageFile'>
        /// Image file to perform the operation on.  Common file formats such as PNG,
        /// JPEG are supported.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <System.IO.Stream> CropFirstAsync(this IFace operations, System.IO.Stream imageFile, CancellationToken cancellationToken = default(CancellationToken))
        {
            var _result = await operations.CropFirstWithHttpMessagesAsync(imageFile, null, cancellationToken).ConfigureAwait(false);

            _result.Request.Dispose();
            return(_result.Body);
        }