Package-level declarations

Types

Link copied to clipboard
class NV21Image(val width: Int, val height: Int, val nv21Data: ByteArray)

An image made of data in the NV21 format.

Functions

Link copied to clipboard

Constrain a bitmap to a given size, while maintaining its original aspect ratio.

Link copied to clipboard

Crop a Bitmap to a given Rect. The crop must have a positive area and must be contained within the bounds of the source Bitmap.

Link copied to clipboard
fun cropCameraPreviewToSquare(cameraPreviewImage: Bitmap, previewBounds: Rect, viewFinder: Rect): Bitmap

Crop the preview image from the camera based on a square surrounding the view finder's position in the preview bounds.

Link copied to clipboard
fun cropCameraPreviewToViewFinder(cameraPreviewImage: Bitmap, previewBounds: Rect, viewFinder: Rect): Bitmap

Crop the preview image from the camera based on the view finder's position in the preview bounds.

Link copied to clipboard

Crops and image using originalImageRect and places it on finalImageRect, which is filled with gray for the best results

Link copied to clipboard
fun determineViewFinderCrop(cameraPreviewImageSize: Size, previewBounds: Rect, viewFinder: Rect): Rect

Determine how to crop the preview image from the camera based on the view finder's position in the preview bounds.

Link copied to clipboard

Determine if the device supports OpenGL version 3.1.

Link copied to clipboard

Fragments the Bitmap into multiple segments and places them in new segments.

Link copied to clipboard

Scale a Bitmap by a given percentage.

Link copied to clipboard

Scale the Bitmap to circumscribe the given Size, then crop the excess.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Bitmap.zoom(originalRegion: Rect, newRegion: Rect, newImageSize: Size): Bitmap

Selects a region from the source Bitmap, resizing that to a new region, and transforms the remainder of the Bitmap into a border. See resizeRegion and rearrangeBySegments.