Fred's ImageMagick Scripts



    Licensing:

    Copyright © Fred Weinhaus

    My scripts are available free of charge for non-commercial use, ONLY.

    For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net.

    If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment.

    Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php

FLICKER


Displays and optionally save an animation of the input images.

Download Script

last modified: April 25, 2015



USAGE: pseudocolor [-d delay] [ -r resize] [-f] [-l] infile1 infile2 ...
USAGE: pseudocolor [-h or -help]

-d ... delay ...... time delay between frames (ms); delay >= 0; default=50
-r ... resize ..... image resize percentage; resize > 0;
................... default=100 (unchanged)
-l ................ disables the labeling of the images
-f ................ saves the animation to file animation.gif

PURPOSE: To display and optionally save an animation of the input images.

DESCRIPTION: FLICKER automatically displays an animation of the supplied input images and optionally saves the animation to a file. At least two images must be supplied. The main purpose of the script is to make a visual comparison of two (or more) images by rapidly alternating the display of each.

ARGUMENTS:

-d delay ... DELAY is the time delay in msec between frames in the animation. Values are integers greater than or equal to zero. The default=50. Note that the animation will be created to loop forever.

-r resize ... RESIZE allows the animation to made larger or smaller than the input image size. The values are integers greater than 0 representing the resize percentage. The default=100 which leaves the animation the same size as the input image.

-l ... Disables the labeling of the images.

-f ... Specifies that the animation is to be saved to a file called animation.gif

CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk.

This script is a modification of Anthony Thyssen's original version flicker_cmp


EXAMPLES


Two Image Sharpening Comparison Animation With Labels

Original Image

Sharpened Image

Animation
Arguments: -f



Two Image Sharpening Comparison Animation Without Labels

Original Image

Sharpened Image

Animation
Arguments: -f -l



Two Image Sharpening Comparison Animation At 200% Resize

Original Image

Sharpened Image

Animation
Arguments: -f -r 200



Two Image Pseudocolor Comparison Animation With Labels

Grayscale Image

Pseudocolored Image

Animation
Arguments: -f



What the script does is as follows:

  • Optionally labels and resizes each input
  • Adds each input as a frame of an animation
  • Optionally saves the animation to an output file
  • Displays the animation using -animate

This is equivalent to the following IM commands when the images
are saved at 100%:

  • For the first frame:
    convert $label image-1 -resize 100% miff:- |\
    montage - -geometry +0+0 -tile 1x1 $tmp0
  • For each successive frame:
    convert $label image-N -resize 100% miff:- |\
    montage - -geometry +0+0 -tile 1x1 miff:- |\
    convert -delay 50 $tmp0 -page +0+0 - -page +0+0 $tmp0
  • convert $tmp0 -loop 0 animation.gif
  • animate $tmp0