Function: image-dired-thumbnail-set-image-description

image-dired-thumbnail-set-image-description is an interactive and byte-compiled function defined in image-dired-external.el.gz.

Signature

(image-dired-thumbnail-set-image-description)

Documentation

Set the ImageDescription EXIF tag for the original image at point.

If the image already has a value for this tag, it is used as the default value at the prompt.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/image/image-dired-external.el.gz
(defun image-dired-thumbnail-set-image-description ()
  "Set the ImageDescription EXIF tag for the original image at point.
If the image already has a value for this tag, it is used as the
default value at the prompt."
  (interactive nil image-dired-thumbnail-mode)
  (if (not (image-dired-image-at-point-p))
      (message "No thumbnail at point")
    (let* ((file (image-dired-original-file-name))
           (old-value (or (exif-field 'description (exif-parse-file file)) "")))
      (if (eq 0
              (image-dired-set-exif-data file "ImageDescription"
                                         (read-string "Value of ImageDescription: "
                                                      old-value)))
          (message "Successfully wrote ImageDescription tag")
        (error "Could not write ImageDescription tag")))))