From 31727ccb4de0d02e17f595da926a73479a5c3963 Mon Sep 17 00:00:00 2001 From: calixteman Date: Fri, 9 Aug 2024 17:49:47 +0200 Subject: [PATCH] Revert "[Editor] Pass a buffer instead of a typed array when passing image data to the model" --- src/display/editor/stamp.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/display/editor/stamp.js b/src/display/editor/stamp.js index 12e9f65ff28fd..fc15ea7270b79 100644 --- a/src/display/editor/stamp.js +++ b/src/display/editor/stamp.js @@ -169,9 +169,7 @@ class StampEditor extends AnnotationEditor { const response = await mlManager.guess({ name: "altText", request: { - // Pass a buffer to avoid copy, see "run" method in: - // https://searchfox.org/mozilla-central/source/toolkit/components/ml/actors/MLEngineParent.sys.mjs - data: data.buffer, + data, width, height, channels: data.length / (width * height),