updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / boxee-source / libpng.patch
blobc60741c899bdbb993a38882514dedc609f38e251
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
3 @@ -94,7 +94,7 @@
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
14 @@ -65,7 +65,7 @@
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);
22 if (fullColor)
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
25 @@ -144,9 +144,9 @@
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;
31 } else{
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){
37 @@ -154,7 +154,7 @@
38 if (pal){
39 DWORD ip;
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;
46 @@ -168,9 +168,9 @@
47 int num_trans;
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;
57 info.nBkgndIndex = 0;
59 @@ -421,12 +421,12 @@
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)
78 @@ -447,7 +447,7 @@
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