mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Merge pull request #18588 from mozilla/revert-18580-alt_text_pass_buffer
Revert "[Editor] Pass a buffer instead of a typed array when passing image data to the model"
This commit is contained in:
commit
b6b99a7b75
1 changed files with 1 additions and 3 deletions
|
@ -169,9 +169,7 @@ class StampEditor extends AnnotationEditor {
|
||||||
const response = await mlManager.guess({
|
const response = await mlManager.guess({
|
||||||
name: "altText",
|
name: "altText",
|
||||||
request: {
|
request: {
|
||||||
// Pass a buffer to avoid copy, see "run" method in:
|
data,
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/components/ml/actors/MLEngineParent.sys.mjs
|
|
||||||
data: data.buffer,
|
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
channels: data.length / (width * height),
|
channels: data.length / (width * height),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue