Retaining DPI/PPI Information with PNGGauntlet

I’ve mentioned PNGGauntlet many times on this blog – it’s a great tool for squeezing the best compression ratios out of the PNG format. It combines the tools PNGOUT, OptiPNG and DeflOpt in a nice WinForms GUI. As part of the compression process, most chunks are removed by default. This includes the pHYs chunk, which […]

Image Background Remover Tool

View source on GitHub. Inspired by Window Clippings, my preferred screenshot tool (which unfortunately crashes a lot under Windows 8 RTM), I wrote a small program for making image backgrounds transparent. It comes with a command-line interface and a basic GUI (pictured above). The GUI supports dragging-and-dropping images, and you can switch the black and […]

Windows Update Notification Tool for Windows 8

I was apparently part of the 5.82% of Windows 7 users who preferred to be notified about updates rather than have them installed automatically. Annoyingly, Windows 8 no longer displays the familiar balloon tip and notify icon when new updates are available, instead placing a notice on the lock screen (which I almost never have […]

Pixel-perfect Multi-DPI Images in WPF (Part 3)

View source on GitHub. In Part 1 of this series, I discussed the problem of displaying different bitmap images at different DPIs in WPF. In Part 2, I proposed a solution using multi-frame TIFFs and two simple markup extensions. In this final post I will present a basic program that takes multiple images (PNG recommended), […]

Pixel-perfect Multi-DPI Images in WPF (Part 2)

View source on GitHub. See also: Part 1 and Part 3. In Part 1 of this series, I explored the issue of displaying pixel-perfect bitmap images in the Windows Presentation Foundation. In this article, I’ll describe a method of displaying different images depending on the system DPI setting using a custom Markup Extension and multi-image […]

Pixel-perfect Multi-DPI Images in WPF (Part 1)

View source on GitHub. See also: Part 2 and Part 3. I’ve written previously about DPI-awareness in the Windows Presentation Foundation and how to specify measurements in pixels rather than Device Independent Units (DIUs). Something else to consider is image scaling – unlike the Windows Ribbon control or WinRT, WPF has no in-built mechanism for […]

P/Invoke and ChooseFont (Comdlg32.dll)

Mister Goodcat wrote a good article a little while ago about using P/Invoke in Silverlight 5 to display the native font chooser dialog with the ChooseFont function. I couldn’t get the code working for a 64-bit executable, however, as the definition of the CHOOSEFONT structure on MSDN he used as a basis for the managed […]

Retrieving Windows 8 Theme Colours

See also: Windows 8 Theme Colours Reference. Windows 8 doesn’t offer developers access to system theme colours, unlike its cousin, Windows Phone. Even for a version 1 product, this seems like a strange omission. Then again, we still don’t have a working public API for retrieving the Aero glass colour (or whatever we call it […]