Re: [hackers] [PATCH] [sent] Quick patch to replace png with farbfeld

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Tue, 17 Nov 2015 17:56:27 +0000

On Tue, Nov 17, 2015 at 05:53:54PM +0100, Markus Teich wrote:
> Dimitris Papastamos wrote:
> > Farbfeld is an intermediate format that is easy to parse and emit. Sent can
> > use pipe + fork + exec. This is similar to how tar handles compressed
> > archives.
> >
> > You will need the farbfeld tools somewhere in your PATH. The tools currently
> > handle conversion between png and ff but there is nothing stopping you from
> > also supporting jpg. This means that sent will also automatically work with
> > jpgs as well.
>
> Heyho,
>
> actually that is exactly the plan. Have an array in config.h where you can
> specify how to convert any file format you want to the only one natively
> supported by sent. When reading an image from a _AT_FILENAME line, sent will
> fork-exec the right tool to convert the input file to farbfeld format for
> display. Then you can even use ff images with whatever compression you like. Any
> improvements on this plan are welcome.

BTW, the filtering code that uses pipe + fork + exec, would probably
make sense to be standalone (i.e. a simple .c that you can copy
around). This doesn't include the code that actually regex matches on
the file type but only the code that presents a program with an fd to
read the uncompressed ff data. This interface also doesn't need to be
ff specific.

Doing this in one direction is enough for sent. The interface could
be bidirectional. This would make it a candidate for inclusion in
sbase and using it in tar(1) for example.
Received on Tue Nov 17 2015 - 18:56:27 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 17 2015 - 19:00:13 CET