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>
18 lines
465 B
JavaScript
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) {}
|