[Top][All Lists]

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

Re: Testing native image scaling

From: Eli Zaretskii
Subject: Re: Testing native image scaling
Date: Thu, 28 Mar 2019 22:09:40 +0200

> From: Andy Moreton <address@hidden>
> Date: Thu, 28 Mar 2019 19:29:45 +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))
>         result)
>     (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"))
>     result))

LGTM, thanks.

> >> 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
> silently.

The error message is bogus anyway, as it talks about rescaling,
instead of talking about rotating.  IOW, it's a bug in the message
that should be fixed.

reply via email to

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