Re: Encoding array of 8-bit RGB values to PNG
rndusr <[email protected]> Tue, 26 Oct 2021 18:10:00 -0500
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <[email protected]> |
I got it to work. I used some code in this article: https://www.lemoda.net/c/write-png/ Thank you for your help. On 10/26/21 17:51, Randy via png-mng-implement wrote: > 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 > _______________________________________________ png-mng-implement mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/png-mng-implement