You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.6 KiB
65 lines
2.6 KiB
13 years ago
|
commit 3e27b07ff572b00aa5f013f039c3f63593016816
|
||
|
Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
|
||
|
Date: 1326324999 -0600
|
||
|
|
||
|
Fix FTBFS due to png code
|
||
|
This closes Bug 595
|
||
13 years ago
|
|
||
13 years ago
|
diff --git a/digikam/kioslave/digikamthumbnail.cpp b/digikam/kioslave/digikamthumbnail.cpp
|
||
|
index 33ba573..96cba8e 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];
|
||
|
|
||
13 years ago
|
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;
|
||
13 years ago
|
@@ -465,7 +465,7 @@ TQImage kio_digikamthumbnailProtocol::loadPNG(const TQString& path)
|
||
13 years ago
|
{
|
||
|
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);
|
||
|
}
|
||
13 years ago
|
|
||
13 years ago
|
int sizeOfUint = sizeof(unsigned int);
|
||
13 years ago
|
diff --git a/digikam/libs/dimg/loaders/pngloader.cpp b/digikam/libs/dimg/loaders/pngloader.cpp
|
||
|
index ac1fcf8..3367561 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)
|
||
13 years ago
|
unsigned char buf[PNG_BYTES_TO_CHECK];
|
||
13 years ago
|
|
||
13 years ago
|
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);
|
||
13 years ago
|
@@ -252,7 +252,7 @@ bool PNGLoader::load(const TQString& filePath, DImgLoaderObserver *observer)
|
||
13 years ago
|
#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);
|
||
13 years ago
|
|
||
13 years ago
|
if (TQImage::systemByteOrder() == TQImage::LittleEndian) // Intel
|
||
13 years ago
|
diff --git a/digikam/libs/greycstoration/CImg.h b/digikam/libs/greycstoration/CImg.h
|
||
|
index e240f99..714920e 100644
|
||
|
--- a/digikam/libs/greycstoration/CImg.h
|
||
|
+++ b/digikam/libs/greycstoration/CImg.h
|
||
|
@@ -29449,7 +29449,7 @@ namespace cimg_library {
|
||
13 years ago
|
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))
|