Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
el_supremo
Posts: 1015 Joined: 2005-03-21T21:16:57-07:00
Post
by el_supremo » 2008-04-22T08:03:44-07:00
The result of the command:
Code: Select all
convert logo: -format "%[pixel:u.p{0,0}]" info:
is
Is there some way to force the output so that it is always in rgb() format?
Thanks
Pete
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2008-04-22T09:37:07-07:00
Try:
convert logo: -format "rgb(%[fx:255.0*u.p{0,0}.r],%[fx:255.0*u.p{0,0}.g],%[fx:255.0*u.p{0,0}.b])" info:
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Post
by anthony » 2008-06-05T18:35:09-07:00
Alturnativeally...
Code: Select all
convert logo: -crop 1x1+0+0 -depth 8 txt:-
# ImageMagick pixel enumeration: 1,1,255,rgb
0,0: (255,255,255) #FFFFFF white
the color in parenthesis is either rgb or rgba (depending on transparency. Whcih form is specified in the output files header
See Im examples, TXT:
http://imagemagick.org/Usage/files/#txt