Add watermarks to your Window Clippings images

I wrote this add-in last night using the .NET Framework mostly to serve as an example of how easy it is to write add-ins for Window Clippings, but also because I think it’s a useful add-in for those who like to add watermarks to their published images. So if you’re interesting in writing your own add-ins, take a look at the C# project to see what’s involved. If you’re just interested in using the add-in then here’s what you do:

Start by downloading and opening FilterWatermark.zip. Then copy Kerr.WindowClippings.FilterWatermark.dll and WindowClippings.dll to the same directory where WindowClippings.exe is located (WindowClippings.dll is used by WindowClippings.exe to register .NET add-ins).

Now open the Window Clippings Options window and select the Add-Ins tab. Click the Register Add-In button and select Kerr.WindowClippings.FilterWatermark.dll. You should see a new Add watermark add-in listed in the Filter group (Add watermark is implemented as a filter add-in).

You can now select the General tab to insert Add watermark into your action sequence:

Remember that actions are executed from top to bottom. You can also combine different filters to produce various effects.

The next step is to set your watermark preferences. Just select Add watermark and click the Settings button. The settings window initially looks like this:

 

You can then browse for an image to use and set the alignment however you wish:

Apply your changes and then create a window clipping! Here’s an example:

The code itself is straightforward. The FilterWatermark class represents the filter add-in itself, as it derives from Kerr.WindowClippings.Filter and implements the Process method. The FilterWatermarkWindow class implements the add-in’s settings window. Finally, Helpers.DrawWatermark provides the logic for drawing the watermark and is used for both the preview in the settings window as well as by the add-in itself.

The add-in could do with some work. I thought of adding an option to set the margin for the watermark, but I hope it is enough to serve as an example of writing a filter add-in and inspire you to write your own add-ins!

Go to http://www.windowclippings.com/Developers/ for more information on developing add-ins.

I will post examples of Send To and Save As add-ins soon. Stay tuned!

© 2007 Kenny Kerr

10 Comments

  • Thanks, it is working great!!

  • Very cool!

    Thanks for this!

  • Seb: thanks for the suggestion. That’s a good idea.

    What OS are you running it on? XP/2003/Vista? x86/x64? Try restarting the Options window. I found that.NET add-ins don’t always show up immediately on some occasions for some reason. The COM interop isn’t as smooth as I would like it to be yet. I’m working to improve this. Also make sure you have the .NET Framework 2.0 on your computer.

  • Thannks for replying. I'm running Vista Ultimate x86 which has the .Net framework already.

    I've tried reopening the Options window and restarting WindowClippings.exe but it still doesn't show. :-(

    Any other ideas?

  • Seb: have you by any chance turned off UAC? I just discovered (thanks to a helpful user) that add-in registration fails when UAC is turned off. Although I will investigate and look into making this work, I strongly encourage you to enable UAC for your own protection. Anyway, let me know if it works when you enable UAC.

    You can enable it using the “User Accounts” control panel.

  • I’ve looked into the issue of running on Vista with UAC turned off. The problem is that WC add-ins are registered for the current user only and not globally on the computer. The advantage is that if you’re using UAC that you don’t have to elevate to register an add-in. It turns out however that if UAC is turned off and you are running as an administrator that Windows won’t load add-ins (COM servers) that were registered for the current user as it fears it might allow suspect code to run in an elevated context.
    All the more reason not to run as an administrator!
    Add-in registration is however performed by the add-in itself. For .NET add-ins I provide this automatically in WindowClippings.dll but for native add-ins it follows the standard COM registration model. For these reasons I’m reluctant to work around this problem (by registering globally for elevated users) and instead urge you to run with UAC enabled or as a normal user (non-admin).
    As a compromise I may just make this work for .NET add-ins since I control the registration process for those. This will allow users who choose to run as elevated administrators (with UAC turned off) to still register and use .NET add-ins.

  • Yep, you guessed correctly - I do have UAC disabled. I don't really want to turn it back on solely to get Window Clippings' Add-ins working, so I guess I'll leave the watermarking for now.

    Thanks

  • Seb: no problem. I’m working on the 2.1 release now and it supports add-in registration with UAC disabled. But then it also includes an “Add watermark” add-in as part of the core add-ins, among other things. Stay tuned!

  • Me again! I've noticed something else. There was a modal error message dialog box that I wanted to take a screenshot of to upload to a forum, so I thought I'd use Window Clippings so that it looks nice... :-) When I started Window Clippings up, the dialog box, appeared on top of the fuzzy selection screen (i.e. the modal message box was still in focus, and I could click OK to close it) which means that I couldn't select the window. I got around it by manually drawing a region around it, instead of just being able to select just the message box with a single click. Any else had this problem with "always on top" windows?

  • Seb: Some applications force themselves to the top. You should be able to “push it back” by clicking or right-clicking on the overlay screen thus giving the focus to Window Clippings. I have the odd workaround for some applications that don’t behave. If you give me more info on the app I can look at adding a compatibility shim for it. Feel free to email me: info@windowclippings.com

Comments have been disabled for this content.