NAME

clip2png.pl, clip2gif.pl - Convert bitmap image from clipboard to png or gif


SYNOPSIS

  clip2png
  clip2png -f outputfile.png -e
  clip2gif
  etc.


DESCRIPTION

If you have ImageMagick installed (and Perl of course), you can use this script to quickly convert bitmaps in the clipboard to png or gif files on disk. I generally use this to send small attached files from screen captures (made with PrtSC or Alt-PrtSc).


INSTALLATION

  1. Edit these three variables at the top of the script:
    $IMconvert
    Full path to your ImageMagick's convert.exe.

    $editor
    Path to your favorite image editor. This will be called if you used the -e option to edit the image after the conversion. The default is mspaint.exe, a lame editor but which is present on every Win32 system.

    $template
    Template for file name of resulting image Default: ``clip-image-XXXX''

  2. Save the script under both clip2png.pl and clip2gif.pl

  3. Do pl2bat clip2png.pl and pl2bat clip2gif.pl to create Windows batch files.

Note: You can use the following for the 2 steps above. Adapt the final directory to one in your path.

copy clip2gif.pl clip2png.pl & pl2bat clip2png.pl & pl2bat clip2gif.pl & copy clip2png.bat c:\bin & copy clip2gif.bat c:\bin


OPTIONS

-h
show brief usage help

-e
after the conversion, open the resulting image in the configured editor

-f filename
name resulting file ``filename'' instead of using the configured template


AUTHOR

perl -e ``print q(Milivoj Ivkovic <mi).qq(\x40alma.ch>\n)''


SEE ALSO

perl(1), convert, http://www.imagemagick.org