Tidied up Steganography operations. FileType and toBase64 functions now accept ArrayBuffers.

This commit is contained in:
n1474335 committed 2019-09-04 13:54:59 +01:00
1 parent 5bc5c0df90
commit eb769c7fb4
28 files changed
+81 -75

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ class CropImage extends Operation {
*/
async run(input, args) {
const [xPos, yPos, width, height, autocrop, autoTolerance, autoFrames, autoSymmetric, autoBorder] = args;
if (!isImage(new Uint8Array(input))) {
if (!isImage(input)) {
throw new OperationError("Invalid file type.");
}