(image-compute-scaling-factor image-scaling-factor)))
props)))
+(defun image--set-property (image property value)
+ "Set PROPERTY in IMAGE to VALUE.
+Internal use only."
+ (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))
+ value)
+
+(defun image-property (image property)
+ "Return the value of PROPERTY in IMAGE.
+Properties can be set with
+
+ (setf (image-property IMAGE PROPERTY) VALUE)
+If VALUE is nil, PROPERTY is removed from IMAGE."
+ (declare (gv-setter image--set-property))
+ (plist-get (cdr image) property))
+
(defun image-compute-scaling-factor (scaling)
(cond
((numberp image-scaling-factor)