Fred's ImageMagick Scripts

Announcements pertaining to ImageMagick, or ImageMagick related software. This list is moderated. No discussions here, instead post to the users group instead.
Post Reply
User avatar
fmw42
Posts: 22084
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Fred's ImageMagick Scripts

Post by fmw42 » 2007-09-06T10:22:09-07:00

Hello Everyone,

I was relatively new to IM back in 2007, but have had many years of image
processing background. I have over the years, since then, developed some
bash scripts to process images using IM in some new ways and would like
to offer those to anyone interested. They are free for non-commercial use.
For commercial use, please contact me (fmw at alink dot net) to
license any of them.

I have posted these scripts on my web
site at:

http://www.fmwconcepts.com/imagemagick/index.html

You will find information about each script, examples and comparisons
and be able to download the scripts from this web site.

Any comments and feedback are welcome.

There is a Fred's Script forum here for questions or problems,
but feel free to contact me directly at my email address as well.

I will be posting new scripts from time to time as I implement some
other interesting functions that I have in mind.

The scripts that I have posted so far are as follows:

2colorthresh --- Automatically thresholds an image to binary (b/w) format using an adaptive spatial subdivision color reduction technique.

3Dbox --- Generates a perspective view of a 3D box at any orientation with pictures pasted on each of its sides

3Dcover --- Wraps an image around the front and left or right side of box viewed in rotated perspective.

3Dreflection --- Adds a fading reflection below an image and views it in perspective.

3Drotate --- Applies a perspective distortion to an image by providing three rotation angles, zoom, offsets, background color, perspective exaggeration and auto zoom/centering

3Dtext --- Converts text into an image with a 3D extrusion effect.

accentedges --- Applies accented edges to an image.

adaptivegamma --- Enhances the contrast/brightness in an image using a locally adaptive gamma method.

adjoin --- Appends multiple images together with positional justification.

anglegradient --- Creates a gradient effect at a specific orientation angle.

aspect --- Resizes an image to a specific size allowing either cropping or padding to deal with the aspect ratio change

aspectpad --- Crops an image to a specified aspect ratio.

aspectpad --- Pads an image with a color to a specified aspect ratio and orientation.

autocaption --- Places text automatically in a specified square size region that has the least color variation.

autocolor --- Automatically color balances an image.

autogamma --- Modifies an image to automatically apply a gamma correction.

autolabel --- Places text automatically in a specified size region that best matches a reference color.

autolevel --- Modifies an image to automatically stretch the dynamic range between full black and white and automatically apply a gamma correction.

autotone --- Automatically tone balances an image.

autotone2 --- Automatically tone balances an image.

autotrim --- Automatically trims the background border around a normally oriented or rotated image

balance --- Enhances the shadows, midtones and highlight regions of the image.

bcimage --- Changes the brightness, contrast and/or saturation of an image

bcmatch --- Modifies one image to try to match its brightness, contrast and optionally saturation to that of another image.

bevel --- Applies an inner bevel or outer bevel or emboss effect to an image.

bevelborder --- Applies a bevel effect to border of an image.

bilinearwarp --- Generates a proper four-point bilinear warp of the input image.

binomial --- Generates high pass or low pass filtered images based upon convolution kernels whose weights are derived from the binomial coefficients

binomialedge --- Sharpens (or blurs) an image near edges using a Binomial shaped filter.

bordereffects --- Creates various dispersion-like effects in the border of an image.

bordergrid --- Creates various grid effects in the border of an image.

bubblewarp --- Applies or reverses a warp of an image onto a bubble.

bump --- Applies a hemispherical-like bump distortion to an image.

bumptext --- Applies a raised text effect onto an image.

camerablur --- Blurs an image in the frequency domain using an ideal blurring filter for either motion blur or lens defocus.

cameradeblur --- Deblurs an image in the frequency domain using an ideal deblurring filter for either motion blur or lens defocus.

captcha --- Creates a six-alphanumeric-character image for use as a challenge response test.

cartoon --- Creates a cartoon-like appearance to an image.

centertrim --- Trims an image so as to preserve the image center.

cepstrum --- Creates the cepstrum to depict the type, amount and orientation of camera type blurring in an image.

chrome --- Applies a chrome effect to a binary image.

clip --- Stretches the channels of an image to full black and white according to a clip amount on each end of the histogram.

collage --- Creates a multi-variant collage of the input image.

