ImageStuff plugin for Take Command / TCC / 4NT

beta version 0.80.0     2019-02-06

Charles Dye

Purpose:

This plugin provides new commands to display information about image files, view images, perform basic image-editing tasks, print image files, and open the help file. It also offers several new functions to return information about image files.

ImageStuff relies heavily on Microsoft’s GDI+ interface, in particular the Image and Bitmap classes. I am unlikely ever to add any features not available through GDI+.

For a far more sophisticated image viewer and editor with tons of command-line options, check out IrfanView.

Dedication:

For R. G. L. Goldberg,
creator of relatively elegant designs

Installation:

To use this plugin, copy ImageStuff.dll and ImageStuff.chm to some known location on your hard drive. (If you are using the 64-bit version of Take Command, take ImageStuff-x64.dll instead of ImageStuff.dll.) Load the plugin with a PLUGIN /L command, for example:

plugin /l c:\bin\tcmd\test\imagestuff.dll

If you copy these files to a subdirectory named PlugIns within your Take Command program directory, the plugin will be loaded automatically when TCC starts.

Plugin Features:

New commands: EDITIMAGE, IMAGEINFO, IMGSTUFFHELP, PRINTIMAGE, VIEWIMAGE

New functions: @IMGARTIST, @IMGBPP, @IMGCOPYRIGHT, @IMGDATETIME, @IMGFILEEXT, @IMGFORMAT, @IMGHEIGHT, @IMGHRES, @IMGMAKE, @IMGMODEL, @IMGORIENT, @IMGPIXELS, @IMGSIZE, @IMGSOFTWARE, @IMGTITLE, @IMGVRES, @IMGWIDTH, @RANDIMG

New variable: _IMGEXT

Syntax Note:

The syntax definitions in the following text use these conventions for clarity:

BOLD CODEindicates text which must be typed exactly as shown.
CODEindicates optional text, which may be typed as shown or omitted.
Bold italicnames a required argument; a value must be supplied.
Regular italicnames an optional argument.
ellipsis…after an argument means that more than one may be given.

New Commands:


EDITIMAGE — Modifies an image and saves it to a new file.

Syntax:
EDITIMAGE /AB:n /AC:n /AG /AL:r,g,b /AN /AS:n /C:l,t,r,b /Etag:value /M /R:dir /S:x,y /T:"text" /V /Y sourcefile newfile

/AB:nadjust the image’s brightness
/AC:nadjust the image’s contrast
/AGconvert the image to grayscale
/AL:r,g,badjust color levels
/ANmake a negative; invert the colors
/AS:nadjust the image’s color saturation
/C:l,t,r,bcrop the image
/Etag:valueedit an Exif tag
/Mmirror the image (flip it left-to-right)
/R:dirrotate the image
/S:x,yresize the image
/T:"text"add text to the image
/Vopen the output file in a VIEWIMAGE window
/Ythe command may overwrite an existing file
sourcefilethe file containing the image to modify
newfilethe output file where the modified image will be saved

EDITIMAGE is a basic command-line image manipulation utility. It allows you perform some simple image-editing tasks from the command line or in a batch file. EDITIMAGE loads an image from the file sourcefile, makes some changes, and writes the altered image out to another file newfile; the original remains unchanged. Sourcefile is required. Newfile is required unless /V is specified. (If you use /V without giving a newfile, the resulting image will be sent to the viewer but not saved to disk; it will be lost when you close the viewer window.) Directory aliases are supported in both filenames, but wildcards are not legal in either (you can edit only one file at a time.)

newfile should end with an extension of .BMP, .JPG, .JPEG, .PNG, .GIF, .TIF, or .TIFF. The command uses the extension to determine the output file format. The output format does not need to match the input format; you can use this command to convert, say, a .BMP file into a .JPEG. If newfile exists and /Y was not specified, you’ll get an error message.

You can specify a sourcefile of CLIP: to load a bitmap from the clipboard. This will, of course, cause an error if the clipboard does not currently hold a bitmap. You can specify a newfile of CLIP: to save the modified image to the clipboard as a bitmap. If you use CLIP: for both sourcefile and newfile, the image will be loaded from the clipboard, modified, and written back to the clipboard, overwriting the original clipboard data. You can also use EDITIMAGE with no options to put an image from a file onto the clipboard, or to save a bitmap from the clipboard to a file.


/C:l,t,r,b allows you to crop an image. It takes four numeric parameters for the left, top, right, and bottom boundaries of the area to keep. All values (shown as n in the table below) may be entered in decimal, or in hexadecimal with a leading “0x”.

lThe left crop line, in pixels or as a percentage of the image’s original width:
 
npixels from the left edge
-npixels from the right edge
n%%from the left edge, as a fraction of the original width
-n%%from the right edge, as a fraction of the original width
tThe top crop line, in pixels or as a percentage of the image’s original height:
 
npixels from the top edge
-npixels from the bottom edge
n%%from the top edge, as a fraction of the original height
-n%%from the bottom edge, as a fraction of the original height
rThe right crop line, in pixels or as a percentage of the image’s original width:
 
npixels from the left edge
+npixels from the left crop line
-npixels from the right edge
n%%from the left edge, as a fraction of the original width
+n%%from the left crop line, as a fraction of the original width
-n%%from the right edge, as a fraction of the original width
bThe bottom crop line, in pixels or as a percentage of the image’s original height:
 
npixels from the top edge
+npixels from the top crop line
-npixels from the bottom edge
n%%from the top edge, as a fraction of the original height
+n%%from the top crop line, as a fraction of the original height
-n%%from the bottom edge, as a fraction of the original height

All crop borders are inclusive; the specified borders will be included in the output image. If you specify /C:10,10,20,20 then the cropped region will be eleven pixels wide and eleven pixels tall. If you omit any of l, t, r, or b, it will default to the corresponding edge of the source image.

If you want to enter a percentage, remember to double the percent sign. (It will be condensed to a single percent sign when variable expansion is performed.) Percentages must be between 0% and 100%, and you can only enter them as decimal — hexadecimal percentages are not supported.


The /R:dir option lets you rotate an image. It takes a single parameter, which indicates the direction to rotate. (Only the first letter is significant.)

Lturn the image left (counterclockwise) 90°
Rturn the image right (clockwise) 90°
Iinvert the image; turn it 180°
Aautomatic, according the the Exif “Orientation” tag. (If no Orientation tag is found, the image will not be rotated. If the Orientation tag is incorrect, then this option will automatically do the Wrong Thing.)

Use /S:x,y to resize an image. x is the new width and y is the new height. If you omit either dimension, it will be set according to the other to maintain the original aspect ratio. (Omitting both is of course an error.) Values may be either decimal, or hexadecimal with a leading “0x”. You may also give the new size as a percentage of the original width or height by typing a double percent sign after the value: /S:85%%,85%% or just /S:85%% will resize the graphic to 85% of its original width and height. (You can only enter percentages as decimal; hexadecimal percentages are not supported.)

•  Note: If you rotate the image 90° in either direction with /R:L, /R:R, or /R:A, and you also resize the image with /S:, then the two parameters to /S: will be exchanged automatically; the syntax becomes /S:y,x. You can disable this automatic swap by doubling the S: /SS:x,y. Using /SS: may produce distorted images if you rotate and resize images which aren’t square.


You can adjust the brightness or contrast of an image with /AB:n or /AC:n. In either option, n is a number from -100 to 100, with 0 being no change. In most cases you’ll want to keep n fairly close to zero. /AS:n lets you adjust the color saturation. n is from 0 to 200, with 0 being greyscale and 100 making no change; you’ll probably want to keep this close to 100.

