Using the Windows Imaging Component

Another new graphic-related feature of the VCL is its support for the Windows Imaging Component (WIC). This is a Microsoft framework for working with images and their metadata, which supports several image formats and can be extended with new image formats by software and hardware vendors (like digital camera makers). Not only can the WIC can display images, but it has also a lot of image processing capabilities built into it and independent from the actual image format.

The WIC is available in Windows 7 and in Vista, but it is also possible to install it on Windows XP56, making it available on a broader base than some of the technologies discussed earlier in this chapter. By default, WIC has the following built-in image formats (here listed with the corresponding mime types):

  • BMP (Windows Bitmap Format), BMP Specification v5
  • GIF (Graphics Interchange Format 89a), GIF Specification 89a/89m
  • ICO (Icon Format)
  • JPEG (Joint Photographic Experts Group), JFIF Specification 1.02
  • PNG (Portable Network Graphics), PNG Specification 1.2
  • TIFF (Tagged Image File Format), TIFF Specification 6.0
  • Windows Media Photo, HD Photo Specification 1.0

56 For the installation of the Windows Imaging Component in Windows XP you can see corresponding page of the Microsoft download site at downloads/details.aspx?FamilyID=8e0ll506-6307-445b-b950-2l5def45ddd8 or type in your browser the shortened version

Delphi 2010 support for the Windows Imaging Component is based on the new TWICImage class, a TGraphic descendant defined in the Graphics unit like the classic TMetafil e and TBi tmap VCL classes. The image formats handled by this component are all those mentioned earlier, as you can see in the enumeration underlying the ImageFormat property:

ITWICImageFormat = (wifBmp, wifPng, wifJpeg, wifGif, wifTiff, wifWMPhoto, wifOther);

However, the TImage component registers only the TIFF graphic format (or to be more precise, file extensions) for use with the TWICImage class, as you can see from the following VCL code snippet:

constructor TFileFormatsList.Create; begin

Was this article helpful?

+3 -1

Post a comment