What is DirectX Transform?

Microsoft® DirectX® Transform is a Microsoft DirectX media API you can use to create, animate, and edit digital images. DirectX Transform works with both two-dimensional (2-D) images and three-dimensional (3-D) meshes, which can be used to create stand-alone Microsoft Windows® applications or dynamic plug-ins for Web graphics.

This introduction contains the following sections.

Transforms

The design of 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, DirectX Transform builds each frame of the animation from static image files.

One of the main uses of this Software Development Kit (SDK) is for writing transforms. Each transform is a set of instructions for how to turn one or more graphic inputs into one graphic output. The inputs and output can be either 2-D bitmap images or 3-D mesh objects, depending on the transform. Many transforms are gradual transitions from one image to another, while others are gradual modifications of 3-D meshes.

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. For the Explode transform, you specify an input mesh. Changing the transform parameters for Explode creates the effect of the mesh breaking into pieces and flying apart.

The software technology of DirectX Transform is also part of Microsoft Internet Explorer and Microsoft DirectAnimation®. Any transforms that you write with this SDK can be distributed and viewed as effects for Web page graphics. In addition, with the Photoshop Adapter for Transforms, any image-to-image transforms you write are compatible as Adobe Photoshop image filters.

Powerful 2-D Graphics Tools

If you write 2-D graphics applications for Windows, you will find many attractive features in the 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 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 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 will automatically convert 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, DirectX Transform can load common image formats, such as .JPEG, .GIF and .BMP, files directly into DXSurfaces.

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, or can be textured onto Microsoft Direct3D® Retained Mode meshes. In addition, you can add routines to your procedural surface that allow it to operate as a transform.

There are a number of graphics tools that are part of this API that can make image editing easier. There is an interface that performs images 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 Microsoft DirectDraw® concepts, such as DirectDrawSurface objects and pixel formats, is helpful because DirectX Transform handles image data similarly. Familiarity with Microsoft Direct3D® Retained Mode will enable you to use 3-D transforms to their fullest potential.

The transforms included with this SDK are listed in the Transform Reference section. To use them in your Web pages, you should consult the documentation for DirectAnimation. For more information about DirectAnimation, see the DirectAnimation SDK.

The following table shows the recommended skills you will need to use DirectX Transform for specific tasks.

TaskBackground needed
Create a transform as a Web page graphic by using DirectAnimation.You must be familiar with DirectAnimation and Microsoft JScript® or Microsoft Visual Basic® Scripting Edition.
Create a Windows application that uses DirectX Transform.You must be familiar with C++, the Windows application programming interface (API), and some basic COM concepts. Experience programming with Microsoft Visual Studio® is needed, as well.
Write transforms for use in Windows applications, or to use as Adobe Photoshop image filters.You must be familiar with C++ and more advanced COM concepts. It will help to be knowledgeable of Active Template Library (ATL), as well. Transforms are exposed through dynamic-link library (DLL) files created with Visual Studio. Knowledge of graphics concepts, such as alpha blending and image filtering, will be useful for designing image transforms. Knowledge of 3-D concepts and Direct3D Retained Mode will be helpful for developing 3-D transforms.

What Next?

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 and 3-D transforms.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.