Problems with TransferImage() function in multiVis.c
The current implementation of TransferImage() function uses RGB masks for calculation of new pixel only when the number of map entries is 16 for true color. As a result Red and Blue values are swapped around on some X servers.
Possible fix: TransferImage() should use RGB masks for all true color modes.
Patch:
@@ -339,8 +339,6 @@ { old_pixel = XGetPixel(reg_image,j,i) ; - if( reg->vis->map_entries == 16) { - red_ind = (old_pixel & reg->vis->red_mask) >> rShift ; green_ind = (old_pixel & reg->vis->green_mask) >> gShift ; blue_ind = (old_pixel & reg->vis->blue_mask) >> bShift ; @@ -350,9 +348,6 @@ |((colors[green_ind].green >> 8) << GREEN_SHIFT) |((colors[blue_ind].blue >> 8) << BLUE_SHIFT) ); - } - else - new_pixel = old_pixel; XPutPixel(target_image,dst_x+j, dst_y+i,new_pixel);