What is DirectX Transform?
Microsoft DirectX Transform is a Microsoft DirectX media API you can use to create, animate, and edit digital images. Microsoft DirectX Transform works with 2-D images, which can be used to create stand-alone Windows applications or dynamic plug-ins for Web graphics.
The following topics are discussed in this document.
- Powerful 2-D Graphics Tools
- What Background Do You Need?
- What Next?
The design of Microsoft DirectX Transform makes it easier for you to use animated effects on your Web pages. The animations it displays are not stored as individual images. Instead, Microsoft DirectX Transform builds each frame of the animation from static image files.
A major focus of this documentation is writing transforms. Each transform is a set of instructions for how to turn one or more graphic inputs into one graphic output. Many transforms are gradual transitions from one image to another.
For example, the Slide transform requires two input images. By changing parameters of the transform, you can create the effect of one image sliding sideways to reveal the second image.
The software technology of Microsoft DirectX Transform is also part of Windows Internet Explorer. Any transforms that you write can be distributed and viewed as effects for Web page graphics.
Powerful 2-D Graphics Tools
If you write 2-D graphics applications for Windows, you will find many attractive features in the Microsoft DirectX Transform API. It was designed as an easier way to use the performance and compatibility of Microsoft DirectDraw for advanced image manipulation and display. The tools of Microsoft DirectX Transform can load images in a variety of common image and pixel formats, but represent the images in one image format and one of two pixel formats. This lets you concentrate on creating new images, and lets the software handle the details of translating among the many different formats.
In Microsoft DirectX Transform, images are represented in DXSurface format. The image format uses one of two 32-bit color pixel formats, both of which support per-pixel alpha. If the image you load is in a different pixel format, the software automatically converts it to a 32-bit version as individual pixels are read. The addition of an alpha channel to all images that you load makes it easier to combine images using alpha blending. In addition, Microsoft DirectX Transform can load common image formats, such as .jpeg, .gif, and .bmp files, directly into DXSurfaces.
Microsoft DirectX Transform simplifies the creation of procedural surfaces. These are images that are calculated from equations when they are displayed, and not stored in computer memory. The output of procedural surfaces can be used as image data. In addition, you can add routines to your procedural surface that enable it to operate as a transform.
Many graphics tools that are part of this API can make image editing easier. There is an interface that performs image lookup table operations, such as gamma correction, color balancing, and contrast adjusting. There are also a number of utility transforms that can do image compositing, scaling, and matrix filtering.
What Background Do You Need?
The basic requirement for using and writing transforms is C++ and some Component Object Model (COM) programming experience. Some knowledge of DirectDraw concepts, such as DirectDrawSurface objects and pixel formats, is helpful because Microsoft DirectX Transform handles image data similarly.
The following table shows the recommended skills you need to use Microsoft DirectX Transform for specific tasks.
|Create a transform as a Web page graphic.||You must be familiar with some basic COM concepts and Microsoft JScript or Microsoft Visual Basic Scripting Edition (VBScript).|
|Create a Windows application that uses Microsoft DirectX Transform.||You must be familiar with C++, the Windows API, and some basic COM concepts. Experience programming with Microsoft Visual Studio is needed, as well.|
|Write transforms for use in Windows applications.||You must be familiar with C++ and more advanced COM concepts. It helps to know Active Template Library (ATL), as well. Transforms are exposed through DLL files created with Visual Studio. Knowledge of graphics concepts, such as alpha blending and image filtering, are useful for designing image transforms.|
If you are interested in writing applications that use transforms, you should read the overview information in the Using Transforms section to learn about the interfaces that can make image manipulation much easier.
If you want to create your own transforms, you should be familiar with the Using Transforms information before moving on to the Writing Transforms section. This section details how to develop image transforms.