ASCIInator/server/lib/imagemagick.js
dev c1cf06ed67 feat: initial commit — ASCIInator v0.1
Vue 3 + Vite + Tailwind frontend, Fastify API server, execa shell bridge.
All components built, server validated, 41 unit tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 19:47:57 +00:00

18 lines
465 B
JavaScript

import { execa } from 'execa'
import { randomUUID } from 'node:crypto'
export async function preprocess(inputPath, format = 'png') {
const outputPath = `/tmp/asciinator-${randomUUID()}-processed.${format}`
await execa('magick', [
inputPath,
'-strip',
'-auto-orient',
'-resize', '2000x2000>',
outputPath,
])
return outputPath
}
// Reserved for future brightness/contrast post-processing
export async function postprocess(_imagePath) {}