2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-21 18:53:20 +00:00

swap ENVIRONMENT_IS_* functions for Utils named exports

This commit is contained in:
d98762625
2019-07-05 10:17:52 +01:00
parent c70f14419a
commit 1c24c05647
41 changed files with 117 additions and 141 deletions

View File

@@ -8,6 +8,7 @@ import Operation from "../Operation";
import OperationError from "../errors/OperationError";
import { isImage } from "../lib/FileType";
import { toBase64 } from "../lib/Base64.mjs";
import { isWorkerEnvironment } from "../Utils";
import jimp from "jimp";
/**
@@ -102,7 +103,7 @@ class ResizeImage extends Operation {
height = image.getHeight() * (height / 100);
}
if (ENVIRONMENT_IS_WORKER())
if (isWorkerEnvironment())
self.sendStatusMessage("Resizing image...");
if (aspect) {
image.scaleToFit(width, height, resizeMap[resizeAlg]);