color2alpha --- Creates a ramped alpha channel from the input image according to the specified color.

color2gray --- Mixes the color channels from an image into a single grayscale image using a weighted combination.

coloration --- Mixes the color channels from an image into a grayscale image and then tints it.

colorbalance --- Manually color balances an image in midtones, highlights, shadows or overall.

colorbalance2 --- Manually color balances an image in midtones, highlights, or shadows.

colorboost --- Enhances the color in an under saturated image.

colorcells --- Randomly modifies the color of rectangular cells of an image.

colorconverter --- To convert any valid ImageMagick color specification to the other ImageMagick color representations.

colorfilter --- Applies a photographic color filter to an image.

colorfulness --- Computes a metric that represents the colorfulness of an image.

colorglow --- Applies a color glow effect to an image.

colorspectrum --- Generates a spectrum-like image from the colors in an image.

colortemp --- Transforms an image's overall color balance according to a desired color temperature change.

colortoning --- Color tones an image in highlights and/or shadows and/or overall.

cone --- Draws a cone-shaped object on an image.

conformal --- Applies a conformal mapping to an image.

corners --- Detects corner structures in an image.

cosinebell --- Creates a cosine-bell-shaped tapered alpha channel in an image and optionally blends the image into a background image.

crosshatch --- Applies a crosshatch effect to an image.

crossprocess --- Applies a color crossprocessing effect to an image.

cube2sphericalpano --- Transforms 6 cube face images into a spherical panorama image.

cumhist --- Creates the combined grayscale cumulative histogram of one or more images.

curves --- Generate a smoothly interpolated, curved mapping look up table from a set of break points and applies it to an image.

cylinderize --- Applies a cylinder distortion to an image so that the image is wrapped about the cylinder.

cylinderwarp --- Applies a cylinder distortion to an image using a displacement map and arguments provided by the script cylinderize.

davehilleffect --- Applies a DaveHill-like effect to an image.

defisheye --- Corrects for fisheye distortion in an image.

denoise --- Reduces the noise in an image.

derivative --- Applies a first directional derivative filter to an image.

diagcollage --- Collages three images in a diagonal orientation.

dice --- Randomly rotates each successive square-sized patch in the image.

disperse --- Applies a dispersion effect to an image.

dog --- Create an edge extracted image using the difference of two Gaussian blurs.

dominantcolor --- Finds the dominant color in an image.

dotproductcorr --- Computes the dot product correlation surface to find where a small image best matches within a larger image.

downsize --- Downsizes (reduces) an image to a specified file size.

draganeffect --- Applies a Dragan-like effect to an image to enhance wrinkles creating a 'gritty' effect.

dualtonemap --- Enhances the shadows and/or highlight regions in an image.

duotonemap --- Enhances the shadows and/or highlight regions in an image.

edgefx --- Extracts the edges in an image and optionally composes them with the image to create interesting effects.

edges --- Applies edge extraction to image.

emboss --- Applies an emboss effect to an image.

embroidery --- Applies an embroidery effect to each color in an image.

endpoints --- Applies a Photoshop-like curves operation on an image that only adjusts the linear endpoints.

enhancelab --- Applies brightness/contrast/colorization enhancement on an image via LAB colorspace.

enrich --- Enhances an image by high pass filtering and composition.

entropy --- Computes the normalized entropy of an image channel-by-channel.

exposure --- Changes the exposure level of an image.

feather --- Feathers (smoothes) the white-to-black transition in a binary mask image.

fftconvol --- Performs convolution on an image in the frequency domain.

fftdeconvol --- Performs deconvolution on an image in the frequency domain.

fftfilter --- Performs filtering on an image in the frequency domain.

filmgrain --- Applies film grain noise to an image.

fisheye --- Applies a fisheye distortion to an image.

fisheye2pano --- Generates a strip panoramic image from a linear type fisheye image with optional vertical perspective correction.

fisheye2rect --- Generates a perspective (rectilinear) image from a region of a vertically viewed fisheye image.

flicker --- Displays and optionally save an animation of the input images.

flickerchannel --- Displays and optionally save an animation of the channels in an image.

frosted --- Applies a frosted glass effect to an image.

fuzzythresh --- Automatically thresholds an image to binary (b/w) format using the fuzzy c-means technique.

furrowed --- Applies a furrowed-looking effect to an image to enhance wrinkles creating a "gritty" look.

fxtransitions --- Creates an animated transition between two images using a special effect distortion.

