that was silliness - convert then memcpy anyway.

SVN revision: 26297
This commit is contained in:
Carsten Haitzler 2006-10-02 10:37:13 +00:00
parent b8606a2712
commit f458cf8448
1 changed files with 6 additions and 7 deletions

View File

@ -713,16 +713,15 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
pe = ps + len;
for (ps; ps < pe; ps++)
{
int r, g, b, a;
unsigned int r, g, b, a;
a = (*ps >> 24) & 0xff;
r = (*ps >> 16) & 0xff;
g = (*ps >> 8) & 0xff;
b = (*ps ) & 0xff;
*pd = (a << 24) | (((r * a) / 255) << 16) | (((g * a) / 255) << 8) | (((b * a) / 255));
r = (((*ps >> 16) & 0xff) * a) / 255;
g = (((*ps >> 8) & 0xff) * a) / 255;
b = (((*ps ) & 0xff) * a) / 255;
*pd = (a << 24) | (r << 16) | (g << 8) | (b);
pd++;
}
memcpy(((*icon)[i]).data, src, len * sizeof(unsigned int));
p += (len + 2);
}