Re: Braille format support
Samuel Thibault <[email protected]> Wed, 26 Mar 2008 00:08:19 +0000
| Newsgroups | gmane.comp.video.image-magick.devel |
|---|---|
| Message-ID | <20080326000819.GF4695@implementation> |
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 _______________________________________________ Magick-developers mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-developers
patch
(text/plain, 689 B)
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)
{