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 sketch effect to an image. |
last modified: December 15, 2018
USAGE: sketch [-k kind] [-e edge] [-c con] [-s sat] [-g] infile outfile
-k ... kind ... kind of grayscale conversion; options are gray(g) or PURPOSE: To apply a sketch effect to an image. DESCRIPTION: SKETCH applies a sketch like effect to an image. If a color image is provided as input, then the output can be either color or grayscale. ARGUMENTS: -k kind ... KIND of grayscale conversion. Choices are gray(g) or desat(d). The default=desat. -e edge ... EDGE coarseness. Values are integers>0. The default=4. -c con ... percent CONTRAST change. Values are integers>=0. The default=125. Note that con=125 for kind=desat is similar to con=0 for kind=gray. -s sat ... percent SATURATION change. Values are integers>=0. The default=100. -g ... output GRAYSCALE only. see http://www.photoshopessentials.com/photo-effects/portrait-to-sketch/ REQUIREMENTS: Results for -k gray will be nearly identical to those of -k desat for IM versions prior to 6.7.8.3. Starting at this version, grayscale images became linear and thus the different look for -k gray. 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. |
Example 1 - Kind=desat; Variation in Contrast |
||
Original |
||
![]() |
||
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Example 2 - Kind=gray; Variation in Contrast |
||
Original |
||
![]() |
||
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Example 3 - Variation in Edge |
||
Original |
||
![]() |
||
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Example 4 - Output Grayscale |
|
Original |
|
![]() |
|
Arguments: |
Arguments: |
![]() |
![]() |
Example 5 - Desat vs Gray |
|
Original |
|
![]() |
|
Arguments: |
Arguments: |
![]() |
![]() |
Example 6 - Desat vs Gray |
|
Original |
|
![]() |
|
Arguments: |
Arguments: |
![]() |
![]() |
Example 7 - Desat vs Gray |
|
Original |
|
![]() |
|
Arguments: |
Arguments: |
![]() |
![]() |
What the script does is as follows:
This is equivalent to the following IM commands
|