6

From the built-in and MELPA available packages, which combination offers the easiest approach to managing a large collection of images (over 100K) in various formats (raw, jpg, tiff, png). I mainly want to view thumbnails, view full images to fit on screen, mark for deletion, copy, or move actual image files locally and sometimes to remote locations using tramp. Either Mac OS X or Linux compatibility is acceptable. I do not want to edit the actual images themselves (such as scaling, rotating, and similar image alterations).

  • qlmanage is a built-in feature on OSX that can be accessed with start-process in a dired-mode buffer -- I have mine set so space-bar shows the image, and space-bar removes the image. This is the same behavior that a user experiences when using Finder.app on OSX. The only difference is that the name of the image at the top says [DEBUG] [name of file] -- since qlmanage is used for debugging. I also have it linked to the up/down arrow keys so that if I am on a file in dired-mode with qlmanage active, the image changes as I move up/down to the next/previous file. – lawlist May 30 '15 at 20:23
  • Here is a link to a thread that demonstrates how to use qlmanage with dired-mode on a file-by-file basis: stackoverflow.com/q/20023458/2112489 – lawlist May 30 '15 at 20:31
  • If you already have an eternal & nice image viewer, open-with-mode could be interesting – Nsukami _ May 31 '15 at 0:52
  • 1
    @Dan, I've tried the following with varying degrees of success and frustration -- all on Mac OS X: dired+, image-Dired+, imgix, look-mode, image+, eimp, and image-dired. I'm going with the sanest option: dired+ for now. – Emacs User May 31 '15 at 1:30
  • @lawlist, qlmanage is indeed something I've overlooked. Thanks for pointing this out. It is the fastest rendering solution on Mac OS X based on cursory testing. It also has the lowest memory footprint and renders eps files on the fly to boot, which I can use for another project that relies of gnuplot files. I'll explore this Mac-only solution when I get more time, especially killing the last process through dired. Very ingenious. Thank you very much. – Emacs User May 31 '15 at 1:43
4

Others will no doubt mention packages that are made specifically for handling images. This answer, about some more general features, might nevertheless help.

  1. Dired+ provides a few enhancements regarding image files.

    Most of these require standard library image-dired.el. One of them, command diredp-do-display-images, which displays all of the marked image files, requires standard library image-file.el. (Dired+ loads these libraries automatically, if available. You must of course also have installed whatever else your Emacs version needs to display images.)

    Besides command diredp-do-display-images, there are these commands, whose names have prefix diredp-image-.

    • diredp-image-dired-comment-file -- Add a comment to an image file.
    • diredp-image-dired-comment-files-recursive -- Add a comment to the marked files, including those in marked subdirs.
    • diredp-image-dired-copy-with-exif-name -- Copy this image file to your main image directory.
    • diredp-image-dired-create-thumb -- Create or (with C-u) replace a thumbnail image for a file (default: file on current line).
    • diredp-image-dired-delete-tag -- Remove an image-dired tag from this image file.
    • diredp-image-dired-delete-tag-recursive -- Remove an image-dired tag from the marked files, including those in marked subdirs.
    • diredp-image-dired-display-thumb -- Pop to a thumbnail of this image file, in image-dired-thumbnail-buffer.
    • diredp-image-dired-display-thumbs-recursive -- Display thumbnails of the marked files, including those in marked subdirs.
    • diredp-image-dired-edit-comment-and-tags -- Edit the image-dired comment and tags for this image file.
    • diredp-image-dired-tag-file -- Tag this image file with an image-dired tag.
    • diredp-image-dired-tag-files-recursive -- Tag the marked files with an `image-dired' tag, including those in marked subdirs.

    These options control the behavior of tooltip previews of image files:

    • diredp-image-preview-in-tooltip -- Whether to show a tooltip preview on mouseover, and if so, whether to show the full image or just a thumbnail (and what size thumbnail).

    • diredp-auto-focus-frame-for-thumbnail-tooltip-flag -- Whether to automatically focus the frame (so a thumbnail is shown on mouseover of a frame that is not yet focussed).

  2. Bookmark+ lets you tag files, including image files, more flexibly than what you can do with image-dired tags. Dired+ lets you act on files that are tagged this way (using Bookmark+). You can easily:

    • Add or remove tags to/from the marked files.
    • Copy the tags from one file and paste them to other files, either adding them to tags those files already have or replacing those tags.
    • Set the value of a given tag for all of the marked files. (Yes, tags can have Lisp values; they need not be just strings.)
  3. Bookmark+ also gives you multiple ways to define and manipulate sets of bookmarks, which can for example be tagged image files. You can, for instance, create a bookmark that when "jumped to" puts you in a Dired buffer of image files. Or a bookmark that opens a bookmark display list of bookmarks that each display an image. There are many possibilities for using bookmarks, and particularly bookmark tags, with images.

  • What an excellent answer! I wish I could mark your answer as the right one. – ReneFroger May 30 '15 at 22:26
  • 1
    Yes indeed, thanks for the excellent answer, @Drew. Dired+ serves my immediate needs, which are mostly file management functions where viewing is important but not the bulk of the actions. Your bookmark+ ideas augment my needs as well. I never thought of tags with images. Lisp values in tags can help me automate cloud backup, which is the next step in my workflow. Thanks much. I'll have to figure out how to view files by default scaled to the window size. Now by default, each image seems to open 100% and I've to resize to fit to height or width. Is there a way to avoid this step? – Emacs User May 31 '15 at 2:04
  • AFAIK, unless your Emacs is built with ImageMagick support there is no general way to size a displayed image, in general. (You can specify the size of an XBM image or a PostScript image, but not in general, AFAIK.) However, you can specify a minimum window size for display, and use image-dired-display-image to shrink it to fit that. – Drew May 31 '15 at 18:34
  • 1
    I've added to dired+.el command diredp-image-show-this-file, bound to C-t I, which lets you show the image of the current line either full size or with a minimum height of prefix-arg lines. – Drew May 31 '15 at 18:38
0

Suppose you have the following situation:

  • Open with Dired a directory with many pictures having the default camera names, for example IMAG1590.jpg.
  • Want to promptly localize one of the pics.

If, in addition to Dired+, you also have installed Drew's Icicles, then the buffer with the completions shows together the pic name and its thumbnail:

1. j TAB ; shows all the pics

If there are lot of pics, you might want switch to the buffer with the completions to see all the thumbnails using: C-x o C-x o.

2. If you want you can restrict the candidates to show:

j IMAG159* TAB

This restricts to pics: IMAG1590.jpg, IMAG1591.jpg, ..., IMAG1599.jpg.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.