gaussian --- Generates high pass or low pass filtered images based upon a Gaussian shaped convolution.

gaussianedge --- Sharpens (or blurs) an image near edges using a Gaussian shaped filter.

glasseffects --- Modifies an image so that it appears to be viewed through textured and/or tiled glass.

glow --- Creates a glowing effect in an image.

gradient --- Applies a gradient filter to an image.

graytoning --- Mixes color channels from an image into a grayscale image and optionally tints it.

grid --- Superimposes a set of horizontal and/or vertical grid lines on an image.

halo --- Applies a circular halo to an image.

hexagons --- Creates a hexagonal grid of the randomly rotated input image.

histcompare --- Computes one of several metrics characterizing the difference between the histograms of two images.

histmatch --- Modifies one image to try to match its histogram and optionally saturation to that of another image.

histog --- Generates an output image which is composed of the histograms from each channel of the input image.

houghlines --- Uses the Hough Transform technique to compute and display straight lines from a binary edge image.

huemap --- Transforms the hues in an image from one range to another.

imageborder --- Appends an image border by extending the outer regions of the image.

innercrop --- Crops an image to the largest rectangle that will just trim any irregularly shaped outer boundary color.

interleave --- Interleaves the channels of a single image or each image of a set of multiple images.

interweave --- Interleaves two images together in swaths.

isodatathresh --- Automatically thresholds an image to binary (b/w) format using the isodata technique.

isolatecolor --- Isolates a particular color in an image.

isonoise --- Reduces isolated noise in an image.

juliaset --- Creates a julia set fractal image.

kaleidoscope --- Applies a kaleidoscope effect to an image.

kaleidoscopic --- Applies a kaleidoscope effect to an image.

kapurthresh --- Automatically thresholds an image to binary (b/w) format using Kapur's entropy technique.

kmeans --- Applies k-means color reduction to an image.

kmeansthresh --- Automatically thresholds an image to binary (b/w) format using the k-means technique.

kneemap --- Creates a symmetric soft knee-shaped curved mapping look up table and applies it to an image.

kuwahara --- Applies a Kuwahara type edge preserving noise reduction filter to an image.

laplacian --- Applies a laplacian filter to an image.

levelcolors --- Applies a color level transformation to an image channel-by-channel.

levels --- Applies a Photoshop-like levels operation on an image.

lichtenstein --- Applies a Roy Lichtenstein newspaper cartoon effect to an image.

limitedtrim --- Trims an image on all sides by a maximum amount specified by the user.

localthresh --- Automatically thresholds an image to binary (b/w) format using a moving window adaptive thresholding approach.

locatecolors --- Modifies an image showing only those pixels which are within the specified color range.

lupe --- Applies a magnifying glass effect in a local area of an image.

magicwand --- Isolates a contiguous region of an image based upon a color determined from a user specified image coordinate.

mandelbrot --- Creates a mandelbrot set fractal image.

mapcolors --- Maps or translates one set of colors in an image to another set of colors.

maxima --- Locates one or more local maxima in a grayscale image.

maxrgb --- Converts an RGB image to keep only the channel with the maximum value at each pixel.

median --- Computes the median value of an image.

melt --- Creates a melting-like blur effect in an image.

meshwarp --- Warps an image according to a user supplied triangular mesh.

mesmerize --- Creates a mesmerizing animation from an image.

midtonebalance --- Color balances an image in the midtones in a manner similar to Photoshop.

mirrorize --- Creates a mirror effect in an image.

mode --- Computes the mode value of an image.

modulatecolor1 --- Changes brightness, saturation and/or hue for any primary or secondary color in an image.

modulatecolor2 --- Changes brightness, saturation and/or hue for any primary or secondary color in an image.

moments --- Computes shift, scale and rotation invariant image moments as well as elliptical shape descriptors.

morphology --- Performs binary or grayscale morphologic operations on an image, including dilate, erode, open and close.

mosaictiles --- Applies a mosaic tiles effect to image.

mottle --- Applies various mottle effects to an image.

multicrop --- Crops and unrotates multiple images from a scanned image.

multicrop2 --- Crops and unrotates multiple images from a scanned image.

multigradient --- Creates either a linear or radial gradient image with two or more color stops.

nearestcolor --- Finds the nearest color value in an image to a reference color.

neg2pos - Converts from a (scanned film) negative image to a positive image.

negative2positive - Converts from a (scanned film) negative image to a positive image.

