IStoredImageHandle.Tile Method

Definition

Namespace: P1.CameraSdk

A blocking (synchronous) version of RequestTileAsync

public ITile Tile(TileRequest tileArguments, UInt32 timeoutMs = 0);

Tiles are a cropped and scaled jpeg encoded previews of the full image. The camera takes the requested crop of the image, scales it and, optionally, converts it to jpeg.

The crop is defined in full image coordinates, meaning the pixel range of the full (visible) image dimensions. Origo is upper left corner. Any scaling is applied after cropping, meaning that if the crop dimension is 100 px, scaling by 0.5 results in an output image that is ~50 px.

Note that the camera might not (and will likely not), give the exact crop you requested. The resulting might differ a few pixels in offset or size. This is due performance optimizations in the image conversion pipeline. Speed is favoured over precision.

Parameters:

tileArguments

Specification of requested tile.

timeoutMs

To maximum time to wait for the camera to return the tile. Zero (0) is wait forever.

Returns:

An image buffer that encapsulates the image data, or nullptr on timeout.