* Extended X interface: pixmap objects, colormap objects visual objects,

image objects, and lots of new methods.
* Added counting of allocations and deallocations of builtin types if
  COUNT_ALLOCS is defined.  Had to move calls to NEWREF down in some
  files.
* Bug fix in sorting lists.
This commit is contained in:
Sjoerd Mullender 1993-10-11 12:54:31 +00:00
parent 35fe6ec4cf
commit a9c3c22c33
12 changed files with 150 additions and 18 deletions

View file

@ -542,9 +542,15 @@ imageop_rgb2rgb8(self, args)
for ( i=0; i < nlen; i++ ) {
/* Bits in source: aaaaaaaa BBbbbbbb GGGggggg RRRrrrrr */
value = *cp++;
#if 0
r = (value >> 5) & 7;
g = (value >> 13) & 7;
b = (value >> 22) & 3;
#else
r = (int) ((value & 0xff) / 255. * 7. + .5);
g = (int) (((value >> 8) & 0xff) / 255. * 7. + .5);
b = (int) (((value >> 16) & 0xff) / 255. * 3. + .5);
#endif
nvalue = (r<<5) | (b<<3) | g;
*ncp++ = nvalue;
}