You can adjust the levels of the three primary colors individually by using /AL:r,g,b. The values r, g, and b range from 0 to 255, with 100 being “no change”. If you omit any of the three, it defaults to 100. If you set all three to 0, this option is ignored (doing this would only produce a black image). Setting all three to 100 is also ignored, as it would not change the colors.

/AG takes an optional argument:

/AG:1uses NTSC biases for the red, green, and blue values (the default)
/AG:2treats red, green, and blue equally
/AG:3like /AG:1 but adds a slight sepia tint
/AG:4like /AG:1 but adds a more pronounced sepia tint

/T:"text" adds text to the image. You may include multiple /T: options to add more than one line of text. There are a handful of options to tweak the format. Type these before any /T: option you want to modify.

/TA:alignLeft, Right, or Center (default); only the first letter counts
/TC:colorTCC color number, W3C color name, or #rrggbb; the default is 15 / White / #FFFFFF
/TF:fontname,sizethe default is "Arial,12"
/TL:linevertical placement; from top unless negative; default is -1
/TS:stylesmay include I for italic, B for bold, U for underline; default is none

The /Etag:value option allows you to change or remove an Exif tag. Only a few tags are currently supported:

/EA:artistsets or removes the Artist tag
/EC:copyrightsets or removes the Copyright tag
/ED:date@timesets or removes the DateTime tag
/ES:softwaresets or removes the Software tag
/ET:titlesets or removes the ImageDescription tag
/EO:nsets or removes the Orientation tag

To remove a tag, don’t specify a value; for example, use /ES: to remove the Software tag. The time stamp for /ED: should be in the format yyyy-mm-dd@hh:mm:ss. The value for /EO: should be a number from 1 to 8, as per the @IMGORIENT function. String values should use only ASCII characters; the Exif standard does not support characters outside of the range 0 — 127. Remember to quote any value which contains spaces.


If multiple operations are requested, they happen in this order:

  1. The image is cropped according to /C:l,t,r,b.
  2. The image is rotated if /R:dir was specified.
  3. The image is mirrored if /M was specified.
  4. The image is resized if /S:x,y was given.
  5. The colors are adjusted if any of /AB:n, /AC:n, /AG, or /AN was given.
  6. Any /T:"text" is added.
  7. Any /Etag:value tags are edited.
  8. Finally, the image is saved to newfile.

This command reads from only one file at a time. To edit multiple files, you must call it in a loop, e.g. a DO loop or FOR loop in a batch file.


Examples:

rem  Convert a .JPG to a .BMP:
editimage bisti.jpg bisti.bmp

rem  Resize an image:
editimage /s:1024,768 bisti.jpg stretched.jpg

rem  Rotate an image 90 degrees left:
editimage /r:l "white sands.jpg" turned.jpg

rem  Split an image into halves:
editimage /c:,,-50%% "white sands.jpg" left-half.jpg
editimage /c:50%% "white sands.jpg" right-half.jpg
rem
rem  Can you figure out why I used -50%% instead of 50%%
rem  for the right crop line in the first EDITIMAGE?

rem  Add some text:
editimage /t:"Bisti Badlands, New Mexico" bisti.jpg titled.jpg

rem  Add the computer name and date at the top left:
editimage /ta:l /tl:1 /t:"%computername" /t:"%_isodate" "white sands.jpg" test.jpg

rem  Resize an image and add some fancy text:
set md=%@char[8212]
editimage /s:%_xpixels,%_ypixels /tc:#ccddff /tf:"times new roman,24" /ts:i /t:"%md Bisti Badlands, New Mexico %md" bisti.jpg wallpaper.jpg

rem  Add some informational tags:
editimage /ea:"Q. Q. Li" /et:"Bisti Badlands, New Mexico" bisti.jpg bisti2.jpg

rem  Copy an image onto the clipboard:
editimage bisti.jpg clip:

rem  Save the bitmap on the clipboard to a file:
editimage clip: Save.bmp



IMAGEINFO — Displays information about image files.

Syntax:
IMAGEINFO /A:attribs /B /C /M /N:flags /O /P /R /S /T:flags /Z filename…