nightvision --- Simulates a picture as viewed through night vision goggles.

noisecleaner --- Iteratively cleans noise from an image.

notch --- Creates and applies a notch filter to an image in the frequency domain to remove dither patterns and other regular noise patterns.

omnistretch --- Enhances the dynamic range of brightness values and optionally saturation values in an image

otsuthresh --- Automatically thresholds an image to binary (b/w) format using Otsu's between class variance technique.

overlapcrop --- Creates a sequence of cropped subsections permitting optional overlap of the subsections.

pagecurl --- Applies a pagecurl effect to the lower right corner of an image.

pagepeel --- Applies a pagepeel effect to the lower right corner of an image.

painteffect --- Applies a paint type effect to an image.

pano2fisheye --- Transforms a spherical panorama to a fisheye view.

pano2rect --- Applies vertical perspective correction to an angular panoramic image.

perlin --- Creates an image composed of Perlin type noise.

phase --- Computes the phase correlation surface to find where a small image best matches within a larger image.

phashcompare --- Compares two 168 digit phash strings to compute a phash metric.

phashconvert --- Converts the 42 phash float values for an image to a string of 168 digits.

picframe --- Adds a picture frame around an image.

picturefold --- Applies a map-like folded appearance to an image.

pinbarrel --- Applies or corrects pincushion and/or barrel lens distortion to an image.

pip --- Creates a picture-in-picture effect.

pixelize --- Creates a pixelized or blocky effect in an image.

plm --- Generates a piece-wise linear mapping grayscale look up table and applies it to an image.

plmlut --- Generates a piece-wise linear mapping grayscale look up table.

plot --- Generates a profile of an image row or column or an image histogram.

plot3D --- Generates a 3D plot of a single channel or grayscale image.

polar --- Applies either a rectangular (cartesian) to polar transformation or a polar to rectangular (cartesian) transformation on an image.

polarblur --- Applies a polar blur to an image.

popart --- Creates a pop art style image.

postagestamp --- Applies a perforated postage stamp like border around an image.

posteredges --- Applies posterized edges to an image.

profile --- Generates a profile of an image row or column.

pseudocolor --- Generates a pseudocolored image or pseudocolored animation from grayscale image using a rainbow colored transformation.

ptilethresh --- Automatically thresholds an image to binary (b/w) format at a specified percentile on the cumulative histogram.

puzzle --- Applies a puzzle like effect to an image.

radialgradient --- Creates a radial gradient image.

randomblob --- Creates an image composed of a moderate sized black random blob shape on a white background.

recursion --- Creates a recursive affine composite effect in an image.

randomclipart --- Randomly distributes clip art over the image.

redeye --- Removes redeye from an image.

redist --- Modifies an image so that its (grayscale) histogram has a either Gaussian, distribution or a Uniform Distribution.

reflect --- Splits an image, reflects each side and appends them to form horizontally symmetric images.

remap --- Remaps the colors in an image using a 3D color distance metric relative to a color table map image.

removecolorcast --- Removes a color cast from an image.

replacecolor --- Changes one color to another color in an image.

retinex --- Enhances detail and color in an image using the multiscale retinex algorithm.

ripples --- Applies various circular ripple effects to an image.

rmsecorr --- Computes the root mean squared correlation surface to find where a small image best matches within a larger image.

rotate3D --- Applies a perspective distortion to an image by providing three rotation angles and an optional perspective exaggeration

sahoothresh --- Automatically thresholds an image to binary (b/w) format using Sahoo's entropy technique.

saturation --- Changes the color saturation in an image.

scatter --- Generates a channel-by-channel scatter diagram between two images.

scatterchannels --- Generates a scatter diagram between channels of an image.

screeneffects --- Applies screen-like effects to an image.

separate --- Identifies each separate white shape in a binary image.

shadowhighlight --- Adjusts the tone in shadow and highlight areas of an image.

shapecluster --- Creates a division of the image into 5 separated rectangular regions.

shapemorph --- Create a shape morphing animation sequence between two images.

sharp --- Adaptively sharpens an image or extract edges.

sharpedge --- Adaptively sharpens (or blurs) an image near edges.

shuffle --- Randomly shuffles positions of square sized tiles in an image.

sigmoidal --- Applies a sigmoidal brightness and/or contrast adjustment to an image.

similar --- Computes the normalized cross correlation similarity metric between two equal dimensioned images.

sketch --- Applies a sketch effect to an image.

