Lince M Lawrence wrote:
>
> I will explain...
>
> We do "convert -antialias -transparent white -trim -depth 16 -colors
> 16 $1 $2" and we get... (in Image Magic)
> ==============================================
> Image: si1.gif
> Format: GIF (CompuServe graphics interchange format)
> Geometry: 7x7
> Class: PseudoClass
> Type: grayscale with transparency
> Depth: 8 bits-per-pixel component
> Colors: 16
> [snip]
>
> But.. we want...
> ==============================================
> Image: si1finished.gif
> Format: GIF (CompuServe graphics interchange format)
> Geometry: 9x7
> Class: PseudoClass
> Type: palette with transparency
> Depth: 8 bits-per-pixel component
> Colors: 16
> 0: ( 0, 0, 0) opaque
> 1: ( 8224, 8224, 8224) #202020
> 2: (24415,24415,24415) #5f5f5f
> 3: (42148,42148,42148) #a4a4a4
> 4: (53970,53970,53970) #d2d2d2
> 5: (59110,59110,59110) #e6e6e6
> 6: (63479,63479,63479) grey97
> 7: (65535,65535,65535) white
> 8: (32896,32896,32896) #808080
> 9: (65535, 0, 0) red
> 10: ( 0,65535, 0) #00ff00
> 11: (65535,65535, 0) yellow
> 12: ( 0, 0,65535) blue
> 13: (65535, 0,65535) #ff00ff
> 14: ( 0,65535,65535) cyan
> 15: (65535,65535,65535) white
> [snip]
>
> This result is obtained by another batch process in GraphicConverter
> after the comand-line batch in Magic. Will I get this in a single
> step? What change should I make in the command.
I'm sure you *can* get the image parameters you want in ImageMagick. I'm
no IM expert, however, so I'm not sure how. You may be better off asking
this question on the ImageMagick "Users" mailing list. See
mailto:magick-users@imagemagick.org
http://www.imagemagick.org/www/magick-list.html
One thing that occurs to me: why did you set "-depth 16" above? This
appears to have persuaded IM to create a gray-scale image.
I just went through the exercise of saving an EPS file (test.eps) from
IDL then converting it to GIF format with
convert -verbose -antialias -transparent white -colors 16 test.eps
test16.gif
(For some reason I need the -verbose option here. Without it, IM opens
the Ghostscript interpreter but does not run it. Odd.)
This creates a reasonable-looking, if coarse, 16-colour GIF--see outpt
below my signature from
identify -verbose test16.gif
Or do you want a specific set of 16 colours? I'm sure this can be done
too, but I don't know how.
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Image: test16.gif
Format: GIF (CompuServe graphics interchange format)
Geometry: 387x344
Class: PseudoClass
Colorspace: RGB
Type: PaletteMatte
Depth: 8 bits
Endianess: Undefined
Channel depth:
Red: 8-bits
Green: 8-bits
Blue: 8-bits
Opacity: 1-bits
Channel statistics:
Red:
Min: 3
Max: 255
Mean: 160.822
Standard deviation: 110.361
Green:
Min: 4
Max: 255
Mean: 179.791
Standard deviation: 94.0356
Blue:
Min: 3
Max: 255
Mean: 175.115
Standard deviation: 100.59
Opacity:
Min: 0
Max: 255
Mean: 130.553
Standard deviation: 127.464
Colors: 16
0: ( 44, 15, 50, 0) #2C0F3200
1: ( 4, 4,162, 0) #0404A200
2: ( 4, 23,223, 0) #0417DF00
3: ( 3, 97,162, 0) #0361A200
4: ( 17, 72,197, 0) #1148C500
5: ( 3,161,100, 0) #03A16400
6: ( 18,227, 21, 0) #12E31500
7: ( 99,164, 3, 0) #63A40300
8: ( 35,199, 47, 0) #23C72F00
9: (164,103, 4, 0) #A4670400
10: (227, 22, 4, 0) #E3160400
11: (172, 24, 8, 0) #AC180800
12: (255,255,255, 0) grey100
13: (208,208,208, 0) #D0D0D000
14: (173,173,173, 0) grey68
15: ( 77,137, 73, 0) #4D894900
Histogram:
4088: ( 44, 15, 50, 0) #2C0F3200
3623: ( 4, 4,162, 0) #0404A200
8943: ( 4, 23,223, 0) #0417DF00
5643: ( 3, 97,162, 0) #0361A200
4040: ( 17, 72,197, 0) #1148C500
6851: ( 3,161,100, 0) #03A16400
7489: ( 18,227, 21, 0) #12E31500
3466: ( 35,199, 47, 0) #23C72F00
5424: ( 99,164, 3, 0) #63A40300
406: ( 77,137, 73, 0) #4D894900
3156: (172, 24, 8, 0) #AC180800
4675: (164,103, 4, 0) #A4670400
5461: (227, 22, 4, 0) #E3160400
994: (173,173,173, 0) grey68
711: (208,208,208, 0) #D0D0D000
68158: (255,255,255,255) #FFFFFFFF
Rendering-intent: Undefined
Resolution: 72x72
Units: Undefined
Filesize: 15kb
Interlace: None
Background Color: grey100
Border Color: #DFDFDF00
Matte Color: grey74
Page geometry: 387x344+0+0
Dispose: Undefined
Compression: LZW
Orientation: Undefined
comment: Image generated by AFPL Ghostscript (device=pnmraw)
signature:
3f0fad2b87d2cf9f9a0dba6186899f0cc91c7d0b3e8472282d3e25ae94b3 43bb
Tainted: False
User Time: 0.000u
Elapsed Time: 0:01
|