comparison gui/mplayer/gui_common.c @ 33534:22c3241467b3

Remove function Normalize(). This function changed ARGB data as if it had been RGB24 data (not quite correctly) converted to ARGB with all colors transparent. Instead now, set the alpha channel for RGB24 data and leave ARGB data untouched. For X11, the alpha channel is disregarded, so both approaches are equal, but the new one is more intelligible as we get correct ARGB PNG data. For legacy reasons, all kind of fuchsia/magenta must be treated as transparent, because some skins are using at least both full opaque and full transparent fuchsia/magenta for transparency.
author ib
date Thu, 16 Jun 2011 11:19:15 +0000
parents d2e61ef877d2
children ba473335e68b
comparison
equal deleted inserted replaced
33533:3552dac79b1a 33534:22c3241467b3
331 #if 1 331 #if 1
332 for (iy = y; iy < (int)(y + bf->Height / max); iy++) 332 for (iy = y; iy < (int)(y + bf->Height / max); iy++)
333 for (ix = x; ix < (int)(x + bf->Width); ix++) { 333 for (ix = x; ix < (int)(x + bf->Width); ix++) {
334 tmp = drw[i++]; 334 tmp = drw[i++];
335 335
336 if (tmp != TRANSPARENT) 336 if (!IS_TRANSPARENT(tmp))
337 buf[iy * image_width + ix] = tmp; 337 buf[iy * image_width + ix] = tmp;
338 } 338 }
339 #else 339 #else
340 yc = y * image_width; 340 yc = y * image_width;
341 341
342 for (iy = y; iy < (int)(y + bf->Height / max); iy++) { 342 for (iy = y; iy < (int)(y + bf->Height / max); iy++) {
343 for (ix = x; ix < (int)(x + bf->Width); ix++) { 343 for (ix = x; ix < (int)(x + bf->Width); ix++) {
344 tmp = drw[i++]; 344 tmp = drw[i++];
345 345
346 if (tmp != TRANSPARENT) 346 if (!IS_TRANSPARENT(tmp))
347 buf[yc + ix] = tmp; 347 buf[yc + ix] = tmp;
348 } 348 }
349 349
350 yc += image_width; 350 yc += image_width;
351 } 351 }
369 369
370 for (iy = y; iy < (int)(y + bf->Height); iy++) { 370 for (iy = y; iy < (int)(y + bf->Height); iy++) {
371 for (ix = x; ix < (int)(x + w); ix++) { 371 for (ix = x; ix < (int)(x + w); ix++) {
372 tmp = drw[i++]; 372 tmp = drw[i++];
373 373
374 if (tmp != TRANSPARENT) 374 if (!IS_TRANSPARENT(tmp))
375 buf[iy * image_width + ix] = tmp; 375 buf[iy * image_width + ix] = tmp;
376 } 376 }
377 377
378 i += r; 378 i += r;
379 } 379 }