[Top][All Lists]

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

Re: Testing native image scaling

From: Andy Moreton
Subject: Re: Testing native image scaling
Date: Thu, 28 Mar 2019 19:29:45 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Thu 28 Mar 2019, Eli Zaretskii wrote:

>> From: Andy Moreton <address@hidden>
>> Date: Thu, 28 Mar 2019 18:06:17 +0000
>> Should the <kp-subtract> and <kp-add> bindings for `image-decrease-size'
>> and `image-increase-size' be adjusted to handle sliced images ?
> It would be nice, yes.

A little experimentation shows that changing `image--get-image' as below
seems to be sufficient to work for normal and sliced images:

(defun image--get-image ()
  "Return the image at point."
  (let ((image (get-char-property (point) 'display))
    (when (consp image)
      (if (eq (car image) 'image)
          (setq result image)
        (dolist (x image)
          (if (eq (car-safe x) 'image)
              (setq result x)))))
    (when (null result)
      (error "No image under point"))

>> Is image rotation expected to work on Windows ?
> Not without ImageMagick, no.  (And not only on Windows, AFAIK.)

ok, but if ImageMagick is not available it used to complain and now does
not. It should still report the same error message rather than failing


reply via email to

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