sketcher --- Applies a sketch effect to an image.

sketchetech --- Creates an etch-like sketch from an image.

skew --- Applies a skew distortion to an image.

slantedlight --- Applies slanted lighting to an image.

slice --- Thresholds an image (inclusively) between a range of graylevels and optionally colorizes inside and/or outside the threshold range.

smartcrop --- Automatically crops an image to a given size around the hightest detail region.

smarttrim --- Automatically trims an image around the region of highest detail in the image.

softfocus --- Applies a softfocus effect to an image.

softlight --- Applies soft light to an image.

space --- Applies a spatially adaptive contrast (and brightness) enhancement filter to an image.

space2 --- Applies a spatially adaptive contrast (and brightness) enhancement filter to an image.

spectrum --- Computes the spectrum image from the magnitude of the Fourier Transform of an image.

spectrumhist --- Creates either a color spectrum or histogram of the colors in an image.

sphere --- Creates a colored sphere with a combination of diffuse and specular illumination.

sphericalpano2cube - Transforms a spherical panorama into a cubical representation.

sphericalpano2cube --- Generate a perspective (rectilinear) image from a region of a spherical panorama image.

spherize --- Warps an image onto a (hemi-)sphere.

splice --- Applies a jagged cut and splice effect to an image.

spline --- Draws a spline curve on an image based upon supplied points.

splitcrop --- Crops an image into two or four sections according to the given x,y coordinates.

splitimage --- Generates a side-by-side append of two partial images with an option to animate the amount of each image used in the append.

splittone1 --- Applies a color splittone effect to an image.

splittone2 --- Applies a color splittone effect to an image.

splittone3 --- Applies a color splittone effect to an image.

spots --- Converts the image into a series or uniform-colored spots.

squareup --- Resizes an image and squares it up either by padding or cropping.

ssim --- Computes the structural similarity metric between two equal sized images.

starburst --- Applies a starburst pattern to an image.

statsfilt --- Computes various localized (neighborhood) statistical filters on an image.

stdimage --- Computes a pixel-by-pixel standard deviation or variance image from multiple input images.

stretch - Modifies an image to automatically stretch the dynamic range between full black and white.

striations --- Applies radial or circular striations to image.

stutter --- Creates a 'stuttered' offset-like effect in an image.

textcleaner --- Processes a scanned document of text to clean the text background.

textdeskew --- Unrotates (deskews) an image containing text.

textdistort --- Distorts repeated text to warp it to the shape of the image content.

texteffect --- Convert text to an image after applying various effects, styling and color.

texteffect2 --- Converts large size text to an image with color, effects and styling.

texturize --- Creates a texture pattern and optionally applies it to the background of an input image.

thermography --- Simulates a picture taken with a thermal imaging camera.

thresholds --- Applies one or two thresholds to an image.

tileimage --- Tiles an image to a given size with various tile arrangements.

tiler --- Converts an image into a tilable texture.

tiltshift --- Applies a tiltshift effect to an image.

tintilize --- Applies a color tint to the mid-range of a grayscale image.

tinyplanet --- Transforms a spherical panorama to a linear fisheye view.

tonemap1 --- Enhances the shadows and/or highlight regions in an image using a non-linear log or gamma function.

tonemap2 --- Enhances the shadows and/or highlight regions in an image using a non-linear log or gamma function plus an extra processing function.

tonemap3 --- Enhances the shadows and/or highlight regions in an image using a non-linear log or gamma function plus an extra processing function.

tonemap4 --- Enhances the shadows and/or highlight regions in an image using a dual gamma function plus an extra processing function.

toon --- Applies a cartoon effect to an image.

toonizarro --- Applies a Superman Bizarro-like cartoon effect to an image.

toycamera -- Simulates pictures taken by lomographic or holga type toy cameras.

transfercolor -- Transfers the coloring from one image to another image.

transitions --- Applies an animated transition between two images.

trianglethresh --- Automatically thresholds an image to binary (b/w) format using the triangle technique.

tricolorize --- Smoothly colorizes a grayscale image with either one, two or three different colors.

trimcorners --- Automatically crops the image to removed rounded corners.

trimmer --- Trims the background from any number of specified sides of an image.

tshirt --- Transforms an image to place it in a region of a tshirt image.

tshirtwarp --- Transforms an image to place it in a region of a tshirt image using a lighting file, a displacement map and arguments provided by the script tshirt.

