Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) 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 Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Applies a magnifying glass effect in a local area of an image. |
last modified: December 15, 2018
USAGE: lupe [centx,centy] [-m mag] [-s shape] [-l lenx,leny] [-r round] [-b border] [-c color] [-d distort] [-p pcolor] 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. -p pcolor ... PCOLOR is the color to use to pad the image so that zooms near the edges can be used. Any valid IM color is allowed. The default is no pad. 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
|