1 --- xbmc/visualizations/Goom/goom2k4-0/src/pngload.c.orig 2010-02-04 16:58:05.000000000 -0800
2 +++ xbmc/visualizations/Goom/goom2k4-0/src/pngload.c 2010-02-04 17:09:11.000000000 -0800
4 png_set_palette_to_rgb (png_ptr);
6 if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
7 - png_set_gray_1_2_4_to_8 (png_ptr);
8 + png_set_expand_gray_1_2_4_to_8 (png_ptr);
9 else if (color_type == PNG_COLOR_TYPE_GRAY ||
10 color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
11 png_set_gray_to_rgb (png_ptr);
12 --- xbmc/screensavers/rsxs-0.9/src/pngimage.cc.orig 2010-02-04 16:56:46.000000000 -0800
13 +++ xbmc/screensavers/rsxs-0.9/src/pngimage.cc 2010-02-04 17:09:11.000000000 -0800
15 (png_get_color_type(png, pngInfo) == PNG_COLOR_TYPE_GRAY) &&
16 png_get_bit_depth(png, pngInfo) < 8
18 - png_set_gray_1_2_4_to_8(png);
19 + png_set_expand_gray_1_2_4_to_8(png);
20 if (png_get_valid(png, pngInfo, PNG_INFO_tRNS))
21 png_set_tRNS_to_alpha(png);
23 --- xbmc/lib/cximage-6.0/CxImage/ximapng.cpp.orig 2010-02-04 16:52:27.000000000 -0800
24 +++ xbmc/lib/cximage-6.0/CxImage/ximapng.cpp 2010-02-04 17:27:34.000000000 -0800
26 if (info_ptr->num_trans!=0){ //palette transparency
27 if (info_ptr->num_trans==1){
28 if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){
29 - info.nBkgndIndex = info_ptr->trans_values.index;
30 + info.nBkgndIndex = info_ptr->trans_color.index;
32 - info.nBkgndIndex = info_ptr->trans_values.gray>>nshift;
33 + info.nBkgndIndex = info_ptr->trans_color.gray>>nshift;
36 if (info_ptr->num_trans>1){
40 for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++)
41 - pal[ip].rgbReserved=info_ptr->trans[ip];
42 + pal[ip].rgbReserved=info_ptr->trans_alpha[ip];
43 for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){
44 pal[ip].rgbReserved=255;
48 png_color_16 *image_background;
49 if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){
50 - info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_values.red>>nshift);
51 - info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift);
52 - info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_values.blue>>nshift);
53 + info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift);
54 + info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift);
55 + info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_color.blue>>nshift);
56 info.nBkgndColor.rgbReserved = 0;
60 if (info.nBkgndIndex >= 0){
61 info_ptr->num_trans = 1;
62 info_ptr->valid |= PNG_INFO_tRNS;
63 - info_ptr->trans = trans;
64 - info_ptr->trans_values.index = (BYTE)info.nBkgndIndex;
65 - info_ptr->trans_values.red = tc.rgbRed;
66 - info_ptr->trans_values.green = tc.rgbGreen;
67 - info_ptr->trans_values.blue = tc.rgbBlue;
68 - info_ptr->trans_values.gray = info_ptr->trans_values.index;
69 + info_ptr->trans_alpha = trans;
70 + info_ptr->trans_color.index = (BYTE)info.nBkgndIndex;
71 + info_ptr->trans_color.red = tc.rgbRed;
72 + info_ptr->trans_color.green = tc.rgbGreen;
73 + info_ptr->trans_color.blue = tc.rgbBlue;
74 + info_ptr->trans_color.gray = info_ptr->trans_color.index;
76 // the transparency indexes start from 0 for non grayscale palette
77 if (!bGrayScale && head.biClrUsed && info.nBkgndIndex)
79 trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved;
80 info_ptr->num_trans = (WORD)nc;
81 info_ptr->valid |= PNG_INFO_tRNS;
82 - info_ptr->trans = trans;
83 + info_ptr->trans_alpha = trans;
86 // copy the palette colors