all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Commands for viewing images
@ 2009-02-25 12:48 Sébastien Vauban
  2009-02-25 15:29 ` Tassilo Horn
  2009-02-25 19:04 ` Xah Lee
  0 siblings, 2 replies; 3+ messages in thread
From: Sébastien Vauban @ 2009-02-25 12:48 UTC (permalink / raw
  To: help-gnu-emacs-mXXj517/zsQ

Hello,

I view more and more image files from within Emacs, be it from a
Dired buffer, or as an attachment in a mail that I view in Gnus.

My problem is: how can we zoom (out, mainly) the picture?

It doesn't seem to be any way to do so in the `image-mode'.
Though, it should be possible as similar functions already have
been implemented for the `doc-view' package. Is there a package
I should know of, that would take care of adding zooming
commands when viewing buffers with pictures?

Best regards,
  Seb

-- 
Sébastien Vauban


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Commands for viewing images
  2009-02-25 12:48 Commands for viewing images Sébastien Vauban
@ 2009-02-25 15:29 ` Tassilo Horn
  2009-02-25 19:04 ` Xah Lee
  1 sibling, 0 replies; 3+ messages in thread
From: Tassilo Horn @ 2009-02-25 15:29 UTC (permalink / raw
  To: help-gnu-emacs

Sébastien Vauban <zthjwsqqafhv@spammotel.com>
writes:

Hi Sébastien,

> It doesn't seem to be any way to do so in the `image-mode'.  Though,
> it should be possible as similar functions already have been
> implemented for the `doc-view' package.

What we call zoom in doc-view is indeed a reconversion with different
resolution.  We did that cause emacs lacks zooming support. ;-)

Else we'd just convert with a huge resolution and zoom out a bit, which
would be much faster.  Well, somebody gotta implement it...

Bye,
Tassilo
-- 
The air around Chuck Norris is always a balmy 78 degrees. 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Commands for viewing images
  2009-02-25 12:48 Commands for viewing images Sébastien Vauban
  2009-02-25 15:29 ` Tassilo Horn
@ 2009-02-25 19:04 ` Xah Lee
  1 sibling, 0 replies; 3+ messages in thread
From: Xah Lee @ 2009-02-25 19:04 UTC (permalink / raw
  To: help-gnu-emacs

On Feb 25, 4:48 am, Sébastien Vauban <zthjwsqqa...@spammotel.com>
wrote:
> Hello,
>
> I view more and more image files from within Emacs, be it from a
> Dired buffer, or as an attachment in a mail that I view in Gnus.
>
> My problem is: how can we zoom (out, mainly) the picture?
>
> It doesn't seem to be any way to do so in the `image-mode'.
> Though, it should be possible as similar functions already have
> been implemented for the `doc-view' package. Is there a package
> I should know of, that would take care of adding zooming
> commands when viewing buffers with pictures?

i have no idea how zoom can be implemented as shown in typical image
viewers. I suppose it's recompute the bitmap and redisplay.

Note that in many browsers, Opera for example, you can zoom the whole
page. (i.e. not the same as changing font size) This feature is in
Mathematica IDE too (aka Frontend), since early 1990s.

i doubt this feature could easily fit into emacs, probably require
huge coding effort to its core.

as a workaround, you could have elisp wrapper that call image magic to
create a resized file as temp and display that.

e.g.
convert -scale 50% girl.jpg girl-s.jpg

you could also call “identify” to get the image dimension first, then
some function in emacs to get the emacs window size, so that you can
use the proper scale factor to make the image fit to window.

here's a elisp that gets img dimension in pure elisp

(defun get-image-dimensions (img-file-relative-path)
  "Returns a image file's width and height as a list."
  (let (tmp dimen)
    (clear-image-cache)
    (setq tmp
          (create-image (concat default-directory img-file-relative-
path)))
    (setq dimen (image-size tmp t))
    (list (car dimen) (cdr dimen))
  )
)

probably best just to view it in a dedicated image viewer. You can
easily write a elisp so that pressing a button shows the image in a
external app. (i suppose this is already in image-mode?)

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-25 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 12:48 Commands for viewing images Sébastien Vauban
2009-02-25 15:29 ` Tassilo Horn
2009-02-25 19:04 ` Xah Lee

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.