[magick-developers] Re: Braille format support
Samuel Thibault
samuel.thibault at ens-lyon.org
Tue Mar 25 17:08:19 PDT 2008
Hello,
Playing a bit with the braille format coder, I realized that one of its
most common use will be to output black on white drawings. I hence
think we should probably invert the polarity, so that the user doesn't
need to use the -negate option most of the time.
Samuel
-------------- next part --------------
Index: coders/braille.c
===================================================================
--- coders/braille.c (r?vision 10411)
+++ coders/braille.c (copie de travail)
@@ -243,10 +243,10 @@
(void) SetImageType(image,BilevelType);
polarity=(IndexPacket)
- (PixelIntensityToQuantum(&image->colormap[0]) < (QuantumRange/2));
+ (PixelIntensityToQuantum(&image->colormap[0]) >= (QuantumRange/2));
if (image->colors == 2)
polarity=(IndexPacket)
- (PixelIntensityToQuantum(&image->colormap[0]) <
+ (PixelIntensityToQuantum(&image->colormap[0]) >=
PixelIntensityToQuantum(&image->colormap[1]));
for (y=0; y < (long) image->rows; y+=cell_height)
{
More information about the Magick-developers
mailing list