[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: [Calligra] 0f7fe6d Fix: inserting jpg image that are bigger than 90k
From: Cyrille Berger <cberger () cberger ! net>
Date: 2010-12-22 14:56:39
Message-ID: 20101222145639.370A8A6092 () git ! kde ! org
[Download RAW message or body]
commit 0f7fe6dd74c6c78b4e53e9b76c5a96155aeb9241
branch master
Author: Cyrille Berger <cberger@cberger.net>
Date: Wed Dec 22 15:53:29 2010 +0100
Fix: inserting jpg image that are bigger than 90k
Details: when the image is too big, it is saved in a temporary files as-is \
(meaning raw jpeg data), but the "suffix" is set to "png", and then when loading from \
the temporary file we force-load as "png", the patch let Qt auto detect the image \
type
This should probably be backport to koffice/2.3
CCMAIL: koffice-devel@kde.org
diff --git a/libs/flake/KoImageData.cpp b/libs/flake/KoImageData.cpp
index 7759f8f..4e8f397 100644
--- a/libs/flake/KoImageData.cpp
+++ b/libs/flake/KoImageData.cpp
@@ -138,7 +138,7 @@ QImage KoImageData::image() const
// load image
if (d->temporaryFile) {
d->temporaryFile->open();
- if (d->errorCode == Success && !d->image.load(d->temporaryFile, \
d->suffix.toLatin1())) { + if (d->errorCode == Success && \
!d->image.load(d->temporaryFile->fileName())) { d->errorCode = OpenFailed;
}
d->temporaryFile->close();
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic