PasteOff: Clipboard-To-Image-File Utility
Strange New Disturbance
I've been testing PjPic, and it addresses many deficiencies of PasteOff (multi-profile!). If you like PasteOff, you might like PjPic more. Or as well!
Fiddling: PasteOff Image Saving Thing
As I mentioned in my post about MSN Spaces, I've got this weird habit of wanting to save and convert clipboard bitmaps (most often, OneNote screen clippings, which you take by right-clicking the OneNote tray icon) into JPGs or PNGs directly, with a minimum of actual effort expended.
So, I hacked together a little applet that converts any bitmap on the clipboard to a JPG, PNG, TIFF or BMP file in a configurable folder (configurable), and can optionally run a command against the saved file. You don't need to worry about naming if you don't want to.
I call the project PasteOff (say it with a Sean Connery accent).
Disclaimer: You assume any and all risks with using this software - it's unsupported, largely untested, and isn't production quality. It's software I developed for my personal use, and may not be fit for any particular purpose other than my own personal use.
Installation: Unzip to wherever you want it. Then create your own shortcut to run it, or just run it directly. Simple, eh?
Configuration is stored in C:\Documents and Settings\Username\Application Data\PasteOff\config.bin .
It's all run from a notification-not-system-tray Icon. This will be called "the icon" to avoid me having to type "notification" a lot.
Icon with image on Clipboard: With no image on Clipboard:
The icon doesn't self-refresh, it only refreshes when you do something with it (like click it). Right-Click the icon for actions and Configuration options:
Typical usage works like this:
- Get your source image onto the clipboard with Ctrl-C, OneNote screen clipping, PrtScn, heck, any Copy will do.
- (optional) If you left-click the icon once, it should change colour to indicate an image is now on the clipboard. You don't need to do this before doing anything else, it's just a handy way of telling whether something's there.
- I just discovered that OneNote actually puts the image on the clipboard for you while taking a screen clipping, so thanks OneNote for saving an extra Ctrl-C. So, for me, step 1 is just Right-click the OneNote icon, choose Create Screen Clipping, select desired screen area.
- If you want to type a descriptive name for the file, double-click the icon to bring up the preview window (there's also a context menu item for this). The extension is automatically supplied.
- Obviously illegal characters are removed or replaced, but it's not a competition to break it, okay?
- Otherwise, if you just want a random-ish name, right-click the tray icon and choose Save Directly. The file will be saved directly to the target folder, with a temp file name provided by Windows - usually something like TMP43a.jpg.
- If you've specified an application to run after saving and the save is successful, the custom app you specify is run against the file (including path) that was produced.
- Filename is passed with double quotes, eg. C:\Upload.cmd "%1".
- I use the listing for Upload.CMD here.
- Depending on your clipboard options, you can put the local path and filename, some custom text or nothing at all on the clipboard afterwards.
- I use the custom text option: <img src="http://www.example.com/%s"> so that I'm ready to post the image link directly into some blog HTML in .Text.
- The preview window tiles images, there's no scroll bar, and images tend to linger even after being invalidated. I don't really mind.
- If nothing seems to be happening when you Do Things, the icon's probably gone "blue" (eg, image is gone, text or some other non-image object is on the clipboard).
- OneNote seems to store notes on the clipboard as images too! So you can make a JPG of note text, not that you'd usually want to...
Don't forget to use the clipboard text (if you need to) before copying the next image to the clipboard.
On the cards for When I Feel Like It:
If there's a bracketed version number in front of the feature, it first appeared in that version.
- (0.5) Support for target folders other than My Pictures as a target! (very likely, very soon).
- (0.5) Optionally run a batch file on the output. Makes my MSDN blog stuff easier if I do that...
- (0.5) Optional Prompt Before Overwrite.
- (0.6) Other image formats (Thanks for the suggestion Mischa) now PNG, JPG, BMP and TIF can be done.
- Support for multiple "save profiles", with different commands for each. Maybe. It kinda seems like the "20" part of 80/20.
- (0.7) I'm sure there's a reason you might not want the clipboard contents overwritten with the end filename. So perhaps turning it off might be an option. Sometime.
- (0.7)Allowing user to specify the string they want on the clipboard
- eg, http://www.example.com/blog/%s or perhaps even <img src="%s">, that sort of thing.
- (0.8) Disable running a command directly from the tray menu \
- Memory optimization - 0.8 is ~12MB from boot.
- A little more robustness/user friendliness. Can't hurt. Can it?
- Optional re-numbering on attempted overwrite.
- Base filename support (eg, all images are IMAGE000n or whatever).
- Log/history/something. Maybe.
- Preview window improvements. Maybe.