"Roderick Colenbrander" thunderbird2k@gmx.net writes:
for (x = 0; x < len; x++) {/* Retrieve RGB24 color */DWORD color = *((DWORD*)src);/* Store the RGB portion in dest and reserve a byte for alpha */*Dest = color << 8;if ((color < surf->SrcBltCKey.dwColorSpaceLowValue) ||(color > surf->SrcBltCKey.dwColorSpaceHighValue))*Dest |= 0xff;src += 3;
You should avoid unaligned DWORD accesses, this doesn't work on all platforms.