KImageIO::mimeTypes and SVG/SVGZ Files
Allan Sandfeld Jensen
kde at carewolf.com
Wed Aug 31 13:03:57 BST 2011
On Tuesday 30 August 2011, Martin Koller wrote:
> Hi,
>
> In my application I use KImageIO::mimeTypes to determine which formats I
> can load (e.g. the output of it is used in my .desktop file to fill in the
> MimeType definition).
>
> However I see that obviously Qt can already (to some degree) load .svg and
> .svgz files, but KImageIO::mimeTypes does not return
> image/svg+xml
> image/svg+xml-compressed
>
> The solution would be to add 2 new desktop files in kdelibs/kimgio
> (attached). This would automatically allow all image applications to also
> load these file types, as they are then allowed in the file selector as
> "supported format".
>
> However, Qt can not load all SVG files correctly ...
>
> Despite this fact, gwenview added these 2 MimeTypes as supported formats in
> the .desktop file, so I wonder if we can add these generally.
>
> Opinions ?
You should remember to also make the compressed type a subtype of the correct
compressed archive type. This way the file can be recognized and decompressed
even if no direct image/svg+xml-compressed handler is registered.
Regards
`Allan
More information about the kde-core-devel
mailing list