of 0.25 will make the image a quarter size of what it originally was.
If the scaling makes the image larger than specified by
@code{:max-width} or @code{:max-height}, the resulting size will not
-exceed those two values.
+exceed those two values. If both @code{:scale} and
+@code{:height}/@code{:width} are specified, the height/width will be
+adjusted by the specified scaling factor.
@item :format @var{type}
The value, @var{type}, should be a symbol specifying the type of the
as @code{nil}.
@end defmac
+@defun image-set-property image property value
+Set the value of @var{property} in @var{image} to @var{value}. If
+@var{value} is @code{nil}, the property is removed completely.
+
+@lisp
+(image-set-property image :height 300)
+@end lisp
+@end defun
+
+@defun image-get-property image property
+Return the value of @var{property} in @var{image}.
+@end defun
+
@defun find-image specs
This function provides a convenient way to find an image satisfying one
of a list of image specifications @var{specs}.
`image-scaling-factor' variable (if Emacs supports scaling the images
in question).
++++
*** Images inserted with `insert-image' and related functions get a
keymap put into the text properties (or overlays) that span the
image. This keymap binds keystrokes for manipulating size and
+++
*** A new library for creating and manipulating SVG images has been
-added. See the "SVG Images" section in the lispref manual for details.
+added. See the "SVG Images" section in the lispref manual for
+details.
+
++++
+*** New functions to access and set image parameters are provided:
+`image-get-property' and `image-set-property'.
+
** Lisp mode
(image-compute-scaling-factor image-scaling-factor)))
props)))
+(defun image-set-property (image property value)
+ "Set PROPERTY in IMAGE to VALUE.
+If VALUE is nil, PROPERTY is removed from IMAGE. IMAGE is
+returned."
+ (if (null value)
+ (while (cdr image)
+ ;; IMAGE starts with the symbol `image', and the rest is a
+ ;; plist. Decouple plist entries where the key matches
+ ;; the property.
+ (if (eq (cadr image) property)
+ (setcdr image (cddr image))
+ (setq image (cddr image))))
+ ;; Just enter the new value.
+ (plist-put (cdr image) property value))
+ image)
+
+(defun image-get-property (image property)
+ "Return the value of PROPERTY in IMAGE."
+ (plist-get (cdr image) property))
+
(defun image-compute-scaling-factor (scaling)
(cond
((numberp image-scaling-factor)