Need help to improve special scanned images

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?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Need help to improve special scanned images

Post by fmw42 »

!)Adding "-transparent color" increases the image bit depth form 1 to 32. How can it be fixed? The final png image only contains a black color and transparent, that requires one bit depth(2 different colors). If impossible, then how could the bit depth be decreased to 4 instead of 1?
2)How can I change the image distinct black color darker? It has now a gray level and I want it be pure black?
1) IM support of PNG formats is limited, if not PNG32. See http://www.imagemagick.org/Usage/formats/#png_formats

You can try saving as PNG8:yourimage.png

or try using GIF.

Others may be able to help further.

2) I am not sure what you want or what you image looks like.

You can try -black-threshold XX% or -black-threshold XX where the latter is graylevel measure per your Quantum Depth compile of IM (Q8 0-255, Q16 0-65535)

See http://www.imagemagick.org/script/comma ... -threshold

Otherwise, post a link to your image
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Need help to improve special scanned images

Post by Drarakel »

Saving transparent images as palette PNG (overall bitdepth lower than 32) is possible with some older ImageMagick versions. But not with a current version. (Trying that usually results in losing the alpha channel.) You should indeed check out the 'non-ImageMagick PNG' tools like pngout or OptiPNG. It's recommended anyway to process your final PNG output files with one of these tools if you want them to be smaller.
amirian

Re: Need help to improve special scanned images

Post by amirian »

Drarakel wrote:Saving transparent images as palette PNG (overall bitdepth lower than 32) is possible with some older ImageMagick versions. But not with a current version. (Trying that usually results in losing the alpha channel.) You should indeed check out the 'non-ImageMagick PNG' tools like pngout or OptiPNG. It's recommended anyway to process your final PNG output files with one of these tools if you want them to be smaller.
Thanks, I succeeded using pngquant. But this is too bad that IM ability reduces while its version goes up!
Post Reply