[Cialug] C code for conversion between PPM and PNG files

James Shoemaker james at dhlake.com
Tue Jan 25 10:39:18 CST 2011


On 01/25/2011 10:15 AM, Morris Dovey wrote:
> I've been modeling behavior of directly solar-powered (non-electrical)
> engines and wrote some C code to allow me to "plot" into a graphics
> file. I've put one of my test programs and a couple of sample plots at
>
>     http://www.iedu.com/DeSoto/Misc/Plot/
>
> so you can have some context. The initial code seems to be working, but
> (for simplicity) I'm creating PPM files that I pull into a graphics
> editor and save as PNG files.
>
> What I'd like is _minimal_ standard-conforming (for portability) C code
> to convert PPM files to PNG and vice versa that I can share freely with
> R&D teams working on the same project around the world to make it easier
> for them to share and publish their findings.
>
> I've searched without found anything suitable - and before I jump off
> the deep end to re-invent this wheel, I thought I'd see if anyone here
> has (or is aware of) a solution.

    How about the source to pnmtopng?  it's available with an open 
source license, just include it.

James



More information about the Cialug mailing list