[Kde-graphics-devel] KImageIO
Ian Reinhart Geiser
geiseri at yahoo.com
Wed Jan 12 21:46:09 CET 2005
Dirk Schönberger said:
>> This isn't hard core graphics, but I figured it might be of interest to
>> people. I have created a ImageMagick based KImageIO plugin, the unit
>> and
>> validation tests pass, but its missing a few key elements to be
>> generally
>> useful.
>
> Sounds really interesting.
>
> Some questions:
> - Which of these filters are supported by ImageMagick natively, and which
> are supported via external helper application?
These are all going through ImageMagick, some need helpers supplied via
ImageMagick, but I am using their interface to read and write the images.
> I am not sure if a dependency on a helper application would be really
> useful. This applies e.g. for the eps KimageIO reader, which IMHO just
> calls Ghostscript, like the current EPS QImageIO filter, too
>
Yeah, their EPS stuff allows a few more options than the current KDE
version, mostly with funky PS formats.
> - which formats are read-only, and which are read write?
>
The same as image magick.
> - I would be interested in adding file format specific parameters. E.g. if
> I
> have a vector data format, I would like to be able to specify the
> intended width and height
>
I am not sure if QImage allows this to happen beyond what the image filter
uses.
> - which external libraries uses your KImageIO filter. E.g I have a SVG
> import filter, which unfortunately needs glib, librsvg and a couple other
> libs, which make it rather "politically incorrect"
>
I link only to image magick's C++ library. This in turn pulls in:
-lMagick++ -lWand -lMagick -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng
-ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm
-lpthread
>> The big one is the QImageIO regexps to determine the image's format.
>
> - I think at least in QImageIO the file extension should suffice
Not for loading, only for saving.
> - At least in SVG it is rather difficult to find a magic regexp. You can
> more or less decide if you have a XML file, but there is no easy way to
> extract the magic "<svg>" tag, because it isn't on a fixed possition in
> the file. This applies IMHO for all "text based" graphics format or
> "container based" graphics format (e.g. gzipped SVGs or .svgz files)
Yeah, currently ImageMagick just scans for <svg> in the file, but QImageIO
is limited only to 14bytes. This is annoying for PhotoCD that uses an
offset of 2048 bytes.
Cheers
-ian reinhart geiser
More information about the Kde-graphics-devel
mailing list