/A:attribsselect files by attributes
/Bshow file sizes
/Cshow copyright info if available
/Mshow camera information if available
/N:flagsdisable features:
    D — do not search into hidden directories (with /S)
    J — do not search into junctions (with /S)
    Z — do not search into system directories (with /S)
/Oshow orientation info if available
/Ppage output
/Rshow the artist’s name if available
/Ssearch into subdirectories
/T:flagsshow time stamps; flags may include:
    M — the date and time the image was last modified
    O — the date and time the image was originally created
    D — the date and time the image was digitized
    F — the date and time from the file’s directory entry
    A — all of the above
/Zcombines /C, /M, and /R
filename…the file(s) to examine

You may supply more than one filename. Wildcards and directory aliases are supported. If filename names a directory, only files with extensions .BMP, .JPG, .JPEG, .PNG, .GIF, .ICO, .TIF, or .TIFF will be listed. If you don’t provide any filenames, the current directory is used by default.

If /T is specified without any flags, it is treated as /T:MOD.

IMAGEINFO also supports ranges.


imageinfo c:\download\*.jpg



IMGSTUFFHELP — Opens the ImageStuff plugin help file.

Syntax:
IMGSTUFFHELP topic

topicthe page to display

The IMGSTUFFHELP command will locate and open this plugin’s help file. In most cases, the internal HELP command, and the F1 and Ctrl-F1 keys, will be more convenient. The sole advantage to this command is that it can be used to open the help file to any desired topic, not only to the names of commands and functions.



PRINTIMAGE — Sends images to the printer.

Syntax:
PRINTIMAGE /A:attribs /F:"text" /H:"text" /N:flags /P:printer /Q /S filename…

/A:attribsselect files by attributes
/F:"text"add a footer
/H:"text"add a header
/Ndon’t actually print anything
/N:flagsdisable features:
    D — do not search into hidden directories (with /S)
    J — do not search into junctions (with /S)
    T — never turn the image to make it fit better
    Z — do not search into system directories (with /S)
/P:printerspecify the printer to use
/Qquietly
/Ssearch into subdirectories
filename…the file(s) to print

You may supply more than one filename. Wildcards and directory aliases are supported. If filename names a directory, only files with extensions .BMP, .JPG, .JPEG, .PNG, .GIF, .ICO, .TIF, or .TIFF will be printed. If you don’t provide any filenames, the current directory is used by default.

•  Note: This command supports wildcards and /S; it can dump a lot of pages to the printer! It’s a good idea to try it with the /N option first, to see how many files would be printed. Measure twice, cut once.

You may create a header with /H:text, a footer with /F:text, or both. Quote the text if it contains spaces, or if it might contain spaces. Either may include variables and functions (remember to double the percent signs so they aren’t expanded before the command runs). A special variable %_FILE will return the filename of the image. If you do not specify either a header or a footer, you’ll get a default header of %_FILE. There are a few extra options to tweak the format of the header and footer:

/HF:fontname,sizeheader font; the default is "Book Antiqua,10"
/FF:fontname,sizefooter font; defaults to match the header font
/HS:stylesheader style; may include I for italic, B for bold, U for underline; default is none
/FS:stylesfooter style; may include I for italic, B for bold, U for underline; default is none

PRINTIMAGE also supports ranges.



VIEWIMAGE — Views an image file.

Syntax:
VIEWIMAGE /N /R filename

/Ndisplay the image in a normal window
/Rauto-rotate according to the image’s Orientation tag, if any
filenamethe file to view

This is a very simple image viewer. To dismiss the viewer window, press ESC.

Note that VIEWIMAGE does not support wildcards or /S. If it did, a single command could open hundreds or even thousands of GDI+ viewer windows at a time — bringing your computer to its knees. If you really want to open multiple viewer windows at once, call VIEWIMAGE from a DO loop or a FOR loop.

If the clipboard currently holds a bitmapped image, you can view it using VIEWIMAGE CLIP:

