[Kde-graphics-devel] KImageIO

Mosfet dan.duley at verizon.net
Wed Jan 12 23:24:36 CET 2005


Few more notes on ImageMagick.

On Wednesday 12 January 2005 02:46 pm, Ian Reinhart Geiser wrote:
> Dirk Schönberger said:
...snip...
> > - 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.
>
...snip...

You can set the size in ImageMagick before you load it, but as you said I am 
not sure how you'd specify this w/ Qt.

> > - 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
>

This is dependent on how you built ImageMagick and what you linked it to.

Also, note that if there is already a KDE KImageIO handler I believe should be 
preferred. It will be much more efficent. ImageMagick internally uses a 
rather complex 64bpp cache that you translate to Qt 32bpp RGBA scanlines, I 
assume by calling something like ExportImagePixels() or iterating through 
scanlines. This isn't particularly fast and consumes a lot more memory, (not 
only a temporary image, but one that uses 16bpp pixel components at that ;-)

As for mimetype identification. I wrote my own. Better than going through the 
entire MagicInfo list, which can be large.

>     -ian reinhart geiser
>
> _______________________________________________
> Kde-graphics-devel mailing list
> Kde-graphics-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-graphics-devel


More information about the Kde-graphics-devel mailing list