Specifications
Package: com.thekstudio.imagecropview
Size: 40.70 KB
Version: 1.0
Minimum API Level: 14
Updated On: 2025-04-06T18:30:00Z
Built & documented using: FAST-CLI
v2.8.2
Uses Library: SimpleCropView
Key Features:
-
๐ฅ Image Loading
- Load images from storage into the crop view dynamically.
-
โ๏ธ Crop Modes
- Supports multiple cropping styles:
- Fit Image, Square, Free, Circle
- Fixed ratios: 4:3, 3:4, 16:9, 9:16
-
๐จ Customizable Appearance
- Set background, overlay, frame, handle, and guide colors.
- Adjust stroke weights for frame and guide.
- Customize handle size and visibility.
- Set initial frame scale and minimum frame size.
-
๐ฆ Output Customization
- Choose between PNG or JPEG formats.
- Set image compression quality (0โ100).
-
๐ Rotate Image
- Built-in function to rotate image 90ยฐ clockwise.
-
๐พ Save Cropped Image
- Crop the selected area and save to any specified file path.
Events:
ImageCropView has total 2 events.
AfterCrop
Triggered after the image is cropped successfully.
Parameter | Type |
---|---|
outputPath | text |
OnError
Triggered when an error occurs during cropping.
Parameter | Type |
---|---|
errorMessage | text |
Methods:
ImageCropView has total 4 methods.
Initialize
Initializes the crop view in the given container and sets the image from the specified file path.
Parameter | Type |
---|---|
container | component |
imagePath | text |
CropMode
Set the crop mode.
Parameter | Type |
---|---|
mode | CropModes (helper blocks) |
RotateImage
Rotates the image clockwise by 90 degrees.
CropImage
Crops the image and saves it to the specified output path.
Parameter | Type |
---|---|
outputPath | text |
Setters:
ImageCropView has total 13 setter properties.
CompressFormat
Set the compress format.
- Input type:
text
CompressQuality
Set the compress quality (0-100, default 90).
- Input type:
number
BackgroundColor
Set the background color (default WHITE).
- Input type:
number
OverlayColor
Set the overlay color (default DIM TRANSPARENT).
- Input type:
number
FrameColor
Set the frame color (default WHITE).
- Input type:
number
HandleColor
Set the handle color (default WHITE).
- Input type:
number
GuideColor
Set the guide color (default WHITE).
- Input type:
number
FrameStrokeWeight
Set the frame stroke weight in dp (default 1).
- Input type:
number
GuideStrokeWeight
Set the guide stroke weight in dp (default 1).
- Input type:
number
HandleSize
Set the handle size in dp (default 20).
- Input type:
number
HandleVisible
Toggle handle visibility. True shows handles, false hides them.
- Input type:
boolean
MinFrameSize
Set the minimum frame size in dp (default 50).
- Input type:
number
InitialFrameScale
Set the initial frame scale (0.01 to 1.0, default 0.75).
- Input type:
number
PREVIEW:
Check docs at: SimpleCropView/README.md at master ยท igreenwood/SimpleCropView ยท GitHub
DOWNLOAD:
v1: com.thekstudio.imagecropview.aix (40.7 KB)
If you need an alternative with light weight extension (without external library) - Image Cropper Extension