openbsd-ports/graphics/digikam/patches/patch-digikam_kioslave_digikamthumbnail_cpp
2011-07-08 20:47:26 +00:00

45 lines
1.5 KiB
Plaintext

$OpenBSD: patch-digikam_kioslave_digikamthumbnail_cpp,v 1.1 2011/07/08 20:47:26 naddy Exp $
Fix build with png-1.5.
--- digikam/kioslave/digikamthumbnail.cpp.orig Tue Jul 5 16:03:30 2011
+++ digikam/kioslave/digikamthumbnail.cpp Tue Jul 5 16:18:05 2011
@@ -392,7 +392,7 @@ QImage kio_digikamthumbnailProtocol::loadPNG(const QSt
return qimage;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
fclose(f);
@@ -413,16 +413,16 @@ QImage kio_digikamthumbnailProtocol::loadPNG(const QSt
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_expand(png_ptr);
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
has_alpha = 1;
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
{
has_alpha = 1;
has_grey = 1;
}
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY)
has_grey = 1;
unsigned char **lines;
@@ -465,7 +465,7 @@ QImage kio_digikamthumbnailProtocol::loadPNG(const QSt
{
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);