#!/bin/sh realesrgan -i "$1" -o "upscaled_$1" convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "upscaled_$1.jpg" convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "$1.jpg"