In the image viewer, you can press:

Ifor a popup message box with information about the image
Ctrl-C or Ctrl-Insto copy the image to the clipboard (unless you are viewing CLIP:)
Esc or Alt-F4to close the viewer window

If any VIEWIMAGE windows remain open when you unload the plugin, they will be closed automatically.



New Functions:


@IMGARTIST — Returns the name of an image file’s creator.

Syntax:
%@IMGARTIST[filename]

filenamethe file to examine

If no “Artist” tag is found in the file, this function returns N/A.



@IMGBPP — Returns the bits per pixel in an image file.

Syntax:
%@IMGBPP[filename]

filenamethe file to examine


@IMGCOPYRIGHT — Returns copyright information from an image file.

Syntax:
%@IMGCOPYRIGHT[filename]

filenamethe file to examine

If no “Copyright” tag is found in the file, this function returns N/A.



@IMGDATETIME — Returns a date-and-time stamp from an image file.

Syntax:
%@IMGDATETIME[filename,n]

filenamethe file to examine
nwhich time stamp to return:
    0 — last modification (the default)
    1 — original
    2 — digitized

The date and time stamp will be returned as YYYY-MM-DD HH:MM:SS (ISO 8601 date format and 24-hour time). If date-and-time info is not stored in the file, this function will return N/A.

Note that a comma is used to separate the optional second argument. If the filename contains commas, you must quote it.



@IMGFILEEXT — Checks whether a filename ends in a supported graphics-file extension.

Syntax:
%@IMGFILEEXT[filename]

This function returns 1 if the file has an image file extension recognized by this plugin, or 0 if the file extension is missing or not recognized. You can use this function in a DO or FOR loop to pick out just the graphics files.

This function only examines the filename’s extension. It does not check whether the filename is valid or the file exists, or attempt to open the file and examine its contents.


alias v=`%@if[%@imgfileext[%1] == 1,*viewimage,*view] %$`



@IMGFORMAT — Returns an image file’s format.

Syntax:
%@IMGFORMAT[filename]

filenamethe file to examine

Possible return values include: BMP, JPEG, PNG, GIF, TIFF, EXIF, Icon, EMF, WMF, and Unknown.



@IMGHEIGHT — Returns the height, in pixels, of an image file.

Syntax:
%@IMGHEIGHT[filename]

filenamethe file to examine

c:\imagestuff> echo %@imgheight["white sands.jpg"]
493

c:\imagestuff>



@IMGHRES — Returns the horizontal resolution of an image file, in pixels per inch.

Syntax:
%@IMGHRES[filename]

filenamethe file to examine

•  Note: If the file does not contain resolution information, Windows will return a bogus value based on your screen text size settings!



@IMGMAKE — Returns the scanner or camera manufacturer from an image file.

Syntax:
%@IMGMAKE[filename]

filenamethe file to examine

If no “Make” tag is found in the file, this function returns N/A.



@IMGMODEL — Returns the scanner or camera model from an image file.

Syntax:
%@IMGMODEL[filename]

filenamethe file to examine

If no “Model” tag is found in the file, this function returns N/A.



@IMGORIENT — Returns the orientation of an image file.

Syntax:
%@IMGORIENT[filename]

filenamethe file to examine

The most common return values are:

N/Aorientation info is not present in the file
1normal — camera upright
3camera held upside-down
6camera held with the left side up
8camera held with the right side up

The other possible return values are mirrored variants of the first four.

1234
Mona Lisa, orientation 1 (top/left)Mona Lisa, orientation 2 (top/right)Mona Lisa, orientation 3 (bottom/right)Mona Lisa, orientation 4 (bottom/left)
  
5678
Mona Lisa, orientation 5 (left/top)Mona Lisa, orientation 6 (right/top)Mona Lisa, orientation 7 (right/bottom)Mona Lisa, orientation 8 (left/bottom)


@IMGPIXELS — Returns the number of pixels in an image file.

