December 2006 Entries

Bitmap to Png converter

As I develop, I often have images that are bitmaps or other formats that I want to convert to transparent .png's for use in a website. I whipped up a little app that does a bmp2png conversion, using the RegistryHelper class to hook the right click context menu. Converting an image in .NET is very straightforward, as long as you are doing a conversion from and to a .NET supported image format. Just load the image using the System.Drawing classes, and then save it as the image format you want. Making a color transparent is easy as well -- call...

posted @ Wednesday, December 20, 2006 11:25 AM | Feedback (4)

Shell File Context Menu Handler

For several programs, I've wanted to be able to add a shell context menu item for a file that runs an exe. After some research, I came up with the following information. This menu is controlled by certain registry entries under the HKCR (Classes Root) entry. In HKCR, there are two relevant entries for each file extension: the actual extension, and the handler for that extension. For .bmp, for example, the extension key is as follows: The key part of the extension key is the default string value that points to the handler for this extension, in this case Paint.Picture. Here's the...

posted @ Wednesday, December 06, 2006 1:06 PM | Feedback (2)