ImageMan ActiveX Control Version 8
Merge Method
See Also  Example  Send comments on this topic.
SrcImage
The Image Control containing the image be merged with the current image.
xOffset

Optional Parameter which specifies the horizontal Offset in pixels of the location where the Source image should be merged. Defaults to 0.

yOffset

Optional Parameter which specifies the vVertical Offset in pixels of the location where the Source image should be merged. Defaults to 0.

Options

Optional parameter which specifies flags that modify the merge. Defaults to All and ImgReplace.

Trans - Specifies that TransparentRGB is the RGB value of the transparent color

Trans2 - Same as Trans but allows some deviation from the transparent color

TransIdx - Specifies that TransparentRGB is an index into the palette of the Src image to be the transparent color

TransIdxArray - Specifies that TransparentRGB is an array of indexes of the transparent colors in the palette of the Src image.

ApplyAlpha - Use alpha channel data to modify data being copied

ColorToAlpha - Takes specified color channels combines and copies to alpha

ImgReplace - Replace Source Image channel or all where not masked

ImgAnd - Combine Src and Dest at given weight if specified

ImgOr - Bitwise OR Src and Dest (DARK Src pixels will get color)

ImgXOR - Bitwise XOR Src and Dest (Bright Src and Dst pixels will get dark) T.o NOT an image invert either Source or Destination image prior to merge

The Color channels to be used must also be specified in addition to the above flags:

All - R, G, B Channels

Red - Red Channel Only

Green - Green Channel Only

Blue - Blue Channel Only

Transparency
Optional parameter specifies the overall transparency to be applied to the Source image. 0 = Fully Opaque, 254 = Fully Transparent. Defaults to fully Opaque.
TransparentRGB

Specifies either an RGB value for the transparent color, if Trans or Trans2 are passed to the Options parameter else  a palette index if TransIdx was specified or an array of  integers specifying transparent color palette entries.

Glossary Item Box

Description

Merges a specified image into the current image with the specified parameters.

Syntax

Visual Basic
Public Sub Merge( _
   ByVal SrcImage As Object, _
   Optional ByRef xOffset As Variant, _
   Optional ByRef yOffset As Variant, _
   Optional ByRef Options As Variant, _
   Optional ByRef Transparency As Variant, _
   Optional ByRef TransparentRGB As Variant _
) 

Parameters

SrcImage
The Image Control containing the image be merged with the current image.
xOffset

Optional Parameter which specifies the horizontal Offset in pixels of the location where the Source image should be merged. Defaults to 0.

yOffset

Optional Parameter which specifies the vVertical Offset in pixels of the location where the Source image should be merged. Defaults to 0.

Options

Optional parameter which specifies flags that modify the merge. Defaults to All and ImgReplace.

Trans - Specifies that TransparentRGB is the RGB value of the transparent color

Trans2 - Same as Trans but allows some deviation from the transparent color

TransIdx - Specifies that TransparentRGB is an index into the palette of the Src image to be the transparent color

TransIdxArray - Specifies that TransparentRGB is an array of indexes of the transparent colors in the palette of the Src image.

ApplyAlpha - Use alpha channel data to modify data being copied

ColorToAlpha - Takes specified color channels combines and copies to alpha

ImgReplace - Replace Source Image channel or all where not masked

ImgAnd - Combine Src and Dest at given weight if specified

ImgOr - Bitwise OR Src and Dest (DARK Src pixels will get color)

ImgXOR - Bitwise XOR Src and Dest (Bright Src and Dst pixels will get dark) T.o NOT an image invert either Source or Destination image prior to merge

The Color channels to be used must also be specified in addition to the above flags:

All - R, G, B Channels

Red - Red Channel Only

Green - Green Channel Only

Blue - Blue Channel Only

Transparency
Optional parameter specifies the overall transparency to be applied to the Source image. 0 = Fully Opaque, 254 = Fully Transparent. Defaults to fully Opaque.
TransparentRGB

Specifies either an RGB value for the transparent color, if Trans or Trans2 are passed to the Options parameter else  a palette index if TransIdx was specified or an array of  integers specifying transparent color palette entries.

Example

Simple Merge (Visual Basic)Copy Code
' Do a simple paste of Img2 into the Img1 control at 100x100
Img1.Merge Img2.Object, 100, 100

' Merge Img2 into Img1 using 50% transparency (like a watermark)
Img1.Merge Img2.Object, 100, 100, 0, 128

'Merge Img2 into Img2 specifying Red as a transparent color
Img1.Merge Img2.Object, 20, 20, IMActX8Ctl.Trans Or IMActX8Ctl.Channels.All, 254, RGB(255, 0, 0)

'Merge Img2 into Img2 specifying Red as a transparent color but with 50 % transparency
Img1.Merge Img2.Object, 20, 20, IMActX8Ctl.Trans Or IMActX8Ctl.Channels.All, 128, RGB(255, 0, 0)

See Also

© 2014 Data Techniques Inc. All Rights Reserved.