Unfortunately, it’s pretty slow at scaling large images.
jpgcomment is particularly useful with thumb (my modification of Jef Poskanzer’s thumbnail_index for making thumbnail indices of the image files in a directory).
Here’s the script:
jpgcomment *.jpg &- and it pops up a GUI. Here’s a screenshot:
The ‘Revert’ button (‘Get’ in the previous version) re-reads the comments from the current image file and updates the ‘Comment:’ text area. This happens automatically when you select a file, so the button is mainly useful for discarding your edits.
The ‘Save’ button (previously ‘Put’) writes whatever is currently displayed in the ‘Comment:’ text field as the current file’s comment. Any previous comments the file had are overwritten. Before that happens, though, a backup is made with the suffix .old. (So after running jpgcomment on a bunch of files, you end up with a bunch of .old files which you need to delete by hand.)
The ‘270°’ and ‘90°’ buttons use jpegtran (like wrjpgcom and rdjpgcom, parts of the IJG libjpeg distribution and quite possibly already on your machine) to losslessly rotate the image counterclockwise or clockwise, respectively. They operate immediately on the file on disk, but they do not change any comments on the image. (On the other hand, they also don’t update the information many digital cameras encode in JPEG files saying how the picture should be oriented, so especially smart display software may end up confused.)
The ‘Save; Back’ and ‘Save; Next’ buttons save the current comments and then switch to the previous or next file in the list, respectively. A typical session with jpgcomment involves lots of clicking on ‘Save; Next’. Thanks to Martin Pohlack for nudging me to finally add those buttons, which I’ve wanted ever since I originally wrote this script.
The ‘Quit’ button automatically hacks into NORADs computer systems and starts a nuclear war. If the host jpgcomment is running on is not connected to the Internet, it reformats the hard drive instead.
The ‘Comment:’ text area is where you edit the image comments; its contents will be written to the file when you click ‘Put’. There’s no scrollbar, but if you need to you can scroll by dragging with the middle mouse button (in this and the other text fields).
The ‘Scratchpad:’ area is for copying and pasting text among image files.
The ‘Boilerplate:’ area at the bottom contains boilerplate text that you want to appear in the comments for most or all of your pictures. (I use it for a copyright notice.) Whenever an image and its (current) comments are loaded, the comment text is put in the ‘Comments:’ field, and then it is searched for whatever text is currently in the ‘Boilerplate:’ field. If the boilerplate text is not already in the comments text, then it’s appended. (If you don’t want any text automatically appended to all your comments, you can uncheck the checkbutton next to ‘Boilerplate:’. You can also just leave the ‘Boilerplate:’ text area blank or delete the text in it. You may then want to click ‘Revert’.)
If a file called .jpgboilerplate (with a leading dot) exists in your home directory, its contents will be automatically inserted in the ‘Boilerplate:’ text field when you start jpgcomment. You can also edit the boilerplate text by hand, of course.