File: image-dired.el.html

BACKGROUND
==========

 I needed a program to browse, organize and tag my pictures. I got
tired of the old gallery program I used as it did not allow multi-file operations easily. Also, it put things out of my control. Image viewing programs I tested did not allow multi-file operations or did not do what I wanted it to.

 So, I got the idea to use the wonderful functionality of Emacs and
dired to do it. It would allow me to do almost anything I wanted, which is basically just to browse all my pictures in an easy way, letting me manipulate and tag them in various ways. dired already provide all the file handling and navigation facilities; I only needed to add some functions to display the images.

 I briefly tried out thumbs.el, and although it seemed more
powerful than this package, it did not work the way I wanted to. It was too slow to create thumbnails of all files in a directory (I currently keep all my 2000+ images in the same directory) and browsing the thumbnail buffer was slow too. image-dired.el will not create thumbnails until they are needed and the browsing is done quickly and easily in Dired. I copied a great deal of ideas and code from there though... :)

 image-dired stores the thumbnail files in image-dired-dir(var)/image-dired-dir(fun)
using the file name format ORIGNAME.thumb.ORIGEXT. For example
~/.emacs.d/image-dired/myimage01.thumb.jpg. The "database" is for
now just a plain text file with the following format:

file-name-non-directory;comment:comment-text;tag1;tag2;tag3;...;tagN

PREREQUISITES
=============

* The ImageMagick package. Currently, convert and mogrify are
used. Find it here: https://www.imagemagick.org.

* For non-lossy rotation of JPEG images, the JpegTRAN program is
needed.

* For image-dired-get-exif-data and image-dired-set-exif-data to work,
the command line tool exiftool is needed. It can be found here: https://exiftool.org/. These two functions are, among other things, used for writing comments to image files using image-dired-thumbnail-set-image-description and to create
"unique" file names using image-dired-get-exif-file-name (used by
image-dired-copy-with-exif-file-name).

USAGE
=====

This information has been moved to the manual. Type C-h r to open the Emacs manual and go to the node Thumbnails by typing g Image-Dired RET.

Quickstart: M-x image-dired RET DIRNAME RET

where DIRNAME is a directory containing image files.

LIMITATIONS
===========

* Supports all image formats that Emacs and convert supports, but
the thumbnails are hard-coded to JPEG format.

* WARNING: The "database" format used might be changed so keep a
backup of image-dired-db-file when testing new versions.

* image-dired-display-image-mode does not support animation

TODO
====

* Support gallery creation when using per-directory thumbnail
storage.

* Some sort of auto-rotate function based on rotate info in the
EXIF data.

* Investigate if it is possible to also write the tags to the image
files.

* From thumbs.el: Add an option for clean-up/max-size functionality
  for thumbnail directory.

* From thumbs.el: Add setroot function.

* From thumbs.el: Add image resizing, if useful (image-dired's automatic
 "image fit" might be enough)

* From thumbs.el: Add the "modify" commands (emboss, negate,
  monochrome etc).

* Add image-dired-display-thumbs-ring and functions to cycle that. Find
out which is best, saving old batch just before inserting new, or saving the current batch in the ring when inserting it. Adding it probably needs rewriting image-dired-display-thumbs to be more general.

* Find some way of toggling on and off really nice keybindings in
dired (for example, using C-n or <down> instead of C-S-n). Richard suggested that we could keep C-t as prefix for image-dired commands as it is currently not used in dired. He also suggested that dired-next-line and dired-previous-line figure out if image-dired is enabled in the current buffer and, if it is, call image-dired-dired-next-line and image-dired-dired-previous-line, respectively. Update: This is partly done; some bindings have now been added to dired.

* Enhanced gallery creation with basic CSS-support and pagination
of tag pages with many pictures.

* Rewrite image-dired-modify-mark-on-thumb-original-file to be
less ugly.

* In some way keep track of buffers and windows and stuff so that
it works as the user expects.

* More/better documentation

Defined variables (73)

