After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754467 - Use image/vnd.djvu+multipage mime-type for DjVu
Use image/vnd.djvu+multipage mime-type for DjVu
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: backends
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-02 14:53 UTC by Bastien Nocera
Modified: 2017-08-21 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Recognize multipage DjVu MIME type (1.91 KB, patch)
2016-02-23 09:53 UTC, Marek Kašík
committed Details | Review
djvu: Remove image/vnd.djvu mime-type handling (1.13 KB, patch)
2017-07-19 16:39 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-09-02 14:53:56 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.
Comment 1 Marek Kašík 2016-02-16 11:16:23 UTC
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
Comment 2 Bastien Nocera 2016-02-19 16:39:08 UTC
(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.
Comment 3 Marek Kašík 2016-02-23 09:53:04 UTC
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 4 Marek Kašík 2016-02-23 17:23:25 UTC
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.
Comment 5 Bastien Nocera 2017-07-19 16:39:45 UTC
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.
Comment 6 Bastien Nocera 2017-07-22 12:44:04 UTC
Attachment 355963 [details] pushed as 39bd98c - djvu: Remove image/vnd.djvu mime-type handling
Comment 7 Jeremy Bicha 2017-08-19 12:59:41 UTC
I opened bug 786511 for the regression this commit introduced.
Comment 8 José Aliste 2017-08-19 14:04:31 UTC
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.
Comment 9 Bastien Nocera 2017-08-21 17:21:28 UTC
This patch has been committed and in a release. Discussing this in a new bug is fine.