Hi all,

I had to save images in BGR;15 format and suddenly found that image
quality unexpectedly and quickly degraded during convertions. Here's
the patch that fixes this problem:

Index: libImaging/Convert.c
===================================================================
--- libImaging/Convert.c        (revision 277)
+++ libImaging/Convert.c        (working copy)
@@ -208,7 +208,7 @@
     UINT16* out = (UINT16*) out_;
     for (x = 0; x < xsize; x++, in += 4)
        *out++ =
-            ((((UINT16)in[0])<<8)&0x7c00) +
+            ((((UINT16)in[0])<<7)&0x7c00) +
             ((((UINT16)in[1])<<2)&0x03e0) +
             ((((UINT16)in[2])>>3)&0x001f);
 }
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to