Page 1 of 1

Compose a new image having all the pixel infos

Posted: 2006-10-31T06:38:48-07:00
by DDJ
Hello, is there a way to compose an image with ImageMagick having all the pixel infos? What I mean is something similar to the function "imagesetpixel" found in GD where I can compose an image pixel by pixel...

Thanks for any help!

Posted: 2006-10-31T17:42:42-07:00
by anthony
yes it is called ImageMagick Enumerated Image Format...

Just feed a plain text file to IM using the same header as a 'txt:' output.

EG: convert rose: txt:-

See IM Examples, File Handling, Special File Formats, txt:
http://www.cit.gu.edu.au/~anthony/graph ... files/#txt

An altrunative is to specify the pixels in one of the simplier plain text NetPBM image formats.
This is just an identifier P1 to P3 followed by numbers specifying image size, quality, and of course the pixel values. However this format must specify ALL the pixels and only in the standard row by row order.

The "txt:" format does not have that restriction as each line can specify any pixel value in any order. Undefined pixels default to black.