git ssb

1+

cel / pngspark



Tree: 5fdd8756359433583b7e3aea100e9cf6a2b4436b

Files: 5fdd8756359433583b7e3aea100e9cf6a2b4436b / Readme.md

1010 bytesRaw

pngspark

Sparklines as PNGs.

Install

make
[sudo] make install [PREFIX=/usr/local]

Usage

pngspark [-h height] [-c color] [-s scaling] output.png

Options

API

struct pngspark;

A png spark instance: collection of values and settings.

int pngspark_init(struct pngspark *ps, size_t height, const char *color, double scaling);

Initialize a pngspark struct.

int pngspark_append(struct pngspark *ps, double, value);

Append a value to the pngspark.

int pngspark_write(struct pngspark *ps, FILE *file);

Process the values and write as a PNG to a file.

int pngspark_end(struct pngspark *ps);

Release allocated memory for the pngspark. (Does not free ps, however).

License

MIT

Built with git-ssb-web