Syntax:
%@IMGPIXELS[filename]

filenamethe file to examine

The return value is the product of the image’s width and height. This function works like @IMGSIZE, only it does the implied multiplication.


c:\imagestuff> echo %@imgpixels[bisti.jpg]
272640

c:\imagestuff>



@IMGSIZE — Returns the height and width of an image file.

Syntax:
%@IMGSIZE[filename]

filenamethe file to examine

The size will be returned as width x height.


c:\imagestuff> echo %@imgsize[bisti.jpg]
640 x 426

c:\imagestuff>



@IMGSOFTWARE — Returns the name and version of the software package used to create or edit an image file.

Syntax:
%@IMGSOFTWARE[filename]

filenamethe file to examine

If no “Software” tag is found in the file, this function returns N/A.



@IMGTITLE — Returns a description from an image file.

Syntax:
%@IMGTITLE[filename]

filenamethe file to examine

If no “ImageDescription” tag is found in the file, this function returns N/A.



@IMGVRES — Returns the vertical resolution of an image file, in pixels per inch.

Syntax:
%@IMGVRES[filename]

filenamethe file to examine

•  Note: If the file does not contain resolution information, Windows will return a bogus value based on your screen text size settings!



@IMGWIDTH — Returns the width, in pixels, of an image file.

Syntax:
%@IMGWIDTH[filename]

filenamethe file to examine

c:\imagestuff> echo %@imgwidth["white sands.jpg"]
900

c:\imagestuff>



@RANDIMG — Returns a random image filename.

Syntax:
%@RANDIMG[directory,recurse]

directorywhere to search for image files; defaults to the current directory
recurse1 search into subdirectories; 0 don’t (the default)

This function builds a list of image files in the specified directory, selects one at random, and returns its filename. The filename returned will be fully qualified and unquoted. If no files with a recognized image extension are found, the function returns an empty string. Quote the directory if it contains spaces, commas, or other characters with special significance to TCC.

Files with extensions of .BMP, .JPG, .JPEG, .PNG, .GIF, .TIF, .TIFF, .ICO, .EMF, and .WMF are assumed to be image files.

•  Note: Recursively searching through a large directory such as the Windows directory can make this function very slow!


rem  View a random image file:

viewimage "%@randimg[c:\windows\web\wallpaper,1]"



New Variable:


_IMGEXT — Returns a list of image file extensions.

Syntax:
%_IMGEXT

This variable returns a list of the file extensions which this plugin considers “image” file types. Extensions are separated with semicolons.


dir %_imgext



Ranges:


Ranges are supported in IMAGEINFO and PRINTIMAGE.


Size range:  /[Ssmallest,largest]

You may omit either smallest or largest. You may qualify either with a trailing letter: lowercase k, m, g, etc. to multiply by one thousand, one million, one billion, and so on; or uppercase K, M, G, etc. to multiply by 210, 220, 230, and so on. If largest begins with a + sign, it is an increment over smallest. Use /!S[smallest,largest] to invert the test and return only files not in the given size range.

Date range:  /[D[acw]:earliest,latest]

You may omit either earliest or latest; either defaults to the current date. The optional [acw] argument selects the date stamp to check. (If you want to check more than one date stamp, you must supply more than one date range option.) The colon after the [acw] is optional.

Dates may be given in the local date format, or in yyyy-mm-dd format (with a four-digit year). You may also specify a date as an offset preceded with a + or - sign; the offset is in days relative to today’s date (for earliest) or relative to earliest (in the case of latest). If earliest turns out to be later than latest then the two are exchanged.

You may also give a specific time on either date, preceded by an @ sign. The time may be in either 24-hour format, or 12-hour format with a trailing A or P.

Use /!D[[acw]:earliest,latest] to invert the test and return only files not in the given date range.

Time range:  /[T[acw]:earliest,latest]

