Compose a new image having all the pixel infos

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
DDJ

Compose a new image having all the pixel infos

Post 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!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply