But - Image Magick ignores `-depth 1' when writing to PCX. Are there
any other automated conversion tools which can create 1-bit PCX?
Thanks,
Ilya
Can't PMView also write 1bit PCX bitmaps?
Anyway, you may want to try with GBM tool gbmbpp.
It is included in the WPI package or gbmos2_164_bin.zip.
Get it from Hobbes or from here: http://heikon.home.tlink.de/
Convert to 1bit Black/White by truncating palette:
gbmbpp -m bw src.bmp dst.pcx
Or with Error Diffusion algorithm:
gbmbpp -m bw -e src.bmp dst.pcx
> Can't PMView also write 1bit PCX bitmaps?
Most probably. Is it scriptable?
> Convert to 1bit Black/White by truncating palette:
> gbmbpp -m bw src.bmp dst.pcx
This works:
convert signature.png -resize 200% -blur 0x4 -depth 1 signature2b.pcx
gbmbpp -m bw signature2b.pcx signature2b-1bit.pcx
It would be nice if one could do it without an intermediate file. Can
gbmbpp read from pipe? (Cannot deduce this from its help message...)
Thanks,
Ilya
To answer my own question: apparently, Image Magick reacts in some
undocumented way to combinations of -depth, -color, -type flags. It
looks like at least 2 of possible combination DO produce B/W PCX:
-depth 1 -colors 2
-depth 1 -colors 2 -type Bilevel
(although the filesize of output is slightly larger than with gbmbpp...).
Yours,
Ilya
The Pro version has built-in batch support.
> convert signature.png -resize 200% -blur 0x4 -depth 1 signature2b.pcx
> gbmbpp -m bw signature2b.pcx signature2b-1bit.pcx
>
> It would be nice if one could do it without an intermediate file. Can
> gbmbpp read from pipe? (Cannot deduce this from its help message...)
No. Some decoders need random access to the complete bitmap data.
Thus the full pipe data would need to be copied initially which
might lead to an early out-of-memory for big images.
You could use a RAM drive for the intermediate files.
That's what I do.