parent
0610a9a48d
commit
7379de160c
@ -0,0 +1,24 @@
|
||||
--- digikam/digikam/libs/dimg/loaders/pngloader.cpp.libpng 2012-05-01 15:02:57.235666444 +0200
|
||||
+++ digikam/digikam/libs/dimg/loaders/pngloader.cpp 2012-05-01 15:04:30.737122439 +0200
|
||||
@@ -408,10 +408,11 @@
|
||||
TQMap<int, TQByteArray>& metaData = imageMetaData();
|
||||
|
||||
png_charp profile_name, profile_data=NULL;
|
||||
+ unsigned char* uprofile_data = reinterpret_cast<unsigned char*>(profile_data);
|
||||
png_uint_32 profile_size;
|
||||
int compression_type;
|
||||
|
||||
- png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &profile_size);
|
||||
+ png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &uprofile_data, &profile_size);
|
||||
|
||||
if (profile_data != NULL)
|
||||
{
|
||||
@@ -607,7 +608,7 @@
|
||||
|
||||
if (!profile_rawdata.isEmpty())
|
||||
{
|
||||
- png_set_iCCP(png_ptr, info_ptr, (png_charp)"icc", PNG_COMPRESSION_TYPE_BASE, profile_rawdata.data(), profile_rawdata.size());
|
||||
+ png_set_iCCP(png_ptr, info_ptr, (png_charp)"icc", PNG_COMPRESSION_TYPE_BASE, (unsigned char*)profile_rawdata.data(), profile_rawdata.size());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
@ -0,0 +1,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))
|
@ -0,0 +1,40 @@
|
||||
--- digikam/digikam/libs/dimg/loaders/pngloader.cpp.ORI 2012-05-01 14:49:41.357985513 +0200
|
||||
+++ digikam/digikam/libs/dimg/loaders/pngloader.cpp 2012-05-01 14:53:47.459349483 +0200
|
||||
@@ -120,7 +120,11 @@
|
||||
// PNG error handling. If an error occurs during reading, libpng
|
||||
// will jump here
|
||||
|
||||
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
|
||||
+ if (setjmp(png_jmpbuf(png_ptr)))
|
||||
+#else
|
||||
if (setjmp(png_ptr->jmpbuf))
|
||||
+#endif
|
||||
{
|
||||
DDebug() << k_funcinfo << "Internal libPNG error during reading file. Process aborted!" << endl;
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||
@@ -526,7 +531,11 @@
|
||||
// PNG error handling. If an error occurs during writing, libpng
|
||||
// will jump here
|
||||
|
||||
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
|
||||
+ if (setjmp(png_jmpbuf(png_ptr)))
|
||||
+#else
|
||||
if (setjmp(png_ptr->jmpbuf))
|
||||
+#endif
|
||||
{
|
||||
DDebug() << k_funcinfo << "Internal libPNG error during writing file. Process aborted!" << endl;
|
||||
fclose(f);
|
||||
--- digikam/digikam/kioslave/digikamthumbnail.cpp.ORI 2012-05-01 15:44:40.237089691 +0200
|
||||
+++ digikam/digikam/kioslave/digikamthumbnail.cpp 2012-05-01 15:45:22.939534916 +0200
|
||||
@@ -392,7 +392,11 @@
|
||||
return qimage;
|
||||
}
|
||||
|
||||
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
|
||||
+ if (setjmp(png_jmpbuf(png_ptr)))
|
||||
+#else
|
||||
if (setjmp(png_ptr->jmpbuf))
|
||||
+#endif
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||
fclose(f);
|
@ -0,0 +1,47 @@
|
||||
diff -uNrb digikam.orig/digikam/digikam/albummanager.cpp digikam/digikam/digikam/albummanager.cpp
|
||||
--- digikam.orig/digikam/digikam/albummanager.cpp 2012-02-21 18:52:03.000000000 -0600
|
||||
+++ digikam/digikam/digikam/albummanager.cpp 2012-04-19 16:42:29.951033101 -0500
|
||||
@@ -1579,16 +1579,16 @@
|
||||
|
||||
// Check if Year Album already exist.
|
||||
DAlbum *yAlbum = 0;
|
||||
- AlbumIterator it(d->rootDAlbum);
|
||||
- while (it.current())
|
||||
+ AlbumIterator it2(d->rootDAlbum);
|
||||
+ while (it2.current())
|
||||
{
|
||||
- DAlbum* a = (DAlbum*)(*it);
|
||||
+ DAlbum* a = (DAlbum*)(*it2);
|
||||
if (a->date() == TQDate(year, 1, 1) && a->range() == DAlbum::Year)
|
||||
{
|
||||
yAlbum = a;
|
||||
break;
|
||||
}
|
||||
- ++it;
|
||||
+ ++it2;
|
||||
}
|
||||
|
||||
// If no, create Year album.
|
||||
diff -uNrb digikam.orig/digikam/kioslave/digikamthumbnail.cpp digikam/digikam/kioslave/digikamthumbnail.cpp
|
||||
--- digikam.orig/digikam/kioslave/digikamthumbnail.cpp 2012-04-19 07:02:43.000000000 -0500
|
||||
+++ digikam/digikam/kioslave/digikamthumbnail.cpp 2012-04-19 16:44:10.307517462 -0500
|
||||
@@ -413,16 +413,16 @@
|
||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_expand(png_ptr);
|
||||
|
||||
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||
+ if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||
has_alpha = 1;
|
||||
|
||||
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||
+ if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||
{
|
||||
has_alpha = 1;
|
||||
has_grey = 1;
|
||||
}
|
||||
|
||||
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
|
||||
+ if (color_type == PNG_COLOR_TYPE_GRAY)
|
||||
has_grey = 1;
|
||||
|
||||
unsigned char **lines;
|
Loading…
Reference in new issue