GNOME Bugzilla – Bug 580891
DPI of DjVu documents ignored when scaling document.
Last modified: 2013-02-02 15:10:00 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
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.
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.
Created attachment 188137 [details] 200dpi djvu document
Created attachment 188138 [details] 400dpi djvu document
Created attachment 188139 [details] Screenshot of the issue.
Indeed, the djvu backend ignores the dpi information.
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.
Carlos, could you review this when you got the time, Thanks
Comment on attachment 233224 [details] [review] patch Pushed to git master, thank you very much.