Skip to content

Commit

Permalink
Merge pull request #18588 from mozilla/revert-18580-alt_text_pass_buffer
Browse files Browse the repository at this point in the history
Revert "[Editor] Pass a buffer instead of a typed array when passing image data to the model"
  • Loading branch information
calixteman authored Aug 9, 2024
2 parents daabc7a + 31727cc commit b6b99a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/display/editor/stamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit b6b99a7

Please sign in to comment.