image-dired-append-when-browsingAppend thumbnails in thumbnail buffer when browsing.
image-dired-cmd-create-standard-thumbnail-optionsOptions for creating thumbnails according to the Thumbnail Managing Standard.
image-dired-cmd-create-temp-image-optionsOptions of command used to create temporary image for display window.
image-dired-cmd-create-temp-image-programExecutable used to create temporary image.
image-dired-cmd-create-thumbnail-optionsOptions of command used to create thumbnail image.
image-dired-cmd-create-thumbnail-programExecutable used to create thumbnail.
image-dired-cmd-optipng-optionsArguments passed to ‘image-dired-cmd-optipng-program’.
image-dired-cmd-optipng-programThe file name of the ‘optipng’ program.
image-dired-cmd-pngcrush-optionsArguments for ‘image-dired-cmd-pngcrush-program’.
image-dired-cmd-pngcrush-programThe file name of the ‘pngcrush’ program.
image-dired-cmd-pngnq-optionsArguments to pass ‘image-dired-cmd-pngnq-program’.
image-dired-cmd-pngnq-programThe file name of the ‘pngnq’ program.
image-dired-cmd-read-exif-data-optionsArguments of command used to read EXIF data.
image-dired-cmd-read-exif-data-programProgram used to read EXIF data to image.
image-dired-cmd-rotate-original-optionsArguments of command used to rotate original image.
image-dired-cmd-rotate-original-programExecutable used to rotate original image.
image-dired-cmd-rotate-thumbnail-optionsArguments of command used to rotate thumbnail image.
image-dired-cmd-rotate-thumbnail-programExecutable used to rotate thumbnail.
image-dired-cmd-write-exif-data-optionsArguments of command used to write EXIF data.
image-dired-cmd-write-exif-data-programProgram used to write EXIF data to image.
image-dired-db-fileDatabase file where file names and their associated tags are stored.
image-dired-dirDirectory where thumbnail images are stored.
image-dired-dired-disp-propsIf non-nil, display properties for Dired file when browsing.
image-dired-display-image-bufferWhere larger versions of the images are display.
image-dired-display-image-mode-abbrev-tableAbbrev table for ‘image-dired-display-image-mode’.
image-dired-display-image-mode-hookHook run after entering image-dired-image-display mode.
image-dired-display-image-mode-mapKeymap for ‘image-dired-display-image-mode’.
image-dired-display-image-mode-syntax-tableSyntax table for ‘image-dired-display-image-mode’.
image-dired-display-properties-formatDisplay format for thumbnail properties.
image-dired-display-window-height-correctionNumber to be used to correct image display window height.
image-dired-display-window-width-correctionNumber to be used to correct image display window width.
image-dired-external-viewerName of external viewer.
image-dired-file-comment-listList to store file comments.
image-dired-file-tag-listList to store file-tag structure.
image-dired-gallery-dirDirectory to store generated gallery html pages.
image-dired-gallery-hidden-tagsList of "hidden" tags.
image-dired-gallery-image-root-urlURL where the full size images are to be found.
image-dired-gallery-thumb-image-root-urlURL where the thumbnail images are to be found.
image-dired-line-up-methodDefault method for line-up of thumbnails in thumbnail buffer.
image-dired-main-image-directoryName of main image directory, if any.
image-dired-minor-modeNon-nil if Image-Dired minor mode is enabled.
image-dired-minor-mode-hookHook run after entering or leaving ‘image-dired-minor-mode’.
image-dired-minor-mode-mapKeymap for ‘image-dired-minor-mode’.
image-dired-queueList of items in the queue.
image-dired-queue-active-jobsNumber of active jobs in ‘image-dired-queue’.
image-dired-queue-active-limitMaximum number of concurrent jobs permitted for generating images.
image-dired-rotate-original-ask-before-overwriteConfirm overwrite of original file after rotate operation.
image-dired-saved-window-configurationSaved window configuration.
image-dired-show-all-from-dir-max-filesMaximum number of files to show using ‘image-dired-show-all-from-dir’
image-dired-slideshow-countKeeping track on number of images in slideshow.
image-dired-slideshow-timerSlideshow timer.
image-dired-slideshow-timesNumber of pictures to display in slideshow.
image-dired-tag-file-listList to store tag-file structure.
image-dired-tag-historyVariable holding the tag history.
image-dired-temp-image-fileName of temporary image file used by various commands.
image-dired-temp-rotate-image-fileTemporary file for rotate operations.
image-dired-thumb-heightHeight of thumbnails, in pixels.
image-dired-thumb-marginSize of the margin around thumbnails.
image-dired-thumb-reliefSize of button-like border around thumbnails.
image-dired-thumb-sizeSize of thumbnails, in pixels.
image-dired-thumb-visible-marksMake marks visible in thumbnail buffer.
image-dired-thumb-widthWidth of thumbnails, in pixels.
image-dired-thumbnail-bufferImage-Dired’s thumbnail buffer.
image-dired-thumbnail-mode-abbrev-tableAbbrev table for ‘image-dired-thumbnail-mode’.
image-dired-thumbnail-mode-hookHook run after entering image-dired-thumbnail mode.
image-dired-thumbnail-mode-line-up-mapKeymap for line-up commands in ‘image-dired-thumbnail-mode’.
image-dired-thumbnail-mode-mapKeymap for ‘image-dired-thumbnail-mode’.
image-dired-thumbnail-mode-syntax-tableSyntax table for ‘image-dired-thumbnail-mode’.
image-dired-thumbnail-mode-tag-mapKeymap for tag commands in ‘image-dired-thumbnail-mode’.
image-dired-thumbnail-storageHow to store image-dired’s thumbnail files.
image-dired-thumbs-per-rowNumber of thumbnails to display per row in thumb buffer.
image-dired-track-movementThe current state of the tracking and mirroring.
image-dired-widget-listList to keep track of meta data in edit buffer.

