Click or drag to resize

FileSystemClientGetCroppedAsync(Int64, Guid, Int32, Int32, Decimal, Decimal, Decimal) Method

To get started, call one of the following methods:
  • Anysense.API.Client.V1.ApiClient.Create
  • Anysense.API.Client.V1.ApiClient.CreateAsync
  • Anysense.API.Client.V1.ApiClient.CreateWithToken
  • Anysense.API.Client.V1.ApiClient.CreateWithTokenAsync
See Anysense.API.Client.Shared.BaseClient<T> for documentation on these methods.
Gets an image cropped to match submitted max width or max height, centered around the submitted coordinates. If the image is smaller than the requested dimensions, the original image is returned. If the returned image can be adjusted if the offsets is too close to the edges, so that the cropped image would have been out of bounds.

Namespace: Anysense.API.Client.V1
Assembly: Anysense.API.Client (in Anysense.API.Client.dll) Version: 1.31.15+d671d89394079ff2411e503098d3578f08c2de86
Syntax
C#
public Task<GetCroppedFileResponse> GetCroppedAsync(
	long fileSystemId,
	Guid fileSystemEntryId,
	int maxHeight,
	int maxWidth,
	decimal centerX,
	decimal centerY,
	decimal scale
)

Parameters

fileSystemId  Int64
The FormId of the FileSystem Form
fileSystemEntryId  Guid
The ClientId of the FileSystem FormData file to download
maxHeight  Int32
The maxium allowed height of the returned image.
maxWidth  Int32
The maxium allowed width of the returned image.
centerX  Decimal
The center point, offset from the top in percents (0-100)
centerY  Decimal
The center point, offset from the left in percents (0-100)
scale  Decimal
The zoom factor to apply to the image before cropping

Return Value

TaskGetCroppedFileResponse
A GetCroppedFileResponse containing information about the actual crop. If the API is called without the official Anysense API library, the caller should take notice of the following headers: - CROP-FULLWIDTH: The width of the scaled image before cropping - CROP-FULLHEIGHT: The height of the scaled image before cropping - CROP-OFFSET-X: The number of pixels from the left side, from where the image is cropped - CROP-OFFSET-Y: The number of pixels from the top side, from where the image is cropped
See Also