mirror of
https://github.com/javl/image2cpp.git
synced 2026-10-26 22:10:20 +00:00
Show the imported byte array image below the input field
This commit is contained in:
1 parent
12de8c4700
commit
b49c116221
3 files changed
+29
-3
No files matched your search
@@ -702,6 +702,17 @@ function handleTextInput(drawMode) {
|
||||
el.style.display = 'none';
|
||||
});
|
||||
checkImagesAvailable();
|
||||
|
||||
// Mirror the result onto a small preview canvas right below the
|
||||
// buttons, so the pasted array is visible without scrolling to step 3.
|
||||
const previewCanvas = document.getElementById('text-input-preview-canvas');
|
||||
previewCanvas.width = canvas.width;
|
||||
previewCanvas.height = canvas.height;
|
||||
previewCanvas.getContext('2d').drawImage(canvas, 0, 0);
|
||||
previewCanvas.style.display = 'block';
|
||||
|
||||
const readImagesNoteEl = document.getElementById('read-images-note');
|
||||
readImagesNoteEl.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user