Applying Artistic Effects

The following functions are designed specifically for artistic effects:

Function

Purpose

L_AddBitmapNoise

Adds random pixels to a bitmap, letting you specify the percentage of coverage and the color plane.

L_AddShadowBitmap

Adds shadows to a bitmap, letting you specify the threshold value, the direction of the light source, and whether the shadows are colored or grayscale.

L_AgingBitmap

Adds effects that simulate random color changes, scratches, dust and pits, making a bitmap look like it was made from an old film.

L_BendingBitmap

Wraps the bitmap along the inside or outside of an arc pattern.

L_BricksTextureBitmap

Creates a brick texture that makes the image look like it has been drawn on a brick wall.

L_CanvasBitmap

Applies an image as an overlay for another image.

L_CloudsBitmap

Generates different cloud patterns.

L_ColoredBallsBitmap

Adds colored balls to the bitmap. Various parameters control the color and appearance of the balls.

L_ColoredPencilBitmap / L_ColoredPencilBitmapExt

Apply a colored pencil effect to a bitmap. Both functions brighten the bitmap and enhances its edges.

L_CylindricalBitmap

Warps the bitmap to a cylindrical shape.

L_DiceEffectBitmap

Splits the image into square or rectangular blocks. If the blocks are square, rotates each block by 0, 90, 180, or 270 degrees. If the blocks are rectangular, flips the blocks around the X-axis and Y-axis.

L_DiffuseGlowBitmap

Adds a colored glow to a bitmap's light or dark areas, making these areas shine with a neon glow.

L_DisplaceMapBitmap

Displaces bitmap pixels horizontally and vertically according to the values of the displacement map image.

L_EmbossBitmap

Applies an emboss effect to a bitmap, letting you specify the depth and direction of the effect.

L_FragmentBitmap

Averages a bitmap with its shifted copies.

L_FreeHandShearBitmap

Shears the bitmap by the wave drawn using amplitude values obtained from L_GetCurvePoints.

L_FreeHandWaveBitmap

Distorts the bitmap by the wave drawn using amplitude values obtained from L_GetCurvePoints and a specified angle.

L_FunctionalLightBitmap

Adds light to the bitmap according to a function-based distribution. This functional light will be generated by one of the following methods: linear, quadratic, sine, cosine, or using freehand points.

L_HalfTonePatternBitmap

Creates a halftone screen effect for an image while keeping its continuous range of tones.

L_ImpressionistBitmap

Makes a bitmap look like it was painted by an impressionist painter.

L_MaskConvolutionBitmap

Multiplies the pixels of an image by a kernel, resulting in one of several 3D edge effects being applied to the image.

L_MosaicBitmap

Imposes a mosaic effect on a bitmap by dividing the bitmap into tiles of a specified size and changing the color of all pixels in each tile to the average color of pixels within the tile.

L_MosaicTilesBitmap

Divides an image into rectangular or arc-shaped cells with irregular boundaries. This function makes an image look like a mosaic made from tiles. Tiles can be rectangular or arc-shaped, depending upon the coordinate system used to draw the tiles.

L_MotionBlurBitmap

Applies a filter, which creates the illusion of movement in an image.

L_OffsetBitmap

Shifts the bitmap pixels horizontally and vertically.

L_OilifyBitmap

Applies an oil-painting effect to a bitmap.

L_PerlinBitmap

Uses a pseudo-random number generator in order to create a Perlin noise, and then procedurally transforms that noise into a texture.

L_PerspectiveBitmap

Gives a bitmap a 3-D depth, as if it exists on a flat plane and has been skewed into a different shape.

L_PixelateBitmap

Divides the bitmap into rectangular or circular cells and then recreates the image using those cells filled with the minimum, maximum, or average pixel value, depending upon the effect that was set.

L_PlasmaFilterBitmap

Applies color patterns that blend into each other like plasma.

L_PointillistBitmap

Pointillism is a painting technique where the image is composed of tiny, separate dots of primary color. Non primary colors are created by placing primary colors beside each other and allowing the "mixing" to be performed when the image is viewed. This filter creates a similar effect.

L_PolarBitmap

Converts the bitmap from rectangular to polar coordinates and vice versa.

L_PosterizeBitmap

Imposes a poster effect on a bitmap by quantizing the bitmap's colors to a specified number of color levels per plane. For example, two levels means two of red, two of green, and two of blue.

L_PunchBitmap

Warps the bitmap by pinching it toward the center or expanding the bitmap away from its center.

L_PuzzleEffectBitmap

Splits the image into square blocks and randomizes these blocks inside the image.

L_RingEffectBitmap

Divides the image into a certain number of rings. Each ring is rotated according to a rotate angle. The rotate angle for each ring will be chosen randomly by the function or can be passed to the function.

L_RadialBlurBitmap

Rotates the bitmap pixels around a center point.

L_RadWaveBitmap

Distorts a bitmap using a wave radiating from the specified center.

L_RevEffectBitmap

Adds a pseudo-3D wave effect to the bitmap by drawing horizontal lines across the bitmap and basing each line’s height at each point on its brightness at that point.

L_RemoveRedeyeBitmap

Replaces the red component of the pixels with the specified color. To replace only the red component for those pixels in the eyes of the bitmap, select a small region around the eye(s).

L_RippleBitmap

Warps the image in concentric rings.

L_RomanMosaicBitmap

Divides the bitmap into rectangular or rounded rectangular cells and then fills each cell with a color chosen randomly from the colors of each tile’s pixels.

L_SegmentBitmap

Divides the bitmap into segments where each segment’s pixels have approximately the same color (homogenous color).

L_SpherizeBitmap

Warps the image around a 3D spherical shape.

L_SwirlBitmap

Produces a swirl pattern by rotating the bitmap the specified number of degrees about the specified point.

L_SolarizeBitmap

Applies an effect that mimics the accidental exposure of photographic film to light.

L_TextureAlphaBlendBitmap

Combines image data from pBitmapMask and pBitmapUnderlay with an underlay effect. The result is used as a fade mask that will be used to combine pBitmapSrc and pBitmapDst with variable opacity. The result is combined again with pBitmapDst using a constant opacity (using nOpacity).

L_UnderlayBitmap

Combines two bitmaps so that one appears to be an underlying texture for the other.

L_VignetteBitmap

Draws a specified shape and feathers it to the bitmap.

L_WaveBitmap

Distorts the bitmap with two perpendicular waves at the specified angle and with the specified wave type.

L_WindBitmap

Creates thin lines, directed along the specified angle, on the specified bitmap.

L_ZigZagBitmap

Radially distorts the bitmap by creating waves that twist the image around a specified center.

L_ZoomBlurBitmap

Blurs the bitmap along radial lines starting from the specified center point.

L_ZoomWaveBitmap

Distorts the bitmap with a wave zoomed from the specified center.

With any of these functions, except L_UnderlayBitmap, you can limit the effect to a specified region of interest. For information about regions, refer to Defining and Using a Bitmap Region.

Treating the bitmap as a device context opens up many possibilities for artistic effects. The L_CreateLeadDC function lets you get the device context. You can then use the LEADTOOLS special effects functions to combine images in interesting ways. For example, when painting one image on top of another, you could specify a multi-pass paint with a brush effect; then quit before finishing all of the passes. The result would be a blending of the two images. For details, refer to Implementing Special Effects.