You may omit either earliest or latest. The optional [acw] argument selects the time stamp to check. (If you want to check more than one time stamp, you must supply more than one time range option.) The colon after the [acw] is optional. Times may be in either 24-hour format, or 12-hour format with a trailing A or P.

Use /!T[[acw]:earliest,latest] to invert the test and return only files not in the given time range.

Exclusion range:  /[!wildspec]

Filenames matching the wildspec will be excluded. You can supply more than one wildspec by separating them with (unquoted) spaces.

Owner range:  /[Owildspec]

Files whose owners (in domain\user format) do not match the wildspec will be skipped. Use /![Owildspec] to invert the test and return only files which do not match the owner wildspec.

Description range:  /Iwildspec or (alternate syntax) /[Iwildspec]

If a file’s description does not match the wildspec, it will be skipped. Use /!Iwildspec to invert the test, returning only files which do not match the description wildspec.

Day-of-the-week range:  /[W[acw]:days]

You may specify multiple days separated by commas, e.g. /[W:MON,WED,FRI]. You can also give a range, for example /[W:TUE-FRI]. WEEKENDS is accepted as a synonym for SAT,SUN; WEEKDAYS is a synonym for MON-FRI. The colon in this syntax is required.

You may supply multiple ranges. A file must match all given ranges or it will be skipped.

W3C Color Names:

