Image Processing
Introduction
This sample demonstrates the image processing function.
In this sample, <TextArea> is used to implement multi-line text input, mediaLibrary is used to obtain images from albums, image is used to generate pixel maps, and scale(), crop(), and rotate() of the pixelMap class are used to scale, crop, and rotate images.
Usage
-
Touch Add image on the offering review page. The page for selecting images is displayed.
-
Select the images to be displayed. You can select six images at most.
-
Select an image and touch Next. The image editing page is displayed. To scale an image, touch scale and then touch narrow or amplification. To crop the image, touch crop and select a crop ratio. To rotate the image, touch rotate.
-
After finishing editing the image, touch OK. The page for posting comments is displayed, with the images shown. You can touch Add image to add more images.
-
Touch the back button to exit the app.
Preview

Required Permissions
ohos.permission.READ_MEDIA, which allows an app to read media files from the user's external storage.
Dependency
N/A
Constraints
-
This sample can only be run on standard-system devices that use the Rockchip RK3568 chip.
-
This sample is based on the stage model, which is supported from API version 10 (API Version 10 Release).
-
DevEco Studio (4.0Release) must be used.