Description
This function will overlay an image on top of the current image. A color in the top image may be used to define a completely transparent area. If the top image contains alpha information, it will be ignored.
Parameters
- TopImage
- The image to overlay onto the current bottom image.
- X
- Horizontal position of top image
- Y
- Vertical position of top image
- TransparentColor
- If a color is given, when this color is found in the top image, it will be ignored and the bottom image will show through completely. For 8-bit images, this parameter is the index to the palette.
- Tolerance
- Tolerance percentage for finding matching of the transparent color. 0 will match with only the exact color. With 100, white matches black. The tolerance is ignored for images with a colordepth of 8 or less. Default: 0.
- Colormatch8bit
- If true, the top palette entries will use the closest bottom palette entry. If false, the top image will be copied onto the bottom with optional transparency matching closest to the bottom palette. The palettes are assumed to be equal if this parameter is False. Default True.
- UndoText
- If undo levels have been enabled with the ImgX.UndoLevels property, this parameter may be used to describe what was done. If omitted, a default text will be used. Alternatively, "No Undo" may be used to skip the creation of an undo level.
Remarks
Set the overlay opacity with the ForeColor.Alpha property.
Example
[Visual Basic] Overlays an image with 50% opacity and with a mask color.
ImgX.Import.FromFile "c:\imagebottom.jpg"
ImgXTop.Import.FromFile "c:\imagetop.jpg"
ImgX.Draw.Alpha = 127
ImgX.Draw.Image ImgXTop.Image, , , ImgX.Support.Color(vbBlack), 10 |
See Also
ImgX_Draw Object
| Draw.ImageWithMergeOptions
| Opacity
| Draw.ImageWithAlpha
© 2000-2005 Atalasoft, Inc.