IMG_xcf.c
changeset 365 ce8091caddf3
parent 347 ad5034cad524
child 367 b2aa197f6774
     1.1 --- a/IMG_xcf.c	Tue Apr 16 09:33:51 2013 -0700
     1.2 +++ b/IMG_xcf.c	Wed Apr 17 01:45:53 2013 -0700
     1.3 @@ -520,9 +520,9 @@
     1.4  
     1.5  static Uint32 rgb2grey (Uint32 a) {
     1.6    Uint8 l;
     1.7 -  l = (Uint8)(0.2990 * ((a && 0x00FF0000) >> 16)
     1.8 -    + 0.5870 * ((a && 0x0000FF00) >>  8)
     1.9 -    + 0.1140 * ((a && 0x000000FF)));
    1.10 +  l = (Uint8)(0.2990 * ((a & 0x00FF0000) >> 16)
    1.11 +    + 0.5870 * ((a & 0x0000FF00) >>  8)
    1.12 +    + 0.1140 * ((a & 0x000000FF)));
    1.13  
    1.14    return (l << 16) | (l << 8) | l;
    1.15  }