[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doc-view resizing

From: Tassilo Horn
Subject: Re: Doc-view resizing
Date: Thu, 15 Nov 2007 09:05:35 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

Hi Stefan,

> Any objection to the patch below?


> @@ -154,11 +155,16 @@
>    '("-dSAFER" ;; Avoid security problems when rendering files from untrusted
>             ;; sources.
>      "-dNOPAUSE" "-sDEVICE=png16m" "-dTextAlphaBits=4"
> -    "-dBATCH" "-dGraphicsAlphaBits=4" "-dQUIET" "-r100")
> +    "-dBATCH" "-dGraphicsAlphaBits=4" "-dQUIET")
>    "A list of options to give to ghostscript."
>    :type '(repeat string)
>    :group 'doc-view)
> +(defcustom doc-view-resolution 100
> +  "Dots per inch resolution used to render the documents.
> +Higher values result in larger images."
> +  :type 'number)
> +

That's fine.

For the resizing: I didn't test the patch, but +/- will reconvert the
whole doc, right?  I think that's inacceptable slow.  Let's say you're
reading page 333 and now you hit `+'.  That will make page 1 current and
it'll need too much time till page 333 has been converted again.

A better and much mode general approach would be to implement image
zooming in emacs, e.g.

    (insert-image IMAGE &optional STRING AREA SLICE)

would become

    (insert-image IMAGE &optional STRING AREA SLICE ZOOM)

where ZOOM is the factor for zooming the image.  Of course, that costs
more effort to implement, but various other modes could benefit from it,
too (i.e. image-mode, image-dired, emacs-w3m, Gnus).

Any volunteers?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]