a assume this is intentional backwards ?
for (int x = width-1; x >= 0; x--) {if st2d_8to24table contains no rubbish the colors should be ok now, are they ? what means "squashed image" ? a scaling problem ? To make things more easy to debug, can you save image->data where you know what who that should look like ? then you can play with a simple display code instead of that. re, wh ________________________________________ Von: xorg <[email protected]> im Auftrag von Sleep <[email protected]> Gesendet: Dienstag, 2. Juni 2020 16:09:20 An: [email protected] Betreff: Re: AW: Implementing PseudoColor support on TrueColor screens Thank you very much, Walter. st3_fixup() (adapted for my use) is a lot more readable now: void st3_fixup(XImage *image, int width, int height) { uint8_t *row_src; for (int y = 0; y < height; y++) { row_src = (uint8_t *)&image->data [y * image->bytes_per_line]; for (int x = width-1; x >= 0; x--) { XPutPixel(image, x, y, st2d_8to24table[row_src[x]]); } } } The issue I am having persists, just letting you know that you have helped me on something, again, thank you a lot. _______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s _______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
