diff options
author | Timothy Pearson <[email protected]> | 2012-01-11 17:36:39 -0600 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2012-06-28 02:54:13 +0200 |
commit | ff9fe94dc2819c5b12c3392dd77676e066c7517d (patch) | |
tree | 2181880aeb3d237b3a37ca20d690ecb4a71b37d1 | |
parent | cfbdd5b7e54804b9655b60d38b5dc928e75aff2e (diff) | |
download | digikam-ff9fe94dc2819c5b12c3392dd77676e066c7517d.tar.gz digikam-ff9fe94dc2819c5b12c3392dd77676e066c7517d.zip |
Fix FTBFS due to png code
This closes Bug 595
(cherry picked from commit 3e27b07ff572b00aa5f013f039c3f63593016816)
-rw-r--r-- | digikam/kioslave/digikamthumbnail.cpp | 4 | ||||
-rw-r--r-- | digikam/libs/dimg/loaders/pngloader.cpp | 4 | ||||
-rw-r--r-- | digikam/libs/greycstoration/CImg.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/digikam/kioslave/digikamthumbnail.cpp b/digikam/kioslave/digikamthumbnail.cpp index 33ba573f..96cba8e0 100644 --- a/digikam/kioslave/digikamthumbnail.cpp +++ b/digikam/kioslave/digikamthumbnail.cpp @@ -370,7 +370,7 @@ TQImage kio_digikamthumbnailProtocol::loadPNG(const TQString& path) 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 @@ TQImage kio_digikamthumbnailProtocol::loadPNG(const TQString& path) { 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 --git a/digikam/libs/dimg/loaders/pngloader.cpp b/digikam/libs/dimg/loaders/pngloader.cpp index ac1fcf83..33675617 100644 --- a/digikam/libs/dimg/loaders/pngloader.cpp +++ b/digikam/libs/dimg/loaders/pngloader.cpp @@ -88,7 +88,7 @@ bool PNGLoader::load(const TQString& filePath, DImgLoaderObserver *observer) 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 @@ bool PNGLoader::load(const TQString& filePath, DImgLoaderObserver *observer) #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 --git a/digikam/libs/greycstoration/CImg.h b/digikam/libs/greycstoration/CImg.h index e240f998..714920ea 100644 --- a/digikam/libs/greycstoration/CImg.h +++ b/digikam/libs/greycstoration/CImg.h @@ -29449,7 +29449,7 @@ namespace cimg_library { 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)) |