Incorporate 3 fixes from subversion:

- Slideshow icon in settings
 - crash when displaying 1BPP BMP images
 - crash with Jpeg images containing incorrect Exif information due to
   Exiv2 API misuse

From brad@ (tested/confirmed by me)
This commit is contained in:
merdely 2008-04-15 03:45:11 +00:00
parent 16b3747e70
commit 3533ad0e32
4 changed files with 53 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.41 2008/02/18 18:43:56 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.42 2008/04/15 03:45:11 merdely Exp $
COMMENT= image viewer for KDE
DISTNAME= gwenview-1.4.2
PKGNAME= ${DISTNAME}p3
PKGNAME= ${DISTNAME}p4
SHARED_LIBS += gwenviewcore 5.0 # .1.0
CATEGORIES= graphics x11 x11/kde
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gwenview/}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_app_configdialog_cpp,v 1.1 2008/04/15 03:45:11 merdely Exp $
--- src/app/configdialog.cpp.orig Mon Apr 14 21:23:17 2008
+++ src/app/configdialog.cpp Mon Apr 14 21:23:52 2008
@@ -137,7 +137,7 @@ ConfigDialog::ConfigDialog(QWidget* parent, KIPI::Plug
d->mManagers << new KConfigDialogManager(d->mFileOperationsPage, FileOperationConfig::self());
d->mSlideShowPage = addConfigPage<ConfigSlideshowPage>(
- this, i18n("SlideShow"), i18n("SlideShow"), "slideshow");
+ this, i18n("SlideShow"), i18n("SlideShow"), "slideshow_play");
d->mManagers << new KConfigDialogManager(d->mSlideShowPage, SlideShowConfig::self());
#ifdef GV_HAVE_KIPI

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_gvcore_documentimpl_cpp,v 1.1 2008/04/15 03:45:11 merdely Exp $
--- src/gvcore/documentimpl.cpp.orig Mon Apr 14 21:26:16 2008
+++ src/gvcore/documentimpl.cpp Mon Apr 14 21:26:50 2008
@@ -38,6 +38,11 @@ void DocumentImpl::switchToImpl(DocumentImpl* impl) {
}
void DocumentImpl::setImage(QImage img) {
+ if (img.depth() == 1) {
+ // 1 bit depth images are difficult to scale. Let's convert to 8 bit
+ // depth. See bug #155518.
+ img = img.convertDepth(8);
+ }
mDocument->setImage(img);
}

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-src_imageutils_jpegcontent_cpp,v 1.1 2008/04/15 03:45:11 merdely Exp $
--- src/imageutils/jpegcontent.cpp.orig Mon Apr 14 21:27:52 2008
+++ src/imageutils/jpegcontent.cpp Mon Apr 14 21:30:20 2008
@@ -329,12 +329,17 @@ int JPEGContent::dotsPerMeter(const QString& keyName)
// 2 = inches
// 3 = centimeters
// Other = reserved
- const float INCHESPERMETER = (100. / 2.54);
+ const double INCHESPERMETER = (100. / 2.54);
+ Exiv2::Rational r = it->toRational();
+ if (r.second == 0) {
+ // a rational with 0 as second will make hang toLong() conversion
+ r.second = 1;
+ }
switch (res) {
case 3: // dots per cm
- return (it->toLong() * 100);
+ return int(double(r.first) * 100 / double(r.second));
default: // dots per inch
- return (it->toLong() * INCHESPERMETER);
+ return int(double(r.first) * INCHESPERMETER / double(r.second));
}
return 0;