# ohos-imagecropview **Repository Path**: archermind-ti/ohos-imagecropview ## Basic Information - **Project Name**: ohos-imagecropview - **Description**: ohos图像裁剪库 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-06-25 - **Last Updated**: 2021-10-12 ## Categories & Tags **Categories**: harmonyos-image **Tags**: None ## README ### **Ohos-imagecropview** ### 项目介绍 从具有图库或相机中选择图像进行裁剪保存,可让您实现图像裁剪,通过在固定裁剪区域下移动图像来裁剪图像。 ### 效果图 ![image](image/imagecropsample.gif) ### 安装教程 #### 方式一: 1. 下载模块代码添加到自己的工程 2. 关联使用 ``` dependencies { compile project(path: ':simplecropview') api 'io.openharmony.tpc.thirdlib:glide:1.0.4' …… } ``` 3.在系统的settings.gradle中添加 ``` include ':entry',':simplecropview' ``` #### 方式二 1. 在module的build.gradle中添加依赖 ```groovy dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) …… implementation 'com.gitee.archermind-ti:imagecropview:1.0.1-alpha' } ``` 2. 在project的build.gradle中添加`mavenCentral()`的引用 ``` groovy allprojects { repositories { …… mavenCentral() } } ``` ### 使用说明 2.1 在config.json文件中,添加存储权限。 "reqPermissions": [ { ohos.permission.READ_USER_STORAGE }, ] 2.2 查询图库 checkPictureGalleryList(){ ...... } 2.3 展示图片 pickFromGalleryList(){ ...... } 2.4 点击获取随机图片,并展示 onclickTouchMe(){ ......} 2.5 对图片进行处理 点击 lAUNCH EDITOR,打开图片处理功能,此时可对图片进一步进行处理。 ### 版本迭代 - v1.0.1-alpha ### License ``` Copyright (c) 2015 Naver Corp. @Author Ohkyun Kim Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```