AW: AW: Implementing PseudoColor support on TrueColor screens

Walter Harms wharms at bfs.de
Tue Jun 2 15:30:06 UTC 2020


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 <xorg-bounces at lists.x.org> im Auftrag von Sleep <ireallyhatespam at yandex.com>
Gesendet: Dienstag, 2. Juni 2020 16:09:20
An: xorg at lists.x.org
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.
_______________________________________________
xorg at lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s


More information about the xorg mailing list