GNOME Bugzilla – Bug 754467
Use image/vnd.djvu+multipage mime-type for DjVu
Last modified: 2017-08-21 17:21:28 UTC
image/vnd.djvu could be an image, or a multi-page document. To avoid evince trying to use images (and for them to be shown as such in nautilus), I've added the image/vnd.djvu+multipage mime-type with the appropriate magic. I should be releasing a new version of shared-mime-info shortly to include that change.
Do I understand it correctly that you want to remove support for the image/vnd.djvu and replace it by image/vnd.djvu+multipage? This would mean that evince won't be able to open the image/vnd.djvu images. Looking at what is offered for this mime type in gnome-software in F23 it seems that all the packages name the files they open as documents so I don't see any image viewer able to open this mime type. Btw, we have to add the support for the image/vnd.djvu+multipage since I've got first downstream bug related to this: https://bugzilla.redhat.com/show_bug.cgi?id=1308628
(In reply to Marek Kašík from comment #1) > Do I understand it correctly that you want to remove support for the > image/vnd.djvu and replace it by image/vnd.djvu+multipage? That would be the goal. > This would mean > that evince won't be able to open the image/vnd.djvu images. I don't think that evince should open DjVu images, only DjVu documents. Support for DjVu images could be added to gdk-pixbuf or to GIMP instead, offering users a way to open those images. (Maybe GEGL support would be even better, as it handles large images better, and DjVu images tend to be of this kind, like JPEG2000 images) > Looking at what > is offered for this mime type in gnome-software in F23 it seems that all the > packages name the files they open as documents so I don't see any image > viewer able to open this mime type. > > Btw, we have to add the support for the image/vnd.djvu+multipage since I've > got first downstream bug related to this: > https://bugzilla.redhat.com/show_bug.cgi?id=1308628 Yes, that'll be necessary. You might want to hold off on removing image/vnd.djvu until we have a solution for opening just images.
Created attachment 321931 [details] [review] Recognize multipage DjVu MIME type OK, so this patch adds support for the image/vnd.djvu+multipage mime type without removing the image/vnd.djvu.
Comment on attachment 321931 [details] [review] Recognize multipage DjVu MIME type Thank you for the review. I've pushed the patch to master branch. I'll keep this bug opened so we don't forget to remove the support for "image/vnd.djvu" once the distinction is more adopted.
Created attachment 355963 [details] [review] djvu: Remove image/vnd.djvu mime-type handling Now that shared-mime-info has included an image/vnd.djvu+multipage mime-type for more than a year.
Attachment 355963 [details] pushed as 39bd98c - djvu: Remove image/vnd.djvu mime-type handling
I opened bug 786511 for the regression this commit introduced.
Jeremy instead of openning a new bug.. We need to reopen this bug... In comment 2 it is said that we would hold off removing this until a proper way in the GNOME stack exists to open djvu images... Do we have this? At least in Fedora 26, I can't open djvu files except with Evince...Is there a bug to add djvu support to gdk-pixbuf? PS: I don't want to bikeshed whether we should drop support or not for one page djvu files in Evince, but if we are removing it we really should be sure that there is an alternate way being released at the same time.
This patch has been committed and in a release. Discussing this in a new bug is fine.