NAME, - Convert bitmap image from clipboard to png or gif


  clip2png -f outputfile.png -e


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).


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

    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 for file name of resulting image Default: ``clip-image-XXXX''

  2. Save the script under both and

  3. Do pl2bat and pl2bat 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 & pl2bat & pl2bat & copy clip2png.bat c:\bin & copy clip2gif.bat c:\bin


show brief usage help

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

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


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


perl(1), convert,