help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Image View mode and image dimensions Q


From: Xah
Subject: Re: Image View mode and image dimensions Q
Date: Sat, 11 Oct 2008 04:14:33 -0700 (PDT)
User-agent: G2/1.0

On Oct 11, 4:01 am, Xah <xah...@gmail.com> wrote:
> On Oct 10, 3:14 pm, "srdjan.markov...@gmail.com"
>
> <srdjan.markov...@gmail.com> wrote:
> > Hi there!
>
> > I am looking for solution to display image dimensions in Image View
> > mode.
> > I really like the possibility to display image in dired mode. The only
> > thing I am not able to find is to retrieve the width and height of
> > displayed image.
> > Is there a way to do this?

forgot to paste the img dimension function. Here it is:

(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))
  )
)

  Xah
∑ http://xahlee.org/

reply via email to

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