This property sets the mode used to expand or contract the bitmap.

[Visual Basic]   imagekitcontrolname.StretchMode[= StretchModeConstants ]
[Visual C++]     [long = ]imagekitcontrolname.GetStretchMode()
                 imagekitcontrolname.SetStretchMode(long Val)
[VB.NET]   imagekitcontrolname.StretchMode[= ImageKit10(A)Lib.StretchModeConstants ]
[C#.NET]   imagekitcontrolname.StretchMode[= ImageKit10(A)Lib.StretchModeConstants ]

* ImageKit10ALib refers to the ANSI version, ImageKit10Lib refers to the Unicode version.

Property Value

Value Explanation
0 ImageKit high quality display function for expanding and contracting bitmaps. (Using this setting is the same as setting the Refine1BitImage and RefineColorImage properties to True)
1 Performs a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels.
(BLACKONWHITE)
2 Performs a Boolean OR operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.
(WHITEONBLACK)
3 (Default value) Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
(COLORONCOLOR)
4 Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
(HALFTONE)

The value in the parentheses () are the same constants used by Windows API

The following constants can be used: ikRefineImage = 0, ikBlackOnWhite = 1, ikWhiteOnBlack = 2, ikColorOnColor = 3, ikHalftone = 4

Explanation

The StretchMode property sets the mode used to expand or contract the bitmap. The default value is 3 (ikColorOnColor). When this property is set to values ranging from 1 to 4, images are processed in the same way as the Windows API SetStretchBitMode function.

Values 1 (ikBlackOnWhite) and 2 (ikWhiteOnBlack) are low quality but faster than the high quality value 3 (ikColorOnColor). Value 4 (ikHalftone) is high quality as well but also slower than values 1 or 2. We recommend that you use value 3 (ikColorOnColor) for most images and when contracting bitmaps, use 4 (ikHalftone).

Even when using 0(ikRefineImage), if the Edit.EditEnable property is true, the image will be displayed without high quality display (i.e. it will be displayed as is).

Setting this value

  This value can be set at run-time.

Retrieving this value

  This value can be retrieved at run-time.

[Differences from the ImageKit7 ActiveX]
Setting the StretchMode property to 0 (ikRefineImage) is the same as using the IK7 Refine1BitImage and RefineColorImage properties.

 

The ImageKit10 ActiveX is a product created by Newtone Corporation