head 1.7; access; symbols pkgsrc-2013Q2:1.7.0.4 pkgsrc-2013Q2-base:1.7 pkgsrc-2012Q4:1.7.0.2 pkgsrc-2012Q4-base:1.7 pkgsrc-2011Q4:1.6.0.8 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q3:1.6.0.6 pkgsrc-2011Q3-base:1.6 pkgsrc-2011Q2:1.6.0.4 pkgsrc-2011Q2-base:1.6 pkgsrc-2011Q1:1.6.0.2 pkgsrc-2011Q1-base:1.6 pkgsrc-2010Q4:1.3.0.6 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.4 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.2 pkgsrc-2010Q2-base:1.3 pkgsrc-2009Q4:1.2.0.22 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.20 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.18 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.16 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.14 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.12 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.10 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.8 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.6 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.4 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.2 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.1.0.6 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.4 pkgsrc-2006Q2-base:1.1 pkgsrc-2006Q1:1.1.0.2 pkgsrc-2006Q1-base:1.1; locks; strict; comment @# @; 1.7 date 2012.03.19.23.32.15; author markd; state dead; branches; next 1.6; 1.6 date 2011.02.14.18.24.00; author wiz; state Exp; branches; next 1.5; 1.5 date 2011.02.07.00.30.07; author wiz; state Exp; branches; next 1.4; 1.4 date 2011.02.06.16.14.04; author wiz; state Exp; branches; next 1.3; 1.3 date 2010.06.13.22.44.35; author wiz; state Exp; branches; next 1.2; 1.2 date 2006.12.03.05.07.08; author markd; state dead; branches; next 1.1; 1.1 date 2006.01.10.20.16.44; author wiz; state Exp; branches; next ; desc @@ 1.7 log @Update to KDE SC 4.8.0 @ text @$NetBSD: patch-ab,v 1.6 2011/02/14 18:24:00 wiz Exp $ Fix build with png-1.5. https://bugs.kde.org/show_bug.cgi?id=266319 --- src/gvcore/pngformattype.cpp.orig 2007-09-15 13:46:13.000000000 +0000 +++ src/gvcore/pngformattype.cpp @@@@ -211,7 +211,7 @@@@ void setup_qt( QImage& image, png_struct if ( color_type == PNG_COLOR_TYPE_GRAY ) { // Black & White or 8-bit grayscale - if ( bit_depth == 1 && info_ptr->channels == 1 ) { + if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) { png_set_invert_mono( png_ptr ); png_read_update_info( png_ptr, info_ptr ); if (!image.create( width, height, 1, 2, QImage::BigEndian )) @@@@ -245,16 +245,24 @@@@ void setup_qt( QImage& image, png_struct image.setColor( i, qRgba(c,c,c,0xff) ); } if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { - const int g = info_ptr->trans_values.gray; + png_bytep trans_alpha; + int num_trans; + png_color_16p trans_color; + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); + const int g = trans_color->gray; if (g < ncols) { image.setAlphaBuffer(TRUE); image.setColor(g, image.color(g) & RGB_MASK); } } } - } else if ( color_type == PNG_COLOR_TYPE_PALETTE + } else { + png_colorp palette; + int num_palette; + png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); + if ( color_type == PNG_COLOR_TYPE_PALETTE && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE) - && info_ptr->num_palette <= 256 ) + && num_palette <= 256 ) { // 1-bit and 8-bit color if ( bit_depth != 1 ) @@@@ -262,28 +270,32 @@@@ void setup_qt( QImage& image, png_struct png_read_update_info( png_ptr, info_ptr ); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0); - if (!image.create(width, height, bit_depth, info_ptr->num_palette, + if (!image.create(width, height, bit_depth, num_palette, QImage::BigEndian)) return; int i = 0; if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { + png_bytep trans_alpha; + int num_trans; + png_color_16p trans_color; + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); image.setAlphaBuffer( TRUE ); - while ( i < info_ptr->num_trans ) { + while ( i < num_trans ) { image.setColor(i, qRgba( - info_ptr->palette[i].red, - info_ptr->palette[i].green, - info_ptr->palette[i].blue, - info_ptr->trans[i] + palette[i].red, + palette[i].green, + palette[i].blue, + trans_alpha[i] ) ); i++; } } - while ( i < info_ptr->num_palette ) { + while ( i < num_palette ) { image.setColor(i, qRgba( - info_ptr->palette[i].red, - info_ptr->palette[i].green, - info_ptr->palette[i].blue, + palette[i].red, + palette[i].green, + palette[i].blue, 0xff ) ); @@@@ -318,12 +330,13 @@@@ void setup_qt( QImage& image, png_struct } png_read_update_info(png_ptr, info_ptr); - } + } // Qt==ARGB==Big(ARGB)==Little(BGRA) if ( QImage::systemByteOrder() == QImage::LittleEndian ) { png_set_bgr(png_ptr); } + } } @@@@ -381,7 +394,7 @@@@ int PNGFormat::decode(QImage& img, QImag return -1; } - if (setjmp((png_ptr)->jmpbuf)) { + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, 0); image = 0; return -1; @@@@ -409,7 +422,7 @@@@ int PNGFormat::decode(QImage& img, QImag if ( !png_ptr ) return 0; - if (setjmp(png_ptr->jmpbuf)) { + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, 0); image = 0; state = MovieStart; @@@@ -476,7 +489,7 @@@@ void PNGFormat::end(png_structp png, png consumer->frameDone(QPoint(offx,offy),r); consumer->end(); state = FrameStart; - unused_data = (int)png->buffer_size; // Since libpng doesn't tell us + unused_data = png_process_data_pause(png, 1); } #ifdef PNG_USER_CHUNKS_SUPPORTED @ 1.6 log @Add upstream bug report URL. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.5 2011/02/07 00:30:07 wiz Exp $ @ 1.5 log @Fix build with png-1.5. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2011/02/06 16:14:04 wiz Exp $ d4 1 @ 1.4 log @Incomplete fix for png-1.5 from Marko Schütz Schmuck, to avoid duplicate work. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.3 2010/06/13 22:44:35 wiz Exp $ d3 1 a3 1 Fix build with png-1.5 (incomplete). d5 1 a5 1 --- src/gvcore/pngformattype.cpp.orig 2011-02-06 15:51:56.000000000 +0000 d20 5 a24 5 - const int g = info_ptr->trans_color.gray; + png_bytep trans_alpha; + int num_trans; + png_color_16p trans_color; + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); d35 3 a37 3 + int num_palette; + png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); + if ( color_type == PNG_COLOR_TYPE_PALETTE d54 4 a57 4 + png_bytep trans_alpha; + int num_trans; + png_color_16p trans_color; + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); d65 1 a65 1 - info_ptr->trans_alpha[i] d120 9 @ 1.3 log @Bump PKGREVISION for libpng shlib name change. Also add some patches to remove use of deprecated symbols and fix other problems when looking for or compiling against libpng-1.4.x. @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 1 --- src/gvcore/pngformattype.cpp.orig 2007-09-15 13:46:13.000000000 +0000 d7 10 a16 1 @@@@ -245,7 +245,7 @@@@ void setup_qt( QImage& image, png_struct d20 6 a25 2 - const int g = info_ptr->trans_values.gray; + const int g = info_ptr->trans_color.gray; d29 41 a69 6 @@@@ -273,7 +273,7 @@@@ void setup_qt( QImage& image, png_struct info_ptr->palette[i].red, info_ptr->palette[i].green, info_ptr->palette[i].blue, - info_ptr->trans[i] + info_ptr->trans_alpha[i] d73 47 @ 1.2 log @Update gwenview{,-i18n} to 1.4.1 New features: * Show preview of images when dragging them. * Added "back/forward/reload/save as" actions to the KPart context menu Fixes: * Load JPEG rotated images using the right rotation directly instead of loading them first and rotate them after. * Fix crash when showing current folder properties from context menu. * Do not show the name of the current file in the status bar: it's already shown in the title bar and it was causing the mainwindow to be enlarged if the name was very long. * Show the "rotate left" button in KParts. * Use Exiv2 instead of libexif to fix troubles with some JPEG. * Fix crash when using Gwenview KPart in kwebdesktop. * Fix content of KPart context menu when viewing remote images. * Do not let the KPart title get overriden when switching tabs. * Make context menu behavior coherent with KDE. * Fix compilation with --enable-final * Do not loose selection when switching from detail to thumbnail view. * In KPart, do not loose selection when starting a drag. * Fixed behavior of the middle-mouse button. * Unless the user rotated the image, saving from the KPart now does a copy of the image instead of recompressing it. This ensures the KPart won't fail to save certain files. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 2006/01/10 20:16:44 wiz Exp $ d3 20 a22 15 --- src/imageutils/jpegcontent.cpp.orig 2005-11-20 17:08:51.000000000 +0000 +++ src/imageutils/jpegcontent.cpp @@@@ -37,9 +37,9 @@@@ extern "C" { #include // Exif -#include "exif-data.h" -#include "exif-ifd.h" -#include "exif-utils.h" +#include "libexif/exif-data.h" +#include "libexif/exif-ifd.h" +#include "libexif/exif-utils.h" // Local #include "imageutils/imageutils.h" @ 1.1 log @Make build after libexif update. Add pkg-config to USE_TOOLS, used by libexif. @ text @d1 1 a1 1 $NetBSD$ @