blob: e7a161dbc9b336f76d0df73765544b6d9fa29924 [file] [log] [blame]
http://repos.archlinux.org/wsvn/packages/digikam/trunk/libpng14.patch
--- libs/dimg/loaders/pngloader.cpp
+++ libs/dimg/loaders/pngloader.cpp
@@ -105,7 +105,7 @@
unsigned char buf[PNG_BYTES_TO_CHECK];
size_t membersRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
- if ((membersRead != PNG_BYTES_TO_CHECK) || !png_check_sig(buf, PNG_BYTES_TO_CHECK))
+ if ((membersRead != PNG_BYTES_TO_CHECK) || png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
{
kDebug() << "Not a PNG image file.";
fclose(f);
@@ -322,7 +322,7 @@
#ifdef ENABLE_DEBUG_MESSAGES
kDebug() << "PNG in PNG_COLOR_TYPE_GRAY";
#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 (QSysInfo::ByteOrder == QSysInfo::LittleEndian) // Intel
--- libs/threadimageio/thumbnailbasic.cpp
+++ libs/threadimageio/thumbnailbasic.cpp
@@ -137,7 +137,7 @@
unsigned char buf[PNG_BYTES_TO_CHECK];
size_t itemsRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
- if (itemsRead != 1 || !png_check_sig(buf, PNG_BYTES_TO_CHECK))
+ if (itemsRead != 1 || png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
{
fclose(f);
return qimage;
@@ -232,7 +232,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);