HarmonyOS三方件开发指南(7)——compress组件
目录: 1. 组件compress功能介绍 2. 组件compress使用方法 3. 组件compress开发实现 1. 组件compress功能介绍 1.1. 组件介绍: compress是一个轻量级图像压缩库。compress允许将大照片压缩成小尺寸的照片,图像质量损失非常小或可以忽略不计。 1.2. 手机模拟器上运行效果: 2. 组件compress使用方法 2.1. 添加依赖 将compress-debug.har复制到应用的entry\libs目录下即可(由于build.gradle中已经依赖的libs目录下的*.har,因此不需要再做修改)。 2.2. 设置布局 <DependentLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:width="match_parent" ohos:height="match_parent" ohos:background_element="#FFFFFF"> <Image ohos:id="$+id:image1"...