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 580891 - DPI of DjVu documents ignored when scaling document.
DPI of DjVu documents ignored when scaling document.
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-30 15:22 UTC by Adam Buchbinder
Modified: 2013-02-02 15:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.31/2.32


Attachments
200dpi djvu document (15.01 KB, image/vnd.djvu)
2011-05-19 15:15 UTC, Adam Buchbinder
  Details
400dpi djvu document (13.89 KB, image/vnd.djvu)
2011-05-19 15:15 UTC, Adam Buchbinder
  Details
Screenshot of the issue. (145.24 KB, image/png)
2011-05-19 15:16 UTC, Adam Buchbinder
  Details
patch (4.55 KB, patch)
2013-01-11 12:55 UTC, José Aliste
committed Details | Review

Description Adam Buchbinder 2009-04-30 15:22:34 UTC
If I encode an 850x1100 image as a djvu document with the "-dpi 100" option, it's written into the INFO block as reported by djvudump. If I then encode a 425x550 image with the "-dpi 50" option, it should, when viewed in Evince, show up at the same size--at 100% zoom, both should be the size of a standard letter sheet. However, in this case, the latter image shows up as half the size of the former. This makes, for instance, 72dpi scans difficult to view at the standard zoom levels, because they're ridiculously tiny, and it makes 300dpi scans huge and slow to open.

I'm running evince 2.26.1-0ubuntu1 on Ubuntu Jaunty. This bug was previously reported on Launchpad:

https://bugs.launchpad.net/ubuntu/+source/evince/+bug/361962
Comment 1 Fabio Durán Verdugo 2011-05-18 04:23:42 UTC
This bug was reported against a version which is not supported any more. Developers are no longer working on this version so there will not be any bug fixes for it.
Can you please check again if the issue you reported here still happens in a recent version of GNOME and update this report by adding a comment and adjusting the 'Version' field?

Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here.

Without feedback this report will be closed as INCOMPLETE after 6 weeks.
Comment 2 Adam Buchbinder 2011-05-19 15:09:56 UTC
I just retested against evince 2.32.0-0ubuntu1.1 (on current Ubuntu 10.10), and the issue is still extant. I encoded two djvu documents from a common PBM source as follows:

$ cjb2 -verbose -dpi 200 ag.pbm ag-200dpi.djvu
cjb2: 27035 runs.
cjb2: 61 ccs after preprocessing.
cjb2: 162 ccs after merging/splitting.
cjb2: 133 shapes after matching (5 are cross-coded).
$ cjb2 -verbose -dpi 400 ag.pbm ag-400dpi.djvu
cjb2: 27035 runs.
cjb2: 61 ccs after preprocessing.
cjb2: 92 ccs after merging/splitting.
cjb2: 60 shapes after matching (5 are cross-coded).

Opening both files in evince and scaling both to 100% presents images of equal size, which is not right--the 200dpi image should be twice as large as the 400dpi one. I'll attach the djvu documents and a screenshot.
Comment 3 Adam Buchbinder 2011-05-19 15:15:09 UTC
Created attachment 188137 [details]
200dpi djvu document
Comment 4 Adam Buchbinder 2011-05-19 15:15:35 UTC
Created attachment 188138 [details]
400dpi djvu document
Comment 5 Adam Buchbinder 2011-05-19 15:16:08 UTC
Created attachment 188139 [details]
Screenshot of the issue.
Comment 6 José Aliste 2013-01-09 20:43:36 UTC
Indeed, the djvu backend ignores the dpi information.
Comment 7 José Aliste 2013-01-11 12:55:59 UTC
Created attachment 233224 [details] [review]
patch

Carlos, this patches fixes the issue by computing the scaling factor using dpi info instead of a hardcoded one.
Comment 8 José Aliste 2013-02-01 12:05:33 UTC
Carlos, could you review this when you got the time, Thanks
Comment 9 Carlos Garcia Campos 2013-02-02 15:09:49 UTC
Comment on attachment 233224 [details] [review]
patch

Pushed to git master, thank you very much.