See Also

ImgX_Draw Object  | Draw.ImageWithMergeOptions  | Opacity  | Draw.ImageWithAlpha

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.
See Also Atalasoft - ImgX 6.4 ActiveX dll Submit feedback on this topic

Image Method

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.

Syntax

Public Sub Image( _
   ByVal TopImage As ImgX_Image, _
   Optional ByVal X As Long = 0, _
   Optional ByVal Y As Long = 0, _
   Optional ByRef TransparentColor As ImgX_Color = Nothing, _
   Optional ByVal Tolerance As Single = 1, _
   Optional ByVal Colormatch8bit As Boolean = True, _
   Optional ByVal UndoText As String = "" _
) 

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"

'specify 50% transparency for the overlay
ImgX.Draw.Alpha = 127

'overlay image while masking black pixels with a 10% tolerance
ImgX.Draw.Image ImgXTop.Image, , , ImgX.Support.Color(vbBlack), 10

See Also

ImgX_Draw Object  | Draw.ImageWithMergeOptions  | Opacity  | Draw.ImageWithAlpha

 

 


© 2000-2005 Atalasoft, Inc.