http://qs321.pair.com?node_id=11139962


in reply to Re: How to create and save an image from RGB values
in thread How to create and save an image from RGB values

How about the PPM format? It's as simple as e.g. "P6 640 480 255\n" followed by the raw RGB binary data. It can be transformed by ImageMagick to any desired format.

Alternatively, see the write_to_scalar example in Image::PNG::Libpng.

  • Comment on Re^2: How to create and save an image from RGB values

Replies are listed 'Best First'.
Re^3: How to create and save an image from RGB values
by LanX (Saint) on Dec 28, 2021 at 00:59 UTC
    > How about the PPM format?

    Yeah, that's pretty much what I was imagining (no pun intended ;)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery