Re: [Fractdev] Xfractint color cycling
Hi Jonathan,
That actually looks like a palette change to me. But, I don't speak Windows.
It's not a REAL palette change. I just have an array of RGB values for each iteration and I rotate this artificial palette. I then write the new value to each pixel (I may have forgotten to put this code segment into the original message. If I did, I apologise). So here is the rest of it: local_width = WIDTHBYTES((DWORD)width * (DWORD)bits_per_pixel); for (j = 0; j < height - 1; ++j) { i = ((long) (height - 1 - j) * (long) (local_width + 3 - ((local_width - 1) % 4))); k = ((long) (height - 2 - j) * (long) (width + 3 - ((width - 1) % 4))); for (m = 0L; m < width; ++m) { colour = (DWORD) (*(wpixels + k + m)); if (!TrueColourFlag) colour &= 0x000000ff; n = colour + colour + colour; pointer = m + m + m + i; *(pixels + pointer + 0) = *(PalettePtr + n + 2); *(pixels + pointer + 1) = *(PalettePtr + n + 1); *(pixels + pointer + 2) = *(PalettePtr + n + 0); } } Hence you can see that I am actually updating each pixel every step of the rotation. Regards, Paul. ---------------------------------------------------------- Paul de Leeuw Computers Central Coast Australia Email: pdeleeuw@deleeuw.com.au www: http://www.deleeuw.com.au ABN 72 360 822 562 ----------------------------------------------------------
participants (1)
-
pdeleeuw