MCPcopy
hub / github.com/mobile-next/mobile-mcp / toBufferWithImageMagick

Method toBufferWithImageMagick

src/image-utils.ts:104–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 }
103
104 private toBufferWithImageMagick(): Buffer {
105 const magickArgs = ["-", "-resize", `${this.newWidth}x`, "-quality", `${this.jpegOptions.quality}`, `${this.newFormat}:-`];
106 trace(`Running magick command: magick ${magickArgs.join(" ")}`);
107
108 const proc = spawnSync("magick", magickArgs, {
109 maxBuffer: 8 * 1024 * 1024,
110 input: this.buffer
111 });
112
113 return proc.stdout;
114 }
115}
116
117export class Image {

Callers 1

toBufferMethod · 0.95

Calls 1

traceFunction · 0.90

Tested by

no test coverage detected