[dev] [farbfeld] cubic resizing filter

From: Tim Elliott <tle_AT_holymonkey.com>
Date: Sat, 30 Jan 2016 10:37:49 -0800

Here is a cubic (catmull-rom) resizing filter for farbfeld:

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

I could look into supporting 16-bit colors in the interpolator, but
would be curious what the use cases are first.
Received on Sat Jan 30 2016 - 19:37:49 CET

This archive was generated by hypermail 2.3.0 : Sat Jan 30 2016 - 19:48:10 CET