GNU bug report logs -
#13887
24.3; doc-view will render blurry images when image-magick is available
Previous Next
Reported by: E Sabof <esabof <at> gmail.com>
Date: Wed, 6 Mar 2013 03:42:02 UTC
Severity: normal
Tags: moreinfo
Found in version 24.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 13887 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This function gives the native pixel dimensions of an image:
(defun es-image-file-pixel-dimensions (file)
(let* ((type (image-type file nil nil))
(spec (list 'image :type type :file file)))
(image-size spec t)))
When
(> (getf (cdr (doc-view-current-image)) :width)
(car (es-image-file-pixel-dimensions
(getf (cdr (doc-view-current-image)) :file))))
there is quality loss.
What I don't want to see is margins having a different width - for the same
reasons you wouldn't put a photograph in a frame in the top left corner.
Ideally I'd also center vertically (should the image be shorter than the
window) and add a window-configuration-change-hook (or there might be
an appropriate display-spec), so it's always centered. Unfortunately no
image-viewer that currently comes with emacs (image-mode ,doc-view-mode
,image-dired-display-image-mode) does this.
Evgeni
On Wed, Mar 6, 2013 at 1:01 PM, Tassilo Horn <tsdh <at> gnu.org> wrote:
> E Sabof <esabof <at> gmail.com> writes:
>
> > I've tried it, indeed it works much better. Might it be possible to
> > store the the "native" size, and raise the resolution automatically
> > when the zoom exceeds it?
>
> Well, the resolution should be increased and the doc reconverted when
> the up-scaled image becomes blurry. But how should emacs know when you
> think it becomes blurry?
>
> > On a side note, might it be also possible to horizontally center the
> > image? There is a pretty straight-forward way to do it, used in the
> > about-emacs screen.
>
> I guess this could be done somehow. But do you want to center to make
> the contents a bit larger and not to see the margins? If so, then
> slicing to the bounding box (`s b') followed by fitting to width (`W')
> may be the better approach.
>
> Bye,
> Tassilo
>
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.