From ee43520a5fd7823c40d5af9ac6665dc083524a0d Mon Sep 17 00:00:00 2001 From: lloyd <353627866@qq.com> Date: Sun, 10 Aug 2025 11:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=9F=BA=E4=BA=8EXComponent=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=AE=9E=E7=8E=B0OpenGL=E5=9B=BE=E5=BD=A2=E7=BB=98?= =?UTF-8?q?=E5=88=B6=E5=8F=8AYUV=E5=9B=BE=E5=83=8F=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=91=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-profile.json5 | 1 + entry/src/main/ets/view/YUVView.ets | 2 +- oh-package.json5 | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-profile.json5 b/build-profile.json5 index cde2069..a3e0d3c 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -6,6 +6,7 @@ "name": "default", "signingConfig": "default", "compatibleSdkVersion": "5.0.0(12)", + "targetSdkVersion": "5.0.0(12)", "runtimeOS": "HarmonyOS" } ], diff --git a/entry/src/main/ets/view/YUVView.ets b/entry/src/main/ets/view/YUVView.ets index c14fcf3..7d1b4eb 100644 --- a/entry/src/main/ets/view/YUVView.ets +++ b/entry/src/main/ets/view/YUVView.ets @@ -78,7 +78,7 @@ export struct YUVView { async writeYUVFile() { // Write the yuv file to the sandbox path. const resourceManager = this.getUIContext().getHostContext()!.resourceManager; - const imageArray = await resourceManager.getMediaContent($r('app.media.ic_picture')); + const imageArray = await resourceManager.getMediaContent($r('app.media.ic_picture').id); let path: string = this.getUIContext().getHostContext()!.filesDir + "/image.yuv"; let file = fileIo.openSync(path, fileIo.OpenMode.READ_WRITE | fileIo.OpenMode.CREATE); fileIo.write(file.fd, imageArray.buffer).then((writeLen) => { diff --git a/oh-package.json5 b/oh-package.json5 index 88d6baf..c20a169 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -2,7 +2,6 @@ "modelVersion": "5.0.0", "license": "", "devDependencies": { - "@ohos/hypium": "1.0.15" }, "author": "", "name": "ndkxcomponent", -- Gitee