1.delete useless photos

2.changed referenced pictures

Signed-off-by: dodozhou7 <abczp777777@163.com>
This commit is contained in:
dodozhou7 2022-08-21 23:32:38 -07:00
parent aed44a4afe
commit c35e61ce39
49 changed files with 372 additions and 74 deletions

View File

@ -111,7 +111,7 @@ struct CompressPage {
}
private cropressRecource() {
var data = new Array<Resource>();
data.push($r('app.media.photo5'))
data.push($r('app.media.jpgSample'))
var rename: OnRenameListener = {
reName() {
return "test_1.jpg";

View File

@ -23,7 +23,7 @@ import {PixelMapPack} from '@ohos/imageknife'
@Component
@Entry
export struct CropImagePage {
private _resource: Resource= $r('app.media.demo_org');
private _resource: Resource= $r('app.media.jpgSample');
@State x: number = 0;
@State y: number = 0;
@State crop_size: number = 100;

View File

@ -33,14 +33,14 @@ export struct CropImagePage2 {
@State height1: number = 0;
@State _rotate: number = 0;
@State _scale: number = 1;
private _resource: Resource = $r('app.media.bmpNet');
private _resource: Resource = $r('app.media.bmpSample');
build() {
Column() {
Button('点击解析图片')
.onClick(() => {
globalThis.ImageKnife.getImageKnifeContext().resourceManager.getMedia($r('app.media.bmpNet').id)
globalThis.ImageKnife.getImageKnifeContext().resourceManager.getMedia($r('app.media.bmpSample').id)
.then(data => {
let arrayBuffer = FileUtils.getInstance().uint8ArrayToBuffer(data);
let optionx = new PixelMapCrop.Options();

View File

@ -42,7 +42,7 @@ struct PngjTestCasePage {
this.rootFolder = globalThis.ImageKnife.getImageKnifeContext().filesDir;
globalThis.ImageKnife.getImageKnifeContext().resourceManager.getMedia($r('app.media.Tomato').id)
globalThis.ImageKnife.getImageKnifeContext().resourceManager.getMedia($r('app.media.pngSample').id)
.then(data => {
this.pngSource = FileUtils.getInstance().uint8ArrayToBuffer(data);
})

View File

@ -24,8 +24,8 @@ struct TestAllTypeImageKnifeComponentPage {
{
loadSrc: $r('app.media.jpgSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180
@ -35,8 +35,8 @@ struct TestAllTypeImageKnifeComponentPage {
{
loadSrc: $r('app.media.pngSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180
@ -46,8 +46,8 @@ struct TestAllTypeImageKnifeComponentPage {
{
loadSrc: $r('app.media.jpgSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180
@ -57,8 +57,8 @@ struct TestAllTypeImageKnifeComponentPage {
{
loadSrc: $r('app.media.svgSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180
@ -68,8 +68,8 @@ struct TestAllTypeImageKnifeComponentPage {
{
loadSrc: $r('app.media.bmpSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180

View File

@ -39,7 +39,7 @@ import {PixelMapPack} from '@ohos/imageknife'
*/
let mRotate: number = 0;
//let mUrl = "https://hbimg.huabanimg.com/cc6af25f8d782d3cf3122bef4e61571378271145735e9-vEVggB"
let mUrl = $r('app.media.check_big');
let mUrl = $r('app.media.pngSample');
@Entry
@Component
@ -486,7 +486,7 @@ struct TransformPixelMapPage {
*/
centerCrop() {
var imageKnifeOption = new RequestOption();
imageKnifeOption.load($r('app.media.photo5'))
imageKnifeOption.load($r('app.media.jpgSample'))
// imageKnifeOption.load(mUrl)
.addListener((err, data) => {
let result = new PixelMapPack();

View File

@ -25,8 +25,8 @@ struct Index {
{
loadSrc: "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ericA1Mv66TwicuYOtbDMBcUhv1aa9RJBeAn9uURfcZD0AUGrJebAn1g2AjN0vb2E1XTET7fTuLBNmA/132",
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180
@ -36,8 +36,8 @@ struct Index {
{
loadSrc: "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ericA1Mv66TwicuYOtbDMBcUhv1aa9RJBeAn9uURfcZD0AUGrJebAn1g2AjN0vb2E1XTET7fTuLBNmA/132",
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RoundedCornersTransformation,
roundedCorners:{
@ -53,8 +53,8 @@ struct Index {
{
loadSrc: $r('app.media.pngSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RotateImageTransformation,
rotateImage:180
@ -64,8 +64,8 @@ struct Index {
{
loadSrc: $r('app.media.jpgSample'),
size: { width: 300, height: 300 },
placeholderSrc: $r('app.media.Tomato'),
errorholderSrc: $r('app.media.picture1'),
placeholderSrc: $r('app.media.jpgSample'),
errorholderSrc: $r('app.media.pngSample'),
transform: {
transformType:TransformType.RoundedCornersTransformation,
roundedCorners:{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 KiB

After

Width:  |  Height:  |  Size: 9.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 KiB

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="750px" height="551px" viewBox="0 0 750 551" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>蒙版</title>
<defs>
<linearGradient x1="39.5134336%" y1="125.874399%" x2="39.5134336%" y2="2.34648164%" id="linearGradient-1">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#00FF28" offset="100%"></stop>
</linearGradient>
</defs>
<g id="知更问题反馈" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="多层切图问题" transform="translate(-539.000000, -975.000000)" fill="url(#linearGradient-1)">
<g id="编组-2备份-3" transform="translate(539.000000, 975.000000)">
<rect id="蒙版" x="0" y="0" width="750" height="551"></rect>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 932 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 251 KiB

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="750px" height="551px" viewBox="0 0 750 551" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>蒙版</title>
<defs>
<linearGradient x1="39.5134336%" y1="125.874399%" x2="39.5134336%" y2="2.34648164%" id="linearGradient-1">
<stop stop-color="#FFFFFF" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#00FF28" offset="100%"></stop>
</linearGradient>
</defs>
<g id="知更问题反馈" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="多层切图问题" transform="translate(-539.000000, -975.000000)" fill="url(#linearGradient-1)">
<g id="编组-2备份-3" transform="translate(539.000000, 975.000000)">
<rect id="蒙版" x="0" y="0" width="750" height="551"></rect>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 KiB