From 6bcdd274c81c042bda40746fc55a2ed9c463cf5b Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Tue, 20 May 2025 20:12:18 +0800 Subject: [PATCH] Pre-store PixelMap Signed-off-by: wangweiyuan --- .../Media/Image/PixelMap/entry/src/main/ets/pages/Index.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/DocsSample/Media/Image/PixelMap/entry/src/main/ets/pages/Index.ets b/code/DocsSample/Media/Image/PixelMap/entry/src/main/ets/pages/Index.ets index 14ef3ac06a..7653e618d3 100644 --- a/code/DocsSample/Media/Image/PixelMap/entry/src/main/ets/pages/Index.ets +++ b/code/DocsSample/Media/Image/PixelMap/entry/src/main/ets/pages/Index.ets @@ -20,7 +20,6 @@ import { fileIo as fs } from '@kit.CoreFileKit'; import Logger from '../common/Logger'; import { readAndEditEXIF } from '../common/EditingEXIF'; import { encodeToStreamByPixelMap } from '../common/Encode'; -import { JSON } from '@kit.ArkTS'; import { DisPlayInfo } from '../utils/DisPlayInfoUtil'; const DEFAULT_IMAGE_WIDTH = 700; // 图像的默认宽度 @@ -45,6 +44,7 @@ struct Index { Logger.info('aboutToAppear Start'); this.pixelMap = await this.loadPixelMap(); this.oldPixelMap = this.clonePixelMap(this.pixelMap); + encodeToStreamByPixelMap(this.pixelMap, false); await this.updateImageInfo(); Logger.info('aboutToAppear End'); } -- Gitee