This plugin uses W3C color names, not the much shorter list of VGA colors familiar from most TCC commands and functions. Here is a list of the color names supported by this plugin, with their equivalent values. (Names containing “gray” may be spelled using “grey” if you prefer.)

  AliceBlue 0xF0F8FF   LightSalmon 0xFFA07A
  AntiqueWhite 0xFAEBD7   LightSeaGreen 0x20B2AA
  Aqua 0x00FFFF   LightSkyBlue 0x87CEFA
  Aquamarine 0x7FFFD4   LightSlateGray 0x778899
  Azure 0xF0FFFF   LightSteelBlue 0xB0C4DE
  Beige 0xF5F5DC   LightYellow 0xFFFFE0
  Bisque 0xFFE4C4   Lime 0x00FF00
  Black 0x000000   LimeGreen 0x32CD32
  BlanchedAlmond 0xFFEBCD   Linen 0xFAF0E6
  Blue 0x0000FF   Magenta 0xFF00FF
  BlueViolet 0x8A2BE2   Maroon 0x800000
  Brown 0xA52A2A   MediumAquaMarine 0x66CDAA
  BurlyWood 0xDEB887   MediumBlue 0x0000CD
  CadetBlue 0x5F9EA0   MediumOrchid 0xBA55D3
  Chartreuse 0x7FFF00   MediumPurple 0x9370DB
  Chocolate 0xD2691E   MediumSeaGreen 0x3CB371
  Coral 0xFF7F50   MediumSlateBlue 0x7B68EE
  CornflowerBlue 0x6495ED   MediumSpringGreen 0x00FA9A
  Cornsilk 0xFFF8DC   MediumTurquoise 0x48D1CC
  Crimson 0xDC143C   MediumVioletRed 0xC71585
  Cyan 0x00FFFF   MidnightBlue 0x191970
  DarkBlue 0x00008B   MintCream 0xF5FFFA
  DarkCyan 0x008B8B   MistyRose 0xFFE4E1
  DarkGoldenrod 0xB8860B   Moccasin 0xFFE4B5
  DarkGray 0xA9A9A9   NavajoWhite 0xFFDEAD
  DarkGreen 0x006400   Navy 0x000080
  DarkKhaki 0xBDB76B   OldLace 0xFDF5E6
  DarkMagenta 0x8B008B   Olive 0x808000
  DarkOliveGreen 0x556B2F   OliveDrab 0x6B8E23
  DarkOrange 0xFF8C00   Orange 0xFFA500
  DarkOrchid 0x9932CC   OrangeRed 0xFF4500
  DarkRed 0x8B0000   Orchid 0xDA70D6
  DarkSalmon 0xE9967A   PaleGoldenrod 0xEEE8AA
  DarkSeaGreen 0x8FBC8F   PaleGreen 0x98FB98
  DarkSlateBlue 0x483D8B   PaleTurquoise 0xAFEEEE
  DarkSlateGray 0x2F4F4F   PaleVioletRed 0xDB7093
  DarkTurquoise 0x00CED1   PapayaWhip 0xFFEFD5
  DarkViolet 0x9400D3   PeachPuff 0xFFDAB9
  DeepPink 0xFF1493   Peru 0xCD853F
  DeepSkyBlue 0x00BFFF   Pink 0xFFC0CB
  DimGray 0x696969   Plum 0xDDA0DD
  DodgerBlue 0x1E90FF   PowderBlue 0xB0E0E6
  FireBrick 0xB22222   Purple 0x800080
  FloralWhite 0xFFFAF0   Red 0xFF0000
  ForestGreen 0x228B22   RosyBrown 0xBC8F8F
  Fuchsia 0xFF00FF   RoyalBlue 0x4169E1
  Gainsboro 0xDCDCDC   SaddleBrown 0x8B4513
  GhostWhite 0xF8F8FF   Salmon 0xFA8072
  Gold 0xFFD700   SandyBrown 0xF4A460
  Goldenrod 0xDAA520   SeaGreen 0x2E8B57
  Gray 0x808080   Seashell 0xFFF5EE
  Green 0x008000   Sienna 0xA0522D
  GreenYellow 0xADFF2F   Silver 0xC0C0C0
  Honeydew 0xF0FFF0   SkyBlue 0x87CEEB
  Hotpink 0xFF69B4   SlateBlue 0x6A5ACD
  IndianRed 0xCD5C5C   SlateGray 0x708090
  Indigo 0x4B0082   Snow 0xFFFAFA
  Ivory 0xFFFFF0   SpringGreen 0x00FF7F
  Khaki 0xF0E68C   SteelBlue 0x4682B4
  Lavender 0xE6E6FA   Tan 0xD2B48C
  LavenderBlush 0xFFF0F5   Teal 0x008080
  LawnGreen 0x7CFC00   Thistle 0xD8BFD8
  LemonChiffon 0xFFFACD   Tomato 0xFF6347
  LightBlue 0xADD8E6   Turquoise 0x40E0D0
  LightCoral 0xF08080   Violet 0xEE82EE
  LightCyan 0xE0FFFF   Wheat 0xF5DEB3
  LightGoldenrodYellow 0xFAFAD2   White 0xFFFFFF
  LightGray 0xD3D3D3   WhiteSmoke 0xF5F5F5
  LightGreen 0x90EE90   Yellow 0xFFFF00
  LightPink 0xFFB6C1   YellowGreen 0x9ACD32

Startup Message:

This plugin displays an informational line when it initializes. The message will be suppressed in transient or pipe shells. You can disable it for all shells by defining an environment variable named NOLOADMSG, for example:

set /e /u noloadmsg=1

Acknowledgments:

The EDITIMAGE color adjustment options are enormously endebted to an article by Cesar Chalom. The save-to-clipboard code is borrowed almost verbatim from a snippet by Michael Phillips, Jr.

The VIEWIMAGE window’s icon is by Fernando Gómez. The background texture is derived from one at TextureKing.com, and the “Copy” confirmation beep is from SoundJay.com.

The sample image files are by Q. Q. Li (Bisti Badlands) and B. E. Foster (White Sands).

None of the above endorses me or this plugin. Nor does Leonardo da Vinci.

Status and Licensing:

Consider this beta software. It may well have issues. Try it at your own risk. If you find a problem, you can report it in the JP Software support forum.

ImageStuff is currently licensed only for testing purposes. I may make binaries and source code available under some free license once I consider it ready for use.

Download:

You can download the current version of the plugin from http://prospero.unm.edu/dl/imagestuff.zip or ftp://prospero.unm.edu/imagestuff.zip.