Re: Image plugin priority problems
Aurélien Gâteau <[email protected]> Fri, 27 Nov 2009 22:13:21 +0100
| Newsgroups | gmane.comp.kde.gwenview |
|---|---|
| Message-ID | <[email protected]> |
(Sorry for the delay, was away for last two weeks) Ruben Lopez a =E9crit : > Hi, > = > I am having trouble again with the Softimage PIC image format. This time = > with files that have a lot of ASCII text in the header (some of our = > programs write this kind of files). Gwenview recognizes them as = > text/plain files instead of PIC files readable by our kimg_pic.so plugin. > = > It also happens that if I rename the "test.pic" file to "test.png" = > (without transcoding it), then Gwenview recognizes it just right as a = > PIC file and displays it without problems. This means the code goes through KMimeType::findByNameAndContent() in lib/document/loadingdocumentimpl.cpp. For some reason findByNameAndContent() does not consider the .pic extension to be an image and falls back to analyzing the first few bytes of the file. Is there a '<glob pattern=3D"*.pic"/>' in the x-pic.xml file? > Is there any option to give higher priority to our plugin than the = > text/plain one? It should not be necessary if we can find out why findByNameAndContent() does not realize the .pic file is an image. > Just in the case it helps, I have all these files in the system to = > support Softimage PIC: > = > /usr/lib64/kde4/plugins/imageformats/kimg_pic.so > /usr/share/kde4/services/qimageioplugins/pic.desktop > /usr/share/mime/image/x-pic.xml > /usr/share/mime/packages/image-x-pic.xml Just curious, what is the "packages/image-x-pic.xml" file? Aur=E9lien ---------------------------------------------------------------------------= --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day = trial. Simplify your report design, integration and deployment - and focus = on = what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july