Here is a cubic (catmull-rom) resizing filter for farbfeld:
https://github.com/ender672/farbfeld-resize

Example usage is:
$ jpg2ff < in.jpg | ./resize 123 456 | ff2png > out.png

The arguments indicate the desired maximum height and width. The image
above will be resized to fit inside a 123x456 box while preserving the
aspect ratio.

It has no external dependencies, but includes a single-file library to
perform resampling.

Interpolation happens with 8-bit components, so this filter truncates
16-bit colors to 8-bit, resamples, and then scales 8-bit colors back
up.

I could look into supporting 16-bit colors in the interpolator, but
would be curious what the use cases are first.

Reply via email to