Skip to content

toPixelCropRect — @gj-kit/expo-media

A public function from @gj-kit/expo-media/image/pure. The signature below is taken directly from the 0.6.1 release declaration.

import { toPixelCropRect } from '@gj-kit/expo-media/image/pure';
/**
* Converts a crop drawn over a scaled or zoomed image into source-image pixels.
*
* The caller owns gesture constraints; this function preserves the existing
* display-to-source mapping and clamps the ending edge to source bounds.
*/
declare function toPixelCropRect({ sourceSize, cropRect, renderedImageRect, }: PixelCropInput): PixelCropRect;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-media
  • Version: 0.6.1
  • Public entry: ./image/pure
  • Source: GitHub