next up previous contents index
Next: Variable Types Up: tnimage-manual Previous: Loops and control structures   Contents   Index

Summary of macro commands

Tnimage can execute a series of predefined commands. This is particularly useful when a large number of images need to be processed in an identical manner. Technically, the macros in tnimage are not macros but small programs. The macro editor can also edit small text files (up to 255 lines), making it useful as a clipboard for making notes.

Macro commands consist of the text of one of the menu items, followed by a series of parameters which are usually numeric, in parentheses, separated by commas. For example, ``Open Image...'' becomes ``openimage''. If a sufficient number of arguments are given, the dialog box is bypassed and the command is executed. Image algebra (Sec. 12) commands can be freely interspersed with macro commands. Some of the more recently-added menu items may not be macro-ready, and using them will simply call up the dialog box.

The numbering of command parameters corresponds to the order in which the item would appear in the menu or dialog box. It is not necessary to give all the parameters. If a parameter is not given, it will be unchanged from the last time the command was executed.

If tnimage should crash due to an error in a macro, it is a bug. Please report it.

Here is a list of macro commands:

3d

3dplot

aboutthefile

abouttheimage

abouttheprogram

abs

acos

acosh

asin

atan

acquire

addborder

arrow

attributes

automaticundo

backgroundcolor

backgroundvalue

backup

bcolor

beep

between

border

box

brightness

calibration

camera

cancel

cbrt

cdensity

changecolordepth

changecolormap

changecontrast

changeimagedepth

changepalette Redraw current image using specified palette number.

changepixelvalues

changesize

changetitle

chromakey Toggles chromakey on or off for current image

circle

clearalpha

clearalphachannel

close Same as unload

color

color-$ >$grayscale

colorgrayscale

colorbrightness

colormap

compositergb combine 3 specified grayscale images into a single RGB color image.

configure

contrast See below

convert

copy

cos

cosh

countgrains

createfileformat

createimage see new

createresizeimage see new

crop

curve

curvedensitometry

darken decreases brightness by a fixed amount

deleteregion

densitometry

density

down Moves image down by the distance specified in `step'.

drawbox

drawcircle

drawfilledbox

drawfilledrectangle

drawlabel

drawline

drawrectangle

duplicate

else

erasebackground

erasefft

eraseimage

erf

evaluate Evaluate an expression (sec 12)

executeplugin executes specified plugin

exit

exp

fclose

fcolor

fft

fftdisplay

findspots

fileformat

fill

fillregion

filter filter current image or selected region (see below for details)

findspots

fliphoriz

fliphorizontally

flipvertically

font

fopen

for

foregroundcolor

foregroundvalue

frame selects frame of current multiframe image to display

freegraincountingarrays

getstring

goto

grains

grayscalecolor

grayscalecolor

grayscalemap

help

histogram

histogramequalize

if

image selects an image

imagemath

input

intensity changes contrast of image

invertcolors

invertregion

label

left Moves image left by the distance specified in `step'.

lighten increases brightness by a fixed amount

line Opens `line' dialog

linestyle

loadfft

loadimage

localcontrast

log

log10

loop

macro

manuallyselectarea

mask

math

max

maximize

maximizecontrast

measure

message

messages

min

morphfilter Morphological filtering

move Moves a portion of an image or area

movie

moveto

new Creates new image

null Unpushes null buttons

open Same as load

paint

paintregion

palette

partition

paste Paste current contents of region being copied.

partition

patternrecognition

pixelinteractmode

pixels

plugin executes specified plugin

pow

printimage

print Print an image if no parameters are given; otherwise, prints data to stdout.

quit

rand

rdensity

readfft

registration

remapcolors

repair

repeat

reselectarea Reactivates previously-selected non-rectangular selected area

resize

resizewindow

resizeimage creates a new image of different size

restore

right Moves image right by the distance specified in `step'.

root Puts image in root window

rootoffPuts image back in tnimage window

rootpermanent Sets X11 display background to the image

rotate

rotateimage

save

savefft

saveimage

savescandata

scan

scanner

scissors

select selects a region

selectarea start manually selecting an non-rectangular area

selectaregion

selectregion

selectimage switches focus to specified image

selectirregulararea

separatergb

setbcolor

setbackgroundcolor

set

setcolor Sets foreground drawing color

setfcolor

setforegroundcolor

setpixel

shift shift frame up/down or left/right

shiftframe

showalpha Temporarily display alpha channel on an image

showalphachannel Temporarily display alpha channel on an image

showcolormap

showselected Temporarily display selected region on an image

scan Same as ``acquire''

showodtable

showpalette

sin

sinh

size

slew

sketch

smooth

spotdensitometry

spotdensity

spotsignal

spotsize

spotx

spoty

spray

spreadsheet

sqrt

step

stop

stripdensitometry

switchselected If a non-rectangular region has been selected, selects the complement of this region instead.

switchto switches focus to image specified by name or image number.

tan

tanh

testplugin

textdirection

title

tracecurve

transparency Sets amount of transparency (0-100) for current image

undo Same as restore

unloadimage, close, erase, unload remove image specified by name or image number from memory.

unloadall remove all images

unsetpixel

unzoom

up Moves image up by the distance specified in `step'.

wallpaper Sets X11 display background to the image, tiling it if necessary to fill the screen

wantimagetitle Selects whether to superimpose image title on each image

warp

wavelets

whatis

while

windows Toggles separate window mode for new images

write Puts data into an open file

zoom


Of course, interactive commands (such as sketch and help ) are not too useful in a macro. But they can be quite useful as commands for user-defined buttons (Sec. 4.3).

Notes

  1. Any underline characters or spaces are stripped from the command before it is executed.
  2. Capitalization is not significant.
  3. Some commands work on the currently-selected image or region. Other commands, usually those that only could be applied to the entire image (such as the image name), take the image name as the first argument.
  4. The program is very liberal about syntax errors. This may change in the future.



Subsections
next up previous contents index
Next: Variable Types Up: tnimage-manual Previous: Loops and control structures   Contents   Index
root 2006-11-13