unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 33226@debbugs.gnu.org
Subject: bug#33226: chromium, firefox sharper than doc-view
Date: Fri, 02 Aug 2019 18:38:32 +0200	[thread overview]
Message-ID: <87ef23a5fb.fsf@gnu.org> (raw)
In-Reply-To: <87v9w4zuy4.5.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Sun, 14 Jul 2019 20:01:23 +0800")

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> emacs x.pdf #and then use "+ runs the command doc-view-enlarge" many times.
>
> We observe a /tmp/docview*/*.pdf-*/ is created and contains a png
> conversion of the PDF, and a second factor file: page-1.png,
> resolution.el. We note that the resolution.el has not changed. Inside is
> "100" and that has not changed despite our zooming.
>
> So that's probably why the file doesn't look as clear in docview vs. the
> others! You must admit it is fuzzier at 400% zoom than the others.

Yup, this means Emacs has ImageMagick support built in and scales in
memory rather than reconverting with a higher resolution.  So if your
Emacs has ImageMagick support (which is NOT the default anymore due to
security concerns), I'd suggest to set doc-view-resolution to a higher
value, e.g., 200.

> But wait! *Not* on the INFO page is
>
> (defcustom doc-view-scale-internally t
>   "Whether we should try to rescale images ourselves.
> If nil, the document is re-rendered every time the scaling factor is modified.
> This only has an effect if the image libraries linked with Emacs support
> scaling."
>   :version "24.4"
>   :type 'boolean)
>
> And indeed, setting it to nil makes the bug go away, as proved by
> resolution.el finnaly changing each time we hit "+".

Right, it wouldn't be bad to enhance the documentation with those
details.

> So, this critical variable, if t, will cause scaling to silently fail
> in half the cases ("if the image libraries linked with Emacs..."
> fails. So should be nil by default, so that it never fails, I suppose.

I don't know.  Internal scaling is fast and its quality is very good if
you scale down (but not up, therefore use a high resoltion in this
case).  And when you open a 1000 pages book and then zoom, do you really
want that emacs starts reconverting each and every page?

> Also I think there in /tmp/ it should save a copy of the previous few
> scales each time we hit + or - so we can quickly zoom in and back out
> etc.

Well, that would be feasible for small documents (where a reconversion
doesn't matter that much), but for large documents I wouldn't want to
have hundredth of megabytes of image data which I probably wouldn't use
anyway.

Bye,
Tassilo





  reply	other threads:[~2019-08-02 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 14:23 bug#33226: chromium, firefox sharper than doc-view 積丹尼 Dan Jacobson
2019-07-10 13:39 ` Lars Ingebrigtsen
2019-07-14 12:01   ` 積丹尼 Dan Jacobson
2019-08-02 16:38     ` Tassilo Horn [this message]
2019-09-27 16:21       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ef23a5fb.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=33226@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).