Defined functions (128)

image-dired(DIR)
image-dired--check-executable-exists(EXECUTABLE)
image-dired--line-up-with-method()
image-dired--with-db-file(&rest BODY)
image-dired--with-marked(&rest BODY)
image-dired-add-to-file-comment-list(FILE COMMENT)
image-dired-add-to-tag-file-list(TAG FILE)
image-dired-add-to-tag-file-lists(TAG FILE)
image-dired-associated-dired-buffer()
image-dired-associated-dired-buffer-window()
image-dired-backward-image(&optional ARG)
image-dired-comment-thumbnail()
image-dired-copy-with-exif-file-name()
image-dired-create-display-image-buffer()
image-dired-create-gallery-lists()
image-dired-create-thumb(ORIGINAL-FILE THUMBNAIL-FILE)
image-dired-create-thumb-1(ORIGINAL-FILE THUMBNAIL-FILE)
image-dired-create-thumbnail-buffer()
image-dired-create-thumbs(&optional ARG)
image-dired-delete-char()
image-dired-delete-marked()
image-dired-delete-tag(ARG)
image-dired-dir()
image-dired-dired-after-readin-hook()
image-dired-dired-comment-files()
image-dired-dired-display-external()
image-dired-dired-display-image(&optional ARG)
image-dired-dired-display-properties()
image-dired-dired-edit-comment-and-tags()
image-dired-dired-file-marked-p()
image-dired-dired-next-line(&optional ARG)
image-dired-dired-previous-line(&optional ARG)
image-dired-dired-toggle-marked-thumbs(&optional ARG)
image-dired-dired-with-window-configuration(DIR &optional ARG)
image-dired-display-current-image-full()
image-dired-display-current-image-sized()
image-dired-display-image(FILE &optional ORIGINAL-SIZE)
image-dired-display-image-mode()
image-dired-display-next-thumbnail-original()
image-dired-display-previous-thumbnail-original()
image-dired-display-thumb()
image-dired-display-thumb-properties()
image-dired-display-thumbnail-original-image(&optional ARG)
image-dired-display-thumbs(&optional ARG APPEND DO-NOT-POP)
image-dired-display-thumbs-append()
image-dired-display-window()
image-dired-display-window-height(WINDOW)
image-dired-display-window-width(WINDOW)
image-dired-file-name-at-point()
image-dired-flag-thumb-original-file()
image-dired-format-properties-string(BUF FILE PROPS COMMENT)
image-dired-forward-image(&optional ARG)
image-dired-gallery-generate()
image-dired-get-buffer-window(BUF)
image-dired-get-comment(FILE)
image-dired-get-exif-data(FILE TAG-NAME)
image-dired-get-exif-file-name(FILE)
image-dired-get-thumbnail-image(FILE)
image-dired-hidden-p(FILE)
image-dired-image-at-point-p()
image-dired-insert-image(FILE TYPE RELIEF MARGIN)
image-dired-insert-thumbnail(FILE ORIGINAL-FILE-NAME ASSOCIATED-DIRED-BUFFER)
image-dired-jump-original-dired-buffer()
image-dired-jump-thumbnail-buffer()
image-dired-line-up()
image-dired-line-up-dynamic()
image-dired-line-up-interactive()
image-dired-list-tags(FILE)
image-dired-mark-and-display-next()
image-dired-mark-tagged-files()
image-dired-mark-thumb-original-file()
image-dired-minor-mode(&optional ARG)
image-dired-modify-mark-on-thumb-original-file(COMMAND)
image-dired-mouse-display-image(EVENT)
image-dired-mouse-select-thumbnail(EVENT)
image-dired-mouse-toggle-mark(EVENT)
image-dired-mouse-toggle-mark-1()
image-dired-next-line()
image-dired-next-line-and-display()
image-dired-optipng-thumb(SPEC)
image-dired-original-file-name()
image-dired-pngcrush-thumb(SPEC)
image-dired-pngnq-thumb(SPEC)
image-dired-previous-line()
image-dired-previous-line-and-display()
image-dired-read-comment(&optional FILE)
image-dired-refresh-thumb()
image-dired-remove-tag(FILES TAG)
image-dired-restore-window-configuration()
image-dired-rotate-original(DEGREES)
image-dired-rotate-original-left()
image-dired-rotate-original-right()
image-dired-rotate-thumbnail(DEGREES)
image-dired-rotate-thumbnail-left()
image-dired-rotate-thumbnail-right()
image-dired-sane-db-file()
image-dired-save-information-from-widgets()
image-dired-set-exif-data(FILE TAG-NAME TAG-VALUE)
image-dired-setup-dired-keybindings(&optional ARG)
image-dired-show-all-from-dir(DIR)
image-dired-slideshow-start()
image-dired-slideshow-step()
image-dired-slideshow-stop()
image-dired-tag-files(ARG)
image-dired-tag-thumbnail()
image-dired-tag-thumbnail-remove()
image-dired-thumb-file-marked-p()
image-dired-thumb-name(FILE)
image-dired-thumb-queue-run()
image-dired-thumb-size(DIMENSION)
image-dired-thumb-update-marks()
image-dired-thumbnail-display-external()
image-dired-thumbnail-mode()
image-dired-thumbnail-set-image-description()
image-dired-thumbnail-window()
image-dired-toggle-append-browsing()
image-dired-toggle-dired-display-properties()
image-dired-toggle-mark-thumb-original-file()
image-dired-toggle-movement-tracking()
image-dired-track-original-file()
image-dired-track-thumbnail()
image-dired-unmark-thumb-original-file()
image-dired-update-property(PROP VALUE)
image-dired-window-height-pixels(WINDOW)
image-dired-window-width-pixels(WINDOW)
image-dired-write-comments(FILE-COMMENTS)
image-dired-write-tags(FILE-TAGS)
tumme(DIR)

Defined faces (1)

image-dired-thumb-markBackground-color for marked images in thumbnail buffer.