Apps versus solutions
Posted on 4 Mar 2009 at 11:04
Simon Jones asserts that "solution" isn't a dirty word, and finds some powerful code-optimisation tools.
Dim objBitmap As Bitmap = My.Resources.Activity_Large
objBitmap.MakeTransparent(Color.Magenta)
MyControl.Image = objBitmap
There's nothing to stop bitmaps or icons containing 32 bits per pixel - one byte each for red, green, blue and transparency, which is often referred to as RGBA or RGB/A. Forms and controls within Visual Studio can use them all, but its icon and bitmap editors can't: they appear stuck in the dark ages of 8-bit colour. You get no help in creating various different sizes of an icon either, it being left up to you to manually add the sizes you want and then copy the image and resize it to each different size. Prior to VS2008 you couldn't even have an icon larger than 32 x 32 pixels, but Windows Vista supports icons from 16 x 16 all the way up to 256 x 256, and intelligently scales up or down from each fixed size when an in-between size is requested. The most commonly used sizes are 16 x 16 or 32 x 32 for the small and large icons on toolbars and menus, while 24 x 24 and 48 x 48 pixels are less common and are used for medium-sized buttons and "tiles" in Explorer listings respectively. The largest sizes - 64 x 64, 128 x 128 and 256 x 256 - are really only used by Windows Vista for applications and documents when being shown "extra large".
Axialis IconWorkshop can fix most of these problems. It isn't free - costing $70 for the full Professional version, but only $50 for a cut-down Home version for non-commercial use. IconWorkshop lets you design icons by dragging and dropping image parts onto its design surface. Starting with an empty 256 x 256 icon frame you could, for instance, drag pictures of the back of a folder, a document, the front of a folder and that small yellow star used to symbolise "new", onto the design surface and quickly set the "new" star to be partially transparent, before clicking just a single button to spawn all the other icon sizes you want. The program will intelligently scale down your image to your chosen sizes, and then allow you to clean up any that need extra touching up. Within each image in your icon file you'll have access to the full range of painting tools such as the pencil, pen, flood fill, line, rectangle, oval, gradients, text, rotation and so on. There are also more advanced tools that sharpen, smooth, blur or emboss images or parts of images, as well as create icons from an existing image. You can export an icon of any size into another file format such as PNG (Portable Network Graphics), including all its transparency information. Alternatively, you can replace the transparency information with a chosen colour such as magenta, but of course that reduces the colour depth from 32 bits per pixel to 24, and throws away the advantage of smooth blending using the alpha channel. Exporting to PNG satisfies the requirements of other control libraries such as Infragistics NetAdvantage, where images are added as individual bitmaps of a defined size, rather than as a single icon file that contains multiple sizes.
IconWorkshop integrates with Visual Studio 2005 and 2008, but it doesn't appear inside the Visual Studio IDE (Integrated Development Environment) - you launch it from within Visual Studio by double-clicking on an icon file in the Resource Window or Project Explorer. It's powerful and much easier to use than the icon and bitmap editors built into Visual Studio, and it has a couple of other advantages. First, a licence covers all updates to the product in perpetuity, not just for a year or until the next major version; and second, purchasing it gives you access to libraries of hundreds of predefined icons and icon parts from which to build your own. Get it from www.axialis.com/iconworkshop.
From around the web
advertisement
- Why virtualisation hasn't slowed the growth of data
- How to make Google AdWords work for your business
- The curse of sloppily written software
- Paying for your crimes with Bitcoin
- Behind the scenes: tech support for Formula 1
- The security risk of fat fingers
- Why Windows Phone 7 isn't quite ready for business
- When will Microsoft stop fiddling with Windows 8?
- Flash down the pan?
- Metro Style apps vs desktop applications
- Chrome's shine getting lost in translation
- BytePac: the cardboard hard disk enclosure
- How tech loosens our grip on reality
- Hokum watch: Safer Internet Day
- Why I'm deleting Adobe from my PC
- Prepare to be patronised: it's Safer Internet Day
- Dear Sony, Samsung and every other tech company in the world: stop trying to be Apple
- Will Apple's Final Cut Pro X update placate the pros?
- Smartr Contacts for iPhone review
- Switching to Office 365's Outlook Web App
- VeriSign slammed for security breach cover-up
- SAP willing to share HANA with Oracle
- Why using a tablet could harm your health
- New RIM boss: no need for drastic change
- RIM founders fall on their swords
- Slow economy helps boost Red Hat revenue by 23%
- Google+ pages get multiple admins
- One in five companies lack card industry compliance
- Oil industry warns hacking attacks could kill
- British workers fear email monitoring
advertisement

