openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
23 lines (22 loc) • 856 B
JavaScript
import { n as resolvePreferredOpenClawTmpDir } from "./tmp-openclaw-dir-DR7bHNl9.mjs";
import { t as resolveSystemBin } from "./resolve-system-bin-DzBc-jWt.mjs";
import { createRastermill } from "rastermill";
//#region src/media/image-processor-config.ts
/** Shared input/output pixel cap for Rastermill-backed image operations. */
const MAX_IMAGE_INPUT_PIXELS = 25e6;
function createLocalImageProcessor(execution, limits = {
inputPixels: MAX_IMAGE_INPUT_PIXELS,
outputPixels: MAX_IMAGE_INPUT_PIXELS
}) {
return createRastermill({
execution,
limits,
temp: {
rootDir: resolvePreferredOpenClawTmpDir(),
prefix: "openclaw-img-"
},
commandResolver: (command) => resolveSystemBin(command, { trust: command === "powershell" ? "strict" : "standard" })
});
}
//#endregion
export { createLocalImageProcessor as n, MAX_IMAGE_INPUT_PIXELS as t };