[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/krita/magick
From: Bart Coppens <kde () bartcoppens ! be>
Date: 2005-09-16 15:17:52
Message-ID: 1126883872.448582.26125.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 461134 by coppens:
So my previous prophecy about imagemagick suddenly changing API again was correct: \
apparently they changed it and the old way doesn't work there anymore. Should work \
now for newer versions of magick, hopefully...
M +11 -2 kis_image_magick_converter.cc
--- trunk/koffice/filters/krita/magick/kis_image_magick_converter.cc #461133:461134
@@ -184,10 +184,17 @@
// Attributes, since we have no hint on if this is an attribute or a profile
// annotation, we prefix it with 'krita_attribute:'. XXX This needs to be \
rethought!
- // And there are apparantly attribute iterator functions like above, but not
- // in my magick version *sigh*
+ // The joys of imagemagick. From at least version 6.2.1 (but I assume .0, I \
just + // can't find an older version to check) they changed the src -> \
attributes + // to void* and require us to use the iterator functions. So we \
#if around that, *sigh* +#if MagickLibVersion >= 0x620
+ const ImageAttribute * attr;
+ ResetImageAttributeIterator(src);
+ while ( (attr = GetNextImageAttribute(src) ) {
+#else
ImageAttribute * attr = src -> attributes;
while (attr) {
+#endif
QByteArray rawdata;
int len = strlen(attr -> value) + 1;
rawdata.resize(len);
@@ -198,7 +205,9 @@
Q_CHECK_PTR(annotation);
image -> addAnnotation(annotation);
+#if MagickLibVersion < 0x620
attr = attr -> next;
+#endif
}
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic