build: compile release APK and update dependencies (expo-image-manipulator/loader)

This commit is contained in:
2026-05-31 14:24:26 +02:00
parent 69637c4203
commit 2b5a259fe5
1260 changed files with 3804 additions and 166620 deletions
@@ -0,0 +1,24 @@
// Copyright 2024-present 650 Industries. All rights reserved.
/**
Transformer that creates a new image by cropping given image to specified width and height.
*/
internal struct ImageCropTransformer: ImageTransformer {
let options: CropRect
func transform(image: UIImage) async throws -> UIImage {
let rect = options.toRect()
let isOutOfBounds = rect.origin.x > image.size.width
|| rect.origin.y > image.size.height
|| rect.width > image.size.width
|| rect.height > image.size.height
guard !isOutOfBounds else {
throw ImageInvalidCropException()
}
guard let cgImage = image.cgImage?.cropping(to: rect) else {
throw ImageCropFailedException(rect)
}
return UIImage(cgImage: cgImage, scale: image.scale, orientation: image.imageOrientation)
}
}