tunnelize --- Creates a tunnel-like effect on an image.

turbulences --- Applies a turbulence-like warping of the image.

turn --- Simultaneously rotates and crops an image to eliminate any background.

unperspective --- Automatically removes pespective distortion from an image.

unrotate --- Automatically unrotates a rotated image and trims the surrounding border.

uwcorrect --- Corrects the color balance for red light attenuation in pictures taken underwater.

variableblur --- Applies a variable blur to an image based upon a mask image.

vibrance --- Applies a non-linear change to the saturation of an image.

vibrance2 --- Applies a non-linear change to the chroma channel of an image.

vignette --- Applies a vignette effect to a picture.

vignette2 --- Applies a vignette effect to a picture.

vignette3 --- Applies a vignette effect to a picture.

vintage1 --- Applies a classic blue-green vintage effect to an image.

vintage2 --- Applies a colorful vintage effect to an image.

vintage3 --- Applies an old, heritage style vintage effect to an image.

warholeffect --- Creates an Andy Warhol style colorization image.

wavemap --- Transforms the graylevels in each RGB channel according to a sinusoidal wave function.

whitebalance --- Transform an image's overall color balance according to a desired change in a specified white point color.

whiteboard --- Processes a picture of a whiteboard to clean up the background and correct the perspective.

woodcut --- Applies a woodcut effect to an image.

woodgrain --- Simulates a woodgrain texture.

xposure --- Changes the exposure level of an image by photographic stops.

zoomblur --- Applies a radial or zoom blur to an image.


Fred Weinhaus
Last edited by fmw42 on 2013-11-02T15:07:13-07:00, edited 107 times in total.

User avatar
fmw42
Posts: 22084
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 » 2009-11-25T13:15:25-07:00

These are bash unix scripts. They don't run on Windows unless you have a unix environment such as cygwin. They should run fine on Linux or Mac OSX. See examples of how to run the scripts at the link below and to download from there.


1. Download the script
2. Change the name to add or remove the .sh as desired when running
3. Set the script to executable (chmod u+x)
4. Find the full path to where IM (convert) resides by typing in a shell terminal window: type -a convert
5. If type -a convert returns more than one path, type in a shell terminal window: path2/convert -version, where path2 is each of the paths found. Decide which version of IM you want to use.
6. Modify your PATH environment variable so that it includes the full path to where IM (convert) resides (often /usr/bin or /usr/local/bin). This can be done by editing your .profile file.
Alternately, edit the script somewhere between the comments and the first use of any IM command, such as just below the defaults section to add the following two lines:
imdir="path2" #(such as imdir="/usr/local/bin" or imdir="/usr/bin")
PATH="${imdir}:${PATH}"
7. Open a shell terminal window
8. bash /fullpathto/scriptname(.sh) arguments /fullpathto/inputimage /fullpathto/outputimage
9. To avoid the bash and just use scriptname(.sh) ... set your PATH to contain the location of the script
10. Optionally edit the script to change the default directory (found after the defaults section) from dir="." to dir="/tmp"

The scripts can also be run from PHP using the exec() command.

1. Download the script
2. Change the name to add or remove the .sh as desired when running
3. Set the script to executable (chmod u+x)
4. Find the full path to where IM (convert) resides by typing in a shell terminal window: type -a convert
5. If type -a convert returns more than one path, type in a shell terminal window: path2/convert -version, where path2 is each of the paths found. Decide which version of IM you want to use.
6. Modify your PATH environment variable so that it includes the full path to where IM (convert) resides (often /usr/bin or /usr/local/bin). This can be done by editing your .profile file.
Alternately, edit the script somewhere between the comments and the first use of any IM command, such as just below the defaults section to add the following two lines:
imdir="path2" #(such as imdir="/usr/local/bin" or imdir="/usr/bin")
PATH="${imdir}:${PATH}"
7. Edit the script to change the default directory (found after the defaults section) from dir="." to dir="/tmp"
8. In the exec command use bash /fullpathto/scriptname(.sh) arguments /fullpathto/inputimage /fullpathto/outputimage.
Note that "bash" may or may not be necessary
Last edited by fmw42 on 2012-04-21T17:01:34-07:00, edited 3 times in total.

User avatar
fmw42
Posts: 22084
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 » 2011-11-24T12:10:05-07:00

Questions and bug reports regarding my scripts should be posted to the User's forum. If posted here, they will be moved to the User's forum.

Post Reply