[Okular-devel] [Bug 154698] Won't open some TIFF files

James Richard Tyrer tyrerj at acm.org
Fri Dec 28 00:47:53 CET 2007


Pino Toscano wrote:
> ------- You are receiving this mail because: ------- You reported the
>  bug, or are watching the reporter.
> 
> http://bugs.kde.org/show_bug.cgi?id=154698 toscano.pino tiscali it 
> changed:
> 
> What    |Removed                     |Added 
> ----------------------------------------------------------------------------
>  AssignedTo|okular-devel kde org        |kdelibs-bugs kde org 
> Component|TIFF backend                |general Product|okular 
> |kdelibs
> 
> 
> 
> ------- Additional Comments From toscano.pino tiscali it  2007-12-27 
> 23:14 -------
>>> Okular just uses what KMimeTypes reports to be the mimetype of 
>>> the file, and then uses the backend responsible for handling that
>>>  mimetype. If the backend receives something it cannot read, it's
>>>  not its fault.
>> 
>> That is not actually the case.
> 
> It's nice to see how you reject the explanation of the developers of 
> that architecture.

Perhaps if you read the rest of what I said, you would not jump to
conclusions.

>> KDE is using the MIME type of the file to determine which Okular 
>> backend to call.
> 
>> So, this problem might be caused by Okular's architecture.
> 
> No. Okular asks KMimeType to determine the mimetype of the file, then
>  it chooses which backend to call acording to what KMimeType reports.
> 
IIUC, there are to issues, the KParts which rely on KDE to determine the
MIME type before the appropriate Okular KPart is called, and the Okular
front end that is called as an external application and, based on the
file, calls a KPart to display it.  I think that you are talking about
the front end and I am talking about the KParts.  I don't see how it can
work for the KParts running in Konqueror, but since the GwenView front
end works OK, there is no reason that the Okular front end won't work as
well.

> Okular just trusts what KMimeType reports as results. No less and no 
> more.

Probably not the greatest of ideas since KMimeType is known to be
somewhat broken in KDE3 and I doubt that it has been fixed.  Actually,
it needs some design work first.

>> Gwenview, OTOH, is directly presented with the file and has no 
>> problem reading it.
> 
> ... just because both TIFF and JPEG are image formats supported by 
> gwenview. If you do kfile --dialog <image>

I presume that you mean "kfile4".

> where <image> is the first attachment, you see (Preview tab) it fails
>  to generate the preview; while if you do that after renaming it to 
> .jpg, the preview is rendered correctly.

Previews are a separate issue and yes there is a bug there in KDE4 as
well.  While the "KFile" preview doesn't work in KDE3, the other preview
functions (such as in Konqueror and KView DO work in KDE3 but not in KDE4.

It is here I can demonstrate what I mean when I say that KMimeType is
somewhat broken.

Make a copy of the first attachment and remove the '.tif' extension --
have NO extension.

Now try:

	kfile4 --dialog <file>

with the file with no extension.  Notice that you now have a preview.

Do the same from a Konsole with Okular and you will find that it opens
correctly.

> Thus, I'm reassigning the problem to kdelibs (where KMimeType is), as
>  should be KMimeType to report us the correct mimetype for it.
> 

As I see it, there are issues with BOTH Okular and the KDE MIME type system.

-- 
JRT


More information about the Okular-devel mailing list