Fred's ImageMagick Scripts
|
Applies a magnifying glass effect in a local area of an image. |
last modified: May 30, 2008
|
USAGE: lupe [centx,centy] [-m mag] [-s shape] [-l lenx,leny] [-r round] [-b border] [-c color] [-d distort] infile outfile
centx,centy ............ coordinate in image for center of lupe; PURPOSE: To apply a magnifying glass effect in a local area of an image. DESCRIPTION: LUPE applies a magnifying glass (lupe) effect in a local area of an image. The normal mode is a simple magnification with no distortion. However an option is provided to apply a spherical distortion. The lupe can have either a circular/elliptical shape or a (rounded) square/rectangular shape. The lupe border thickeness and color can also be specified. ARGUMENTS: centx,centy ... CENTX,CENTY are the coordinates in the image for the center of the lupe. If not specified, then the center of the image will be provided. -m mag ... MAG is the magnificiation factor. Values must be greater than or equal to 1. Values may be floating point numbers. The default is 2. -s shape ... SHAPE is the shape of the lupe. The shape may be circle or square. The default is circle. -l lenx,leny ... LENX,LENY is either the radii for the circle/ellipse or the half-width for the square/rectangle. Values must be integers greater than 0. The default is 64,64. -r round ... ROUND is the radius of the corner rounding for the shape=square option. Values must be integers greater than or equal to zero. The default is 10. -b border ... BORDER is the border thickness of the lupe. Values must be integers greater than or equal to zero. The default=4. -c color ... COLOR is the color of the border of the lupe. Color may be any valid IM color specification. Be sure to enclose in double quotes if not using a color name. The default=white. -d distort ... DISTORT is the spherical distortion factor. Values may be floating point numbers greater than or equal to 0. The default=0 (no distortion). When values are greater than 0, the distortion is applied using -fx. Therefore, the processing will be slower. 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. |
|
Simple Magnification |
||
|
Original Image |
||
| ||
|
Arguments: |
Arguments: |
Arguments: |
|
|
|
|
Arguments: |
Arguments: |
Arguments: |
|
|
|
|
Shape And Border Variations - Magnification 2 |
||
|
Original Image |
||
| ||
|
Arguments: |
Arguments: |
|
|
|
|
|
Arguments: |
Arguments: |
|
|
|
|
|
Arguments: |
Arguments: |
|
|
|
|
|
Arguments: |
Arguments: |
|
|
|
|
|
Arguments: |
Arguments: |
|
|
|
|
|
Magnification Versus Distortion |
||
|
Original Image |
||
| ||
|
Arguments: |
Arguments: |
Arguments: |
|
|
|
|
Arguments: |
Arguments: |
Arguments: |
|
|
|
|
Magnification Animation |
Distortion Animation |
|
|
|
|
|
What the script does is as follows:
This is equivalent to the following IM commands for
|