Re: Encoding array of 8-bit RGB values to PNG
Randy via png-mng-implement <png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> Tue, 26 Oct 2021 22:51:31 +0000
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <k5Du3r1IvfZmSCUfHYXrsDVS2dipEe0iVqi2v9EyB-nluCOeRgE6NlNv23Dqf6PF9haYdkf5iItmLKEXKQzlwbLR0NFy-vpdtRJcuJhgudw=@protonmail.com> |
To encode with spng you can look at the example code and encoder documentation: https://github.com/randy408/libspng/blob/v0.7.0/examples/example.c#L208 https://libspng.org/docs/encode/ The destination PNG format is set with `spng_set_ihdr()`, truecolor (ie SPNG_COLOR_TYPE_TRUECOLOR) is the equivalent color type to RGB. ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, October 26th, 2021 at 03:24, rndusr <[email protected]> wrote: > Hello, > > I'm interacting with a scanner, and I have a contiguous block of memory > > containing 8-bit RGB data. I'd like to convert this to PNG, and I had a > > look at libspng but I'm not sure how to make it work with my current > > situation. > > Could anyone give me some pointers or reading regarding this issue? > > Regards, > > rndusr > > png-mng-implement mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/png-mng-implement _______________________________________________ png-mng-implement mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/png-mng-implement