Filters and Transitions
This topic documents a feature of Visual Filters and Transitions, which is deprecated as of Windows Internet Explorer 9.
With Microsoft Internet Explorer 4.0 and later, you can apply various multimedia-style visual effects to your Web page. You can implement these effects in Web pages using Cascading Style Sheets (CSS) properties. By combining filters and transitions with basic scripting, you have a powerful tool for creating visually engaging and interactive documents. Internet Explorer 5.5 and later supports the richest variety of optimized filters. This documentation covers the basics of filters and transitions as well as all of the reference components.
Overviews/Tutorials
The Microsoft DirectX Transform architecture enables you to write procedural surfaces. These DXSurfaces are not stored as an array of samples, but instead as a set of instructions that specify how to render a surface of arbitrary size and resolution. Procedural surfaces take up a fraction of the memory used to store bitmap images, and they can produce realistic marble and wood textures. The resulting surfaces can be used as background images.
About Transforms and DXSurfaces
DirectX Transform objects apply space and time effects to Microsoft DirectDraw objects. DirectX Transform objects read data from a source, modify it, and write it to a destination object. In certain cases the source and destination data objects can be the same if the transform is capable of executing in place. DirectX Transform exposes a number of Component Object Model (COM) interfaces and data types that enable you to create your own unique effects and plug them into the existing architecture.
In order to properly use DirectX Transform objects and interfaces, it is important to know what they are and how they all relate to one another.
This article should be considered required reading for transform authors. It contains important information that you need in order for your transform to function correctly under DirectX Transform containers. It also includes conventions and tips that are useful for writing transforms.
Building DirectX Transform Samples and Applications
This overview explains the download and installation procedures necessary to prepare your build environment to build the samples and applications described in the DirectX Transform documentation.
This constructor is used to to determine whether MMX instructions are present.
DirectX Transform provides a way for you to secure the transforms you write so that only registered users can legally use your copyrighted transforms with their content. You can easily implement this, and it provides you with legal recourse for copyright violations.
Several sample applications are provided to demonstrate the various features of transforms.
The DirectX Transform documentation includes an application called DXETool.exe, which helps you verify that your transforms work properly within the DirectX Transform architecture. You can also use this application to view transform output and determine settings for the custom properties.
The DXETool application is a useful tool in the transform writing process. This overview provides instructions for setting-up and using DXETool.
This topic walks you through the Wipe transform sample code. This transform uses custom helper functions and elements common to all DLL files that use DirectX Transform routines.
Example: The WipeDlg Application
DirectX Transform provides you with powerful tools for manipulating 2-D image data. With DirectX Transform, you can perform operations on a single image—for example, the MotionBlur or BasicImage transform—or combine two images to form a single output image—for example, the Iris or Wheel transform.
This overview provides a starting point for readers new to DirectX Transform.
How to Apply a Transition on an Image
This article demonstrates how to implement a simple transition on an image.
How to Implement Procedural Surfaces
This tutorial describes the process of implementing procedural surfaces with Microsoft Visual Studio.
In a general sense, each transform is a set of rules for how to produce one graphic output.
This overview provides a procedure for building an image transform DLL using Microsoft Visual C++ and the DirectX Transform interfaces.
Introduction to Filters and Transitions
With Internet Explorer 4.0 and above, you can apply various multimedia-style visual effects to your Web page. You can implement these effects in Web pages using CSS properties. By combining filters and transitions with basic scripting, you have a powerful tool for creating visually engaging and interactive documents. Internet Explorer 5.5 and above supports the richest variety of optimized filters. Most examples in this article require that you have Internet Explorer 5.5 installed.
Security Considerations: Filters and Transitions
This topic provides a list of topics that contain security information. These topics do not provide all you need to know about security issues—instead, use them as a starting point and reference for this technology area.
One of the most useful capabilities of DirectX Transform is that it enables you to import and export graphics data in a number of standard pixel formats.
A DirectX surface object, DXSurface, is an abstract image whose pixel data is obtainable in 32-bit ARGB color format, regardless of the underlying pixel representation. DirectX Transform uses this data object for both input and output images. The DXSurface enables you to concentrate on the logical aspects of designing the transform, while letting the supporting software take care of numerous details, such as alpha blending, dithering, and converting among different pixel formats.
Using the CDXBaseNTo1 Base Class
CDXBaseNTo1 is a base class that you can use to implement transforms that take multiple images as inputs and produce a single image. If you choose not to use this base class, you can create a transform by directly implementing the IDXTransform interface, the IObjectWithSite COM interface, and, if you are using an image transform, the IDXSurfacePick interface. However, you will find it easier to use this base class because it performs parameter validation, preprocesses data, and implements the full IDXTransform interface. This simplifies development by only requiring implementation of the code specific to the transform.
This overview suggests further reading regarding how to use a DirectX Transform in a Windows application.
To use a transform in a C++ application, you must be familiar with a few key interfaces, methods, and objects. This section describes how to use an existing transform in a C++ application.
DirectX Transform is a DirectX media API you can use to create, animate, and edit digital images. DirectX Transform works with 2-D images, which can be used to create stand-alone Windows applications or dynamic plug-ins for Web graphics.
DirectX Transform enables you to produce effects on images. The API provides sophisticated graphics tools for modifying and combining images. These tools include scaling, dithering, compositing, alpha blending, image filtering, and many others. You can use transforms in your own image-based applications.
Attributes/Properties
Sets and retrieves the settings for the lookup table brightness curve.
Sets and retrieves the order of operations used to build the lookup table.
Retrieves a value that indicates specific capabilities of a transition.
Sets and retrieves the tint curves for color balance operations on the selected color.
Sets and retrieves the settings for the lookup table contrast curve.
Sets or retrieves the length of time the transition takes to complete.
Retrieves the recommended length of time for performing a transition. Sets the suggested duration for the transition.
Sets or retrieves a value that indicates whether the filter is enabled.
Gets or sets the filter or collection of filters that are applied to the object.
Sets and retrieves the value used for gamma correction.
Sets and retrieves the threshold value for color inversion, which represents a fraction of a one-byte color channel.
Sets and retrieves the number of color levels to use for the posterizing operation.
Retrieves the number of lookup table operations to perform.
Sets and retrieves the opacity adjustment for the lookup table.
Sets or retrieves the point in a transition at which to capture the display for a static filter output.
Retrieves the setting of the transform's Progress property. Sets the requested progress made on the transform.
Retrieves the step size that corresponds to the smallest meaningful change for the Progress property.
Sets and retrieves the value for threshold filtering operations.
Methods
Captures the initial display of an object's content for a transition.
Translates a set of samples in place.
Copies samples from one DXSurface to another.
Retrieves the minimum y-axis value.
Tests whether the bounds are empty.
Tests whether the bounds are null.
Constructs a CDXTWorkInfoNTo1 and initializes the data members.
Indicates to the transform that it is properly set up and ready to produce output.
Copies the specified number of samples from the current position of the source surface to the current position of the output surface.
Copies the specified number of samples from the specified rectangle in the source surface to the current position on the output surface.
Copies one surface to another and changes its pixel format.
Allocates an ARGB read pointer object.
Not supported.
Creates a DXSurface that contains a specified DirectDrawSurface object.
Creates a DXSurface object of the specified size and format.
Creates and initializes a transform.
Frees an ARGB read pointer object.
Retrieves the depth of the z-axis dimension.
Called by the base class to determine the output bounds of 2-D transforms.
Not supported.
Determines whether the transform output should be dithered.
Determines whether the transform output should be alpha blended over the output surface.
Retrieves the size of the t-axis dimension.
Constructs an uninitialized DXBASESAMPLE object.
Constructs a DXBASESAMPLE object with members initialized to the specified values.
Constructs a DXBASESAMPLE object with members initialized to the values specified in a Integer.
Constructs an uninitialized DXPMSAMPLE object.
Constructs a DXPMSAMPLE object with members initialized to the specified values.
Constructs a DXPMSAMPLE object with members initialized to the values specified in a Integer.
Constructs an uninitialized DXSAMPLE object.
Constructs a DXSAMPLE object with members initialized to the specified values.
Constructs a DXSAMPLE object with members initialized to the values specified in a Integer.
Executes the transform operation given the specified portion bounds and places the result in the destination data object.
Adds to the object's dimensions about its center by the specified amount.
Adds to the object's dimensions about its center by the specified amount.
Fills the output surface with the specified sample value, starting at the current position and advancing the current position.
Fills a rectangle with the sample value, optionally doing an alpha-blend with the destination.
A method called by the base class to generate a row of output samples.
Retrieves an application-specific Integer of data.
Retrieves a pointer to the DXSurface used as a background.
Not implemented.
Retrieves the bias value used for the convolution.
Retrieves a structure that contains the surface's boundary region.
Retrieves the settings for the lookup table brightness curve.
Retrieves the order of operations used to build the lookup table.
Retrieves the tint curves used for color balance operations on the selected color.
Retrieves the surface's color key value.
Retrieves the method used for image compositing.
Retrieves the number of threads allowed to execute on a single processor at a given time.
Retrieves the settings for the lookup table contrast curve.
Retrieves a value that indicates whether the filter output color is converted to grayscale.
Retrieves the current device context (DC).
Retrieves an interface on the underlying GetDirectDrawSurface object if the DXSurface object is aggregated onto a GetDirectDrawSurface.
Retrieves a value indicating the current progress of the transform effect.
Retrieves a value that indicates whether the alpha channel should be filtered along with the color data.
Retrieves the surface fill color.
Retrieves the selected filter type for the convolution.
Retrieves a pointer to the DXSurface used as a foreground.
Retrieves the value used for gamma correction.
Retrieves the current generation ID for the object.
Retrieves the component values for a specific index in the table.
Retrieves input or output information about the specified data object, and an optional pointer to it.
Retrieves the threshold value used for color inversion.
Retrieves the number of color levels to use for the posterizing operation.
Retrieves the interface to the selected color lookup table.
Stores the maximum values for each dimension into the specified vector.
Stores the minimum values for each dimension into the specified vector.
Retrieves flags that describe the behavior of the transform.
Retrieves the native underlying pixel format of a DXSurface.
Retrieves the number of lookup table operations to perform.
Retrieves the number of inputs used during the transform setup.
Retrieves the size, in bytes, of the data object (for example, a surface or buffer).
Retrieves the opacity adjustment for the lookup table.
Retrieves the opacity of the foreground surface.
Retrieves the size of the output surface.
Retrieves the pixel format of the surface.
Retrieves the quality level used to render the transform result.
Gets the value of the data object to the bounds in the specified array data type.
Gets the scale for an alpha sample as a floating point value.
Gets the scale for an alpha sample as a byte integer value.
Retrieves the x-axis and y-axis scale factors.
Retrieves the bounds translated so that the minimum values are positioned at zero.
Retrieves the status flags of the DXSurface object.
Retrieves a pointer to the parent DXSurface.
Retrieves information about the attributes and structure of the raw surface object's pixel data.
Retrieves a copy of the lookup tables.
Retrieves the number of threads in the thread pool.
Retrieves the value used for threshold filtering operations.
Stores the x-axis and y-axis bounds into the specified rectangle.
Stores the x and y size of the bounds into the specified SIZE structure.
Tests whether an input data object is associated with the specified input index.
Tests whether an output data object is associated with the transform.
Retrieves the height of the y-axis dimension.
Manually increments the object generation ID.
Initializes a DXSurface from an existing DirectDrawSurface.
Initializes a DXSurface object from a client-created object that supports the IDXRawSurface interface.
Sets the value of the data object to the bounds in the specified array.
Initializes a transform that has been created by the caller.
Initializes a DXSurface object with the specified volume boundary and format from a DirectDraw object.
Not supported.
Retrieves the pixel format type for the selected input surface.
Retrieves a pointer to the selected input surface.
Determines whether the two specified bounds intersect.
Determines whether the two specified bounds intersect.
Determines whether the application of a channel's table will have any effect.
Determines whether a transform input has changed since the last time this method was called.
Determines whether an output has changed since the last time this method was called.
Determines whether the transform parameters or inputs have changed since the last time this method was called.
Retrieves the minimum x-axis value.
Binds the specified file name or URL and returns a DXSurface containing the image data.
Loads an image from a stream and returns a DXSurface.
Locks a region of the surface and returns a pointer through which you can access samples on DXSurfaces.
Locks a region of the surface and returns an IDXDCLock interface.
Maps the input coordinate space to the output coordinate space.
Maps the output coordinate space to the input coordinate space.
Returns a value that indicates whether MMX instructions are present.
Moves the sample pointer along the x-axis relative to its current position.
Moves the sample pointer to a specified row and retrieves a pointer to the run information associated with that row.
Moves the sample pointer to an absolute row along the y-axis and resets the x-axis position to zero.
Moves the sample pointer to an absolute position.
Determines whether a temporary buffer is needed when calling a sample for surface read/write methods.
Determines whether a temporary buffer is needed when calling sample input methods on the IDXARGBReadPtr interface.
Makes all of the minimum bounds less than or equal to the maximum bounds.
Adds the specified vector to the minimum and maximum for each dimension.
Adds the specified values to the minimum and maximum for each dimension.
Called by the base class to cause a transform to produce its output.
Frees resources allocated by the OnInitInstData method.
Called by the base class to determine the amount of data space currently occupied by the transform.
Called by the base class to determine the object's size, in bytes.
Provides the base class with the necessary information to perform surface picking for the transform.
Enables the transform to allocate resources or compute any data that is to be shared across threads.
Called to release resources when the transform is being set up with null inputs or outputs.
Sets the width and height of the surface.
Called after the base class has completed its setup.
Called by the base class to enable the derived transform to fully implement surface picking.
Determines whether any part of the surface is located at the specified point.
Called by the base class to check the input and output data object generation IDs and increment the transform generation ID.
Casts the sample as a Integer.
Casts the sample as a Integer.
Casts the sample as a Integer.
Casts the sample as a DXPMSAMPLE.
Casts the sample as a DXSAMPLE.
Assigns the color values of the sample.
Assigns the color values of the sample.
Assigns the color values of the sample.
Not supported.
Retrieves the pixel format type of the output surface.
Retrieves a pointer to the output surface.
Alpha-blends an array of samples over the output surface and moves the pointer a specified number of samples.
Alpha-blends the sample value over the sample at the specified position.
Places a buffer of ARGB32 samples into the output surface and moves the sample pointer.
Places a buffer of ARGB32 samples into the output surfaces and moves the sample pointer.
Accepts a buffer of either PMARGB32 or ARGB32 samples and writes them to a subsection of the output surface defined by a DXPACKEDRECTDESC structure.
Plays the transition.
Performs a surface pick at the specified output point.
Retrieves the number of processors installed in the system.
Retrieves the maximum x-axis value.
Retrieves the native pixel format of the surface.
Scales the object about its center by the specified scaling factors.
Scales the object about its center by the specified scaling factors.
Applies a lookup table to an array of DXSAMPLE structures.
Applies alpha portion of a lookup table to an array of DXSAMPLE structures.
Applies a lookup table to an array of DXBASESAMPLE structures.
Sets the scale factors used to fit a portion of the input to match a specified size.
Applies a lookup table to an array of DXPMSAMPLE structures.
Applies a lookup table to a single DXBASESAMPLE structure.
Returns a value that indicates the scale type.
Returns a value that indicates the scale type.
Defines a set of tasks to execute.
Sets the surface's application-specified Integer of data.
Sets the surface modifier background surface.
Sets the behavior site.
Sets the bias value used for the convolution.
Specifies the bind host that the transform should use.
Sets all the values of the data object with the specified bounds.
Sets the surface's volume boundary structure.
Sets the values for the lookup table brightness curve.
Sets the order of operations used to build the lookup table.
Sets the tint curves for color balance operations on the selected color.
Sets the surface's color_key value.
Selects the method used for image compositing.
Defines the number of threads that can execute from a thread pool at a given time.
Sets the values for the lookup table contrast curve.
Sets a value that indicates whether the filter output color is converted to grayscale.
Sets the convolution to use a custom filter.
Increments the transform generation ID.
Sets all minimum and maximum bound values to zero.
Sets a value that indicates whether the alpha channel should be filtered with the color data.
Sets the surface fill color.
Sets the selected filter type for the convolution.
Selects the DXSurface to use as a foreground.
Sets the value used for gamma correction.
Sets the parameters used to produce the gradient surface.
Sets the host URL.
Sets the threshold value for color inversion.
Sets the number of color levels to use for the posterizing operation.
Sets the interface to use for color lookup table operations on the foreground surface.
Sets transform flags that specify how to generate the output.
Sets the opacity adjustment for the lookup table.
Sets the opacity of the foreground surface.
Sets the size of the scaled transform output.
Translates the bounds to the absolute position specified by the vector.
Sets the quality level used to render the transform result.
Sets the scale using a float value.
Sets the scale for an alpha sample using a byte integer value.
Sets the x-axis and y-axis scale factors.
Adds a service provider to the Transform Factory.
Sets the status flags of the DXSurface object.
Specifies the number of threads to create and make available to execute tasks.
Sets the value for threshold filtering operations.
Not supported.
Translates the bounds to the absolute position specified by the vector.
Sets the value of the data object to the bounds of the specified surface.
Defines the input and output data objects used in the transform.
Sets the x-axis and y-axis bounds of the object to one pixel width at the specified point.
Sets the x-axis and y-axis bounds of the object to the specified rectangle.
Sets the x-axis and y-axis bounds of the object to the specified size.
Sets the x-axis and y-axis bounds of the object to the specified size.
Retrieves the bounds translated so that the minimum values are positioned at zero.
Stops the transition playback.
Retrieves the class identifier (CLSID) of the surface.
Terminates a task based on its request ID value that was used when the task was scheduled.
Terminates a set of tasks previously scheduled by the task manager.
Tests whether the specified bounds intersect the data object.
Retrieves the maximum y-axis value.
Creates a union of the two specified bounds and assigns the result to the data object.
Unpacks the specified number of samples into the supplied buffer in ARGB32 pixel format. This method can only unpack a single row. Use UnpackRect to unpack multiple rows.
Unpacks the specified number of samples into the supplied buffer in alpha-premultiplied PMARGB32 pixel format. This method only unpacks a single row. Use UnpackRect to unpack multiple rows.
Unpacks a subsection of source samples defined by a rectangle structure and advances the horizontal position of the read pointer. Use to unpack multiple rows.
Retrieves the width of the x-axis dimension.
Retrieves the width of the specified dimension.
Called in a response to the Execute method to render a portion of the output space to the current output surface.
Called by the transform base class to enable the surface to function as a transform.
Events
Fires when a visual filter changes state or completes a transition.
Collections
Retrieves the collection of filters that have been applied to the object.