summaryrefslogtreecommitdiffstats
path: root/redhat/applications/digikam/digikam-3.5.13-fix_libpng_1.4.patch
blob: a07b5ba6fc8813602b410bce41059c32231fa4d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff -ruN digikam-0.9.6.old/digikam/kioslave/digikamthumbnail.cpp digikam-0.9.6/digikam/kioslave/digikamthumbnail.cpp
--- digikam-0.9.6.old/digikam/kioslave/digikamthumbnail.cpp 2009-07-03 07:19:41.000000000 +0200
+++ digikam-0.9.6/digikam/kioslave/digikamthumbnail.cpp 2010-06-30 10:29:09.000000000 +0200
@@ -370,7 +370,7 @@
     unsigned char buf[PNG_BYTES_TO_CHECK];

     fread(buf, 1, PNG_BYTES_TO_CHECK, f);
-    if (!png_check_sig(buf, PNG_BYTES_TO_CHECK))
+    if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
     {
         fclose(f);
         return qimage;
@@ -465,7 +465,7 @@
     {
         png_set_gray_to_rgb(png_ptr);
         if (png_get_bit_depth(png_ptr, info_ptr) < 8)
-            png_set_gray_1_2_4_to_8(png_ptr);
+            png_set_expand_gray_1_2_4_to_8(png_ptr);
     }

     int sizeOfUint = sizeof(unsigned int);
diff -ruN digikam-0.9.6.old/digikam/libs/dimg/loaders/pngloader.cpp digikam-0.9.6/digikam/libs/dimg/loaders/pngloader.cpp
--- digikam-0.9.6.old/digikam/libs/dimg/loaders/pngloader.cpp 2009-07-03 07:19:41.000000000 +0200
+++ digikam-0.9.6/digikam/libs/dimg/loaders/pngloader.cpp 2010-06-30 10:28:24.000000000 +0200
@@ -88,7 +88,7 @@
     unsigned char buf[PNG_BYTES_TO_CHECK];

     fread(buf, 1, PNG_BYTES_TO_CHECK, f);
-    if (!png_check_sig(buf, PNG_BYTES_TO_CHECK))
+    if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
     {
         DDebug() << k_funcinfo << "Not a PNG image file." << endl;
         fclose(f);
@@ -252,7 +252,7 @@
 #ifdef ENABLE_DEBUG_MESSAGES
                 DDebug() << "PNG in PNG_COLOR_TYPE_GRAY" << endl;
 #endif
-                png_set_gray_1_2_4_to_8(png_ptr);
+                png_set_expand_gray_1_2_4_to_8(png_ptr);
                 png_set_gray_to_rgb(png_ptr);

                 if (TQImage::systemByteOrder() == TQImage::LittleEndian)       // Intel
diff -ruN digikam-0.9.6.old/digikam/libs/greycstoration/CImg.h digikam-0.9.6/digikam/libs/greycstoration/CImg.h
--- digikam-0.9.6.old/digikam/libs/greycstoration/CImg.h  2009-07-03 07:19:41.000000000 +0200
+++ digikam-0.9.6/digikam/libs/greycstoration/CImg.h  2010-06-30 10:28:52.000000000 +0200
@@ -29449,7 +29449,7 @@
         new_bit_depth = 8;
       }
       if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
         new_bit_depth = 8;
       }
       if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))