darker

      8   24 

Function Prototypes
Visual BasicDeclare Function darker Lib "VICFX.DLL" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.darker Lib "VICFX.DLL" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.darker(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int darker(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Javaint vic.vic32jni.darker(imgdes srcimg,imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The darker function places the darker of the source and operator pixels in the result image area.

The image areas are defined by the corresponding image descriptors. Download the combine images module vicfx.

Import library for MSVC: vicfx.lib

Return value

Example C/C++ | Example VB




ddbtoimage

            1    8   24 

Function Prototypes
Visual BasicDeclare Function ddbtoimage Lib "VIC32.DLL" (ByVal hbitmap As Long, ByVal hpal As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.ddbtoimage Lib "VIC32.DLL" (ByVal hbitmap As Integer, ByVal hpal As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.ddbtoimage(int hbitmap, int hPal, ref imgdes resimg);
C/C++int ddbtoimage(HBITMAP hbitmap, HPALETTE hpal, imgdes *resimg);
Javaint vic.vic32jni.ddbtoimage(int hbitmap, int hpal, imgdes resimg);
viclib64
C#int vicwin.ddbtoimage(System.IntPtr hbitmap, System.IntPtr hpal, ref imgdes resimg);

Function Arguments
hbitmap Device dependent bitmap handle
hPal Palette handle or NULL
resimg Result image

Description
The ddbtoimage function creates a Victor-compatible image from a device dependent bitmap and palette. If hPal is NULL the Windows default palette will be used. If the function is successful the image descriptor resimg is filled in.

Ddbtoimage allocates memory to hold the image, so freeimage must be called when this memory is no longer needed.

Return value

See also
dibtoimage

Example C/C++


defaultpalette

      8 

Function Prototypes
Visual BasicDeclare Function defaultpalette Lib "VIC32.DLL" (resimg As imgdes) As Long
VB.NETDeclare Function vicwin.defaultpalette Lib "VIC32.DLL" (ByRef resimg As imgdes) As Integer
C#int vicwin.defaultpalette(ref imgdes resimg);
C/C++int defaultpalette(imgdes *resimg);
Javaint vic.vic32jni.defaultpalette(imgdes resimg);

Function Arguments
resimg Image which is to receive the new palette

Description

The defaultpalette function creates a 16-color palette consisting of the Windows default (or static) colors. This palette is stored in the palette location defined in the image descriptor element palette. The red, green, and blue contributions for each color are shown in Table 6. The function enters 16 into the image descriptor element colors. Defaultpalette is for use with 8-bit images. Defaultpalette creates an all-purpose palette for displaying color images. It can be used with matchcolorimage to force an 8-or 24-bit image to use a standard palette. When limited to using 16 colors use defaultpalette with matchcolorimage to display a 24-bit RGB image as an 8-bit palette color image and to display multiple 8-bit images using the same palette.
Table 6. The 16-color Default Palette
Color number

Red

Green

Blue

0

0

0 0
1 128 0 0
2 0 0 128
3 128 0 128
4 0 128 0
5 128 128 0
6 0 128 128
7 192 192 192
8 128 128 128
9 255 0 0
10 0 0 255
11 255 0 255
12 0 255 0
13 255 255 0
14 0 255 255
15 255 255 255

Return value

Returns number of colors placed in the palette, 0 - 16.

See also

rainbowpalette

Example C/C++




dibsecttoimage

            1    8   24 

Function Prototypes
Visual BasicDeclare Function dibsecttoimage Lib "VIC32.DLL" (ByVal hBitmap As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.dibsecttoimage Lib "VIC32.DLL" (ByVal hBitmap As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.dibsecttoimage(int hBitmap, ref imgdes resimg);
C/C++int dibsecttoimage(HBITMAP hBitmap, imgdes *resimg);
Javaint vic.vic32jni.dibsecttoimage(int hBitmap, imgdes resimg);
viclib64
C#int vicwin.dibsecttoimage(System.IntPtr hBitmap, ref imgdes resimg);

Function Arguments
hBitmap DIB section handle
resimg Result image

Description
The dibsecttoimage function creates a Victor-compatible image from a DIB-section (WIN32 device independent bitmap). This function is useful when a DIB is imported from another source to allow Victor functions to operate on it.

Although Windows allows the palette data of a DIB to be indexes into the currently realized logical palette, dibsecttoimage assumes explicit RGB values. If the function is successful the image descriptor resimg is filled in.

Dibsecttoimage allocates memory to hold the image, so freeimage must be called when this memory is no longer needed. Dibsecttoimage is available only in the Victor Library for 32-bit Windows, excluding Windows NT versions earlier than 3.51.

Return value

See also
dibtoimage

Example C/C++




dibtobitmap

Function Prototypes
Visual BasicDeclare Function dibtobitmap Lib "VIC32.DLL" (ByVal hdc As Long, ByVal dib As Long, hBitmap As Long) As Long
VB.NETDeclare Function vicwin.dibtobitmap Lib "VIC32.DLL" (ByVal hdc As Integer, ByVal dib As Integer, ByRef hBitmap As Integer) As Integer
C#int vicwin.dibtobitmap(int hdc, int dib, ref int hBitmap);
C/C++int dibtobitmap(HDC hdc, byte *dib, HBITMAP *hBitmap);
Javaint vic.vic32jni.dibtobitmap(int hdc, int dib, refvar hBitmap);
viclib64
C#int vicwin.dibtobitmap(System.IntPtr hdc, System.IntPtr dib, System.IntPtr* hBitmap);

Function Arguments
hdc Device context handle
dib Address of packed DIB
hBitmap Bitmap handle to be filled in

Description

The dibtobitmap function creates a device dependent bitmap based on an existing packed device independent bitmap (DIB). In the Victor Library for 32-bit Windows this function is generally unneeded because the allocimage function enters a handle to a bitmap in the image descriptor element hBitmap. If dibtobitmap must be used, then the original DIB must be allocated with the allocdib function instead of allocimage.

Although Windows allows the palette data of a DIB to be indexes into the currently realized logical palette, dibtobitmap assumes explicit RGB values, not palette indexes.

If the function successfully creates the device dependent bitmap, the bitmap handle is placed in the hBitmap variable. This handle must be released with the Windows DeleteObject function when no longer needed.

Return value

See also

Converting a Victor Image to a Device Dependent Bitmap, in the Victor User's Guide.

Example C/C++




dibtoimage

Visual BasicDeclare Function dibtoimage Lib "VIC32.DLL" (ByVal dib As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.dibtoimage Lib "VIC32.DLL" (ByVal dib As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.dibtoimage(int dib, ref imgdes resimg);
C/C++int dibtoimage(UCHAR *dib, imgdes *resimg);
Javaint vic.vic32jni.dibtoimage(int dib, imgdes resimg);
viclib64
C#int vicwin.dibtoimage(System.IntPtr dib, ref imgdes resimg);

Function Arguments
dib Address of source packed dib
resimg Result image

Description

The dibtoimage function creates a Victor-compatible image from a source packed device independent bitmap (DIB). This function is useful when a DIB is imported from the clipboard or other source, to allow Victor functions to operate on it.

Although Windows allows the palette data of a DIB to be indexes into the currently realized logical palette, dibtoimage assumes explicit RGB values.

If the function is successful the image descriptor resimg is filled in.

Note: this function allocates global memory to hold the image, this memory must be released with freeimage when no longer needed.

Return value

See also

setupimgdes

Example C/C++ | Example VB






difference

      8   24 

Function Prototypes
Visual BasicDeclare Function difference Lib "VICFX.DLL" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.difference Lib "VICFX.DLL" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.difference(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int difference(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Javaint vic.vic32jni.difference(imgdes srcimg,imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The difference function subtracts the brightness level of each pixel in the operator image area from the brightness level of the corresponding pixel in the source image area, adds 128, and places the resulting value in the result image area. Result values greater than 255 are set to 255. Result values less than zero are set to zero.

The image areas are defined by the corresponding image descriptors. Download the combine images module vicfx.

Import library for MSVC: vicfx.lib

Return value

Example C/C++ | Example VB






differenceabs

      8   24 

Function Prototypes
Visual BasicDeclare Function differenceabs Lib "VICFX.DLL" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.differenceabs Lib "VICFX.DLL" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.differenceabs(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int differenceabs(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Javaint vic.vic32jni.differenceabs(imgdes srcimg,imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The differenceabs function subtracts the brightness level of each pixel in the operator image area from the brightness level of the corresponding pixel in the source image area and places the absolute value of the difference in the result image area. Result values greater than 255 are set to 255. Result values less than zero are set to zero.

The image areas are defined by the corresponding image descriptors. Download the combine images module vicfx.

Import library for MSVC: vicfx.lib

Return value

Example C/C++ | Example VB


dilate
                8   24 

Function Prototypes
Visual BasicDeclare Function dilate Lib "VIC32.DLL" (ByVal amount As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.dilate Lib "VIC32.DLL" (ByVal amount As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.dilate(int amount, ref imgdes srcimg, ref imgdes resimg);
C/C++int dilate(int amount, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.dilate(int amount, imgdes srcimg, imgdes resimg);

Function Arguments
amount Amount of dilation (0 - 255)
srcimg Source image
resimg Result image

Description
The dilate function darkens an image area by enlarging the dark regions of the image. The variable amount determines the extent of the darkening. Maximum dilation is obtained when amount set to 255 and no dilation occurs if amount is set to zero. If the average brightness of a pixel's 3 x 3 local area is darker than amount, the pixel is replaced by its darkest neighbor.

The image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




displace

      8    24 

Function Prototypes
Visual BasicDeclare Function displace Lib "VIC32.DLL" (ByVal tile As Long, srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.displace Lib "VIC32.DLL" (ByVal tile As Integer, ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.displace(int tile, ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int displace(int tile, imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Javaint vic.vic32jni.displace(int tile, imgdes srcimg, imgdes oprimg, imgdes resimg);

Function Arguments
tileTile mode, 0=off, 1=on
srcimg Source image
oprimg Operator image
resimg Result image

Description

The displace function copies pixel values into new positions in the result image based on the corresponding values in the operator image. If the operator is an 8-bit grayscale image the horizontal and vertical displacements are equal and are shifted up and left. If the operator is a 24-bit image, the horizontal displacement is equal to the operator red value, the vertical displacement is equal to the operator green value.

The tile mode is used if the operator image is smaller than the result image area. If the tile mode is on, the operator will be used repeatedly until the result image area is filled to capacity. If the tile mode is off, the operator will only be used once and then the function will return.

The source, operator, and result image areas are defined by the corresponding image descriptors.

Return value




divide

      8   24 

Function Prototypes
Visual BasicDeclare Function divide Lib "VIC32.DLL" (ByVal divisor As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.divide Lib "VIC32.DLL" (ByVal divisor As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.divide(int divisor, ref imgdes srcimg, ref imgdes resimg);
C/C++int divide(int divisor, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.divide(int divisor, imgdes srcimg, imgdes resimg);

Function Arguments
divisor Divisor (1 - 32767)
srcimg Source image
resimg Result image

Description

The divide function decreases the brightness level of each pixel in the source image area by dividing the level value by a factor and placing the quotient in the result image area.

Result = Source / divisor

The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB






divideimage

      8   24 

Function Prototypes
Visual BasicDeclare Function divideimage Lib "VICFX.DLL" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.divideimage Lib "VICFX.DLL" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.divideimage(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int divideimage(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Javaint vic.vic32jni.divideimage(imgdes srcimg,imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The divideimage function divides the brightness level of each pixel in the source image area by the brightness level of the corresponding pixel in the operator image area and places the quotient in the result image area. Result values greater than 255 are set to 255. Result values less than zero are set to zero.

The image areas are defined by the corresponding image descriptors. Download the combine images module vicfx.

Import library for MSVC: vicfx.lib

Return value

Example C/C++ | Example VB




drawhisto

      8   24 

Function Prototypes
Visual BasicDeclare Function drawhisto Lib "VIC32.DLL" (ByVal hdc As Long, rect As RECT, ByVal bppixel As Long, redtab As Long, grntab As Long, blutab As Long) As Long
VB.NETDeclare Function vicwin.drawhisto Lib "VIC32.DLL" (ByVal hdc As Integer, ByRef rect As RECT, ByVal bppixel As Integer, ByRef redtab As Integer, ByRef grntab As Integer, ByRef blutab As Integer) As Integer
C#int vicwin.drawhisto(int hdc, ref RECT rect, int bppixel, ref int redtab, ref int grntab, ref int blutab);
C/C++int drawhisto(HDC hdc, RECT *rect, int bppixel, long *redtab, long *grntab, long *blutab);
Javaint vic.vic32jni.drawhisto(int hdc, RECT rect, int bppixel, int[] redtab, int[] grntab, int[] blutab);
viclib64
C#int vicwin.drawhisto(System.IntPtr hdc, ref RECT rect, int bppixel, int[] redtab, int[] grntab, int[] blutab);

Function Arguments
hdc Device context handle
rect Size and location of histogram in device pixels
bppixel Bits per pixel (8 or 24)
redtab Red histogram data to display
grntab Green histogram data to display)
blutab Blue histogram data to display

Description

The drawhisto function creates a graph of the histogram data on a device context. The vertical axis is frequency and the horizontal axis is brightness level. The histogram data are taken from arrays of 256 long integers.

The rect structure defines the size and location of the histogram transferred to the device context.

If bppixel is 8 the redtab data is plotted as a single graph. If bppixel is 24 the redtab, grntab, and blutab data is plotted as three stacked graphs.

Return value

Example C/C++ 1

Example C/C++ 2




dropbits

      8   24 

Function Prototypes
Visual BasicDeclare Function dropbits Lib "VIC32.DLL" (ByVal nbits As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.dropbits Lib "VIC32.DLL" (ByVal nbits As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.dropbits(int nbits, ref imgdes srcimg, ref imgdes resimg);
C/C++int dropbits(int nbits, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.dropbits(int nbits, imgdes srcimg, imgdes resimg);

Function Arguments
nbits nbits to drop (0 to 7)
srcimg Source image
resimg Result image

Description

The dropbits function reduces noise in the image by zeroing the least significant bits in the pixel values. The number of bits to zero is specified by the value of nbits.

The source and result image areas are defined by the corresponding image descriptors.

Return value




emboss

      8   24 

Function Prototypes
Visual BasicDeclare Function emboss Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.emboss Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.emboss(ref imgdes srcimg, ref imgdes resimg);
C/C++int emboss(imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.emboss(imgdes srcimg, imgdes resimg);

Function Arguments
srcimg Source image
resimg Result image

Description

The emboss function creates the appearance of embossed edges in an image area. This function is an edge detection filter. The brightness of the resulting pixels is proportional to the magnitude of the brightness difference between diagonally adjacent pixels. The source and result image areas are defined by the corresponding image descriptors.

This function transforms an image area with a 3 x 3 convolution matrix.

Return value




embossongray

      8   24 

Function Prototypes
Visual BasicDeclare Function embossongray Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.embossongray Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.embossongray(ref imgdes srcimg, ref imgdes resimg);
C/C++int embossongray(imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.embossongray(imgdes srcimg, imgdes resimg);

Function Arguments
srcimg Source image
resimg Result image

Description

The embossongray function creates the appearance of embossed edges of an image area placed on a uniform gray area. This function is an edge detection filter. The brightness of the resulting pixels is proportional to the magnitude of the brightness difference between diagonally adjacent pixels. The source and result image areas are defined by the corresponding image descriptors.

This function transforms an image area with a 3 x 3 convolution matrix.

Return value




erode

                8   24 

Function Prototypes
Visual BasicDeclare Function erode Lib "VIC32.DLL" (ByVal amount As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.erode Lib "VIC32.DLL" (ByVal amount As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.erode(int amount, ref imgdes srcimg, ref imgdes resimg);
C/C++int erode(int amount, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.erode(int amount, imgdes srcimg, imgdes resimg);

Function Arguments
amount Amount of erosion (0 - 255)
srcimg Source image
resimg Result image

Description
The erode function brightens an image area by enlarging the bright regions of the image. The variable amount determines the extent of the brightening. Maximum erosion is obtained with amount set to 255 and no erosion occurs if amount is set to zero.

Erode examines a pixel's 3 x 3 local area. If the average brightness of the local area is brighter than 255 minus amount, the central pixel is replaced by its brightest neighbor.

The image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




exchangelevel

      8   24 

Function Prototypes
Visual Basicexchangelevel Lib "VIC32.DLL" (ByVal min As Long, ByVal max As Long, ByVal newval As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.exchangelevel Lib "VIC32.DLL" (ByVal min As Integer, ByVal max As Integer, ByVal newval As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.exchangelevel(int min, int max, int newval, ref imgdes srcimg, ref imgdes resimg);
C/C++int exchangelevel(int min, int max, int newval, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.exchangelevel(int min, int max, int newval, imgdes srcimg, imgdes resimg);

Function Arguments
min Low end of pixel values to change (0-255)
max High end of pixel values to change (0-255)
newval Replacement value (0-255)
srcimg Source image
resimg Result image

Description

The exchangelevel function selectively changes a range of brightness levels within an image area to a new value.

For an RGB image the source red, green, and blue components all must be between min and max for the result pixel to be set to newval. The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




expandcontrast

      8   24 

Function Prototypes
Visual BasicDeclare Function expandcontrast Lib "VIC32.DLL" (ByVal min As Long, ByVal max As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.expandcontrast Lib "VIC32.DLL" (ByVal min As Integer, ByVal max As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.expandcontrast(int min, int max, ref imgdes srcimg, ref imgdes resimg);
C/C++int expandcontrast(int min, int max, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.expandcontrast(int min, int max, imgdes srcimg, imgdes resimg);

Function Arguments
min Low end of pixel values to expand (0-255)
max High end of pixel values to expand (0-255)
srcimg Source image
resimg Result image

Description

The expandcontrast function increases the contrast of the source image area by expanding the brightness range. The value for the lower level is set to 0 (black) and the value for the upper level is set to 255 (white). Values between lower and upper are rescaled.

The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




extractcolorrange

      8   24 

Function Prototypes
Visual BasicDeclare Function extractcolorrange Lib "VIC32.DLL" (ByRef rgbcolor As RGBTRIPLE, ByVal extent As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.extractcolorrange Lib "VIC32.DLL" (ByRef rgbcolor As RGBTRIPLE, ByVal extent As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.extractcolorrange(ref RGBTRIPLE rgbcolor, int extent, ref imgdes srcimg, ref imgdes resimg);
C/C++int extractcolorrange(RGBTRIPLE *rgbcolor, int extent, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.extractcolorrange(RGBTRIPLE *rgbcolor, int extent, imgdes srcimg, imgdes resimg);

Function Arguments
rgbcolorVariable of type RGBTRIPLE defining the color value to find
extentExtent of the color range (0 to 255)
srcimg Source image
resimg Result image

Description

The extractcolorrange function finds all pixels in an image area that are within a color range and sets them equal to 255 in the result image area. This result is a black and white image where the extracted color range is set to white and all other pixels are black.

The RGBTRIPLE structure elements are defined as follows:
rgbtBlueBlue value
rgbtGreenGreen value
rgbtRedRed value

The source and result image areas are defined by the corresponding image descriptors.

Return value




extractplane

      8   24   32 

Function Prototypes
Visual BasicDeclare Function extractplane Lib "VIC32.DLL" (ByVal planeno As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.extractplane Lib "VIC32.DLL" (ByVal planeno As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.extractplane(int planeno, ref imgdes srcimg, ref imgdes resimg);
C/C++int extractplane(int planeno, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.extractplane(int planeno, imgdes srcimg, imgdes resimg);

Function Arguments
planenoPlane number to extract
srcimg Source image
resimg Result image

Description

The extractplane function copies the values in an image area corresponding to the specified plane and puts them into the result image area.

The source image can be 8-, 24-, or 32-bit the result image must be 8-bits per pixel. The plane numbers are:

Plane24-bit RGB Image24-bit HSV Image32-bit CMYK Image
0RedHueCyan
1GreenSaturationMagenta
2BlueValueYellow
3 -- -- Black

The source and result image areas are defined by the corresponding image descriptors.

Return value




flipimage

  1    8   24 

Function Prototypes
Visual BasicDeclare Function flipimage Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.flipimage Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.flipimage(ref imgdes srcimg, ref imgdes resimg);
C/C++int flipimage(imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.flipimage(imgdes srcimg, imgdes resimg);

Function Arguments
srcimg Source image
resimg Result image

Description

The flipimage function flips an image area top to bottom. The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




freebuffer

           

Function Prototypes
Visual BasicDeclare Function freebuffer Lib "VIC32.DLL" (ByVal buffaddr As Long) As Long
VB.NETDeclare Function vicwin.freebuffer Lib "VIC32.DLL" (ByVal buffaddr As Integer) As Integer
C#int vicwin.freebuffer(int buffaddr);
C/C++int freebuffer(byte *buffaddr);
Javaint vic.vic32jni.freebuffer(int buffaddr);
viclib64
C#int vicwin.freebuffer(System.IntPtr buffaddr);

Function Arguments
buffaddr Buffer address

Description

The freebuffer function frees the memory previously allocated by one of the savefiletobuffer functions. If the function fails, the return value is equal to a handle to the memory buffer.

Return value




freeimage

  1    8    16   24 

Function Prototypes
Visual BasicDeclare Sub freeimage Lib "VIC32.DLL" (image As imgdes)
VB.NETDeclare Sub freeimage Lib "VIC32.DLL" (ByRef image As imgdes)
C#void vicwin.freeimage(ref imgdes image);
C/C++void freeimage(imgdes *image);
Javavoid vic.vic32jni.freeimage(imgdes image);

Function Arguments
image Image

Description

The freeimage function releases the global memory associated with the image descriptor and sets all image descriptor elements to zero. Use freeimage to release memory allocated with allocimage, allocDIB, clienttoimage, ddbtoimage, dibtoimage, dibsecttoimage, windowtoimage, and all of the TWscanxxxx functions.

Return value

There is no return value

See also

allocimage, dibtoimage

Example C/C++ | Example VB




gammabrighten

      8   24 

Function Prototypes
Visual BasicDeclare Function gammabrighten Lib "VIC32.DLL" (ByVal gamma As Double, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.gammabrighten Lib "VIC32.DLL" (ByVal gamma As Double, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.gammabrighten(double gamma, ref imgdes srcimg, ref imgdes resimg);
C/C++int gammabrighten(double gamma, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.gammabrighten(double gamma, imgdes srcimg, imgdes resimg);

Function Arguments
gamma Gamma factor
srcimg Source image
resimg Result image

Description

The gammabrighten function increases or decreases the brightness level of each pixel in the source image area and places the result in the result image area. The new pixel value is calculated as

To brighten an image use a gamma value between 0.0 and 1.0. The lower the value, the brighter the resulting image. To darken an image enter a value above 1.0. The higher the value, the darker the resulting image.

To reverse a gamma operation, call gammabrighten a second time and set the gamma value to the inverse of the previous gamma correction factor. For example, brighten an image with gamma of 0.5, and restore it to its original appearance with gamma of 2.0.

The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




gaussianblur

      8   24 

Function Prototypes
Visual BasicDeclare Function gaussianblur Lib "VIC32.DLL" (ByVal ksize As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.gaussianblur Lib "VIC32.DLL" (ByVal ksize As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.gaussianblur(int ksize, ref imgdes srcimg, ref imgdes resimg);
C/C++int gaussianblur(int ksize, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.gaussianblur(int ksize,imgdes srcimg, imgdes resimg);

Function Arguments
ksize Width of local area (3 - 63)
srcimg Source image
resimg Result image

Description The gaussianblur function blurs an image area with a ksize x ksize convolution matrix. The matrix elements are defined by a standard normal distribution. The source and result image areas are defined by the corresponding image descriptors.

For more information about a standard normal distribution, see any introductory statistics textbook.

Return value




getbuffersize

           

Function Prototypes
Visual BasicDeclare Function getbuffersize Lib "VIC32.DLL" (ByVal buffaddr As Long) As Long
VB.NETDeclare Function vicwin.getbuffersize Lib "VIC32.DLL" (ByVal buffaddr As Integer) As Integer
C#int vicwin.getbuffersize(int buffaddr);
C/C++int getbuffersize(byte *buffaddr);
Javaint vic.vic32jni.getbuffersize(int buffaddr);
viclib64
C#uint vicwin.getbuffersize(System.IntPtr buffaddr);

Function Arguments
buffaddr Buffer address

Description

The getbuffersize function returns the size of the memory previously allocated by one of the savefiletobuffer functions. If the function fails, the return value is zero.

Return value




getgifcomment

Function Prototypes
Visual BasicDeclare Function getgifcomment Lib "VIC32.DLL" (ByVal filename As String, ByVal commentstring As String, ByVal commentstringsize As Long) As Long
VB.NETDeclare Function vicwin.getgifcomment Lib "VIC32.DLL" (ByVal filename As String, ByVal commentstring As String, ByVal commentstringsize As Integer) As Integer
C#int vicwin.getgifcomment(string filename, ref byte commentstring, int commentstringsize);
C/C++int getgifcomment(LPCSTR filename, char *commentstring, int commentstringsize);
Javaint vic.vic32jni.getgifcomment(String filename, char[] commentstring, int commentstringsize);

Function Arguments
filename Filename to read
commentstringBuffer to receive comment
commentstringsize Number of characters buffer can hold

Description

The getgifcomment function copies a comment string (if present) from a GIF file to a buffer. If the number of characters in the comment exceeds commentstringsize, the string is truncated to fit into the buffer. To determine the size of the buffer to allocate to hold the string, call getgifcomment with the commentstring value equal NULL (see example).

Return value

See also

setgifcomment

Example C/C++




getpixelcolor

  1    8   24 

Function Prototypes
Visual BasicDeclare Function getpixelcolor Lib "VIC32.DLL" (srcimg As imgdes, ByVal xcoord As Long, ByVal ycoord As Long) As Long
VB.NETDeclare Function vicwin.getpixelcolor Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByVal xcoord As Integer, ByVal ycoord As Integer) As Integer
C#int vicwin.getpixelcolor(ref imgdes srcimg, int xcoord, int ycoord);
C/C++long getpixelcolor(imgdes *srcimg, int xcoord, int ycoord);
Javaint vic.vic32jni.getpixelcolor(imgdes srcimg, int xcoord, int ycoord);

Function Arguments
srcimg Source image
xcoord Pixel x-coordinate
ycoord Pixel y-coordinate

Description

The getpixelcolor function returns the value of a pixel in the image buffer at (xcoord,ycoord). A negative return value indicates an error.

The source image is defined by the image descriptor.

For a 1-bit image, the value returned is either 0 or 1. For an 8-bit image, the value returned is between 0 and 255. For a 24-bit image, RGB values are returned as long integers that can be decomposed as follows:

Return value

Example C/C++ | Example VB




getpngcomment


Visual BasicDeclare Function getpngcomment Lib "VIC32.DLL" (ByVal filename As String, ByVal commenttype As String, ByVal commentstring As String, ByVal commentstringsize As Long) As Long
VB.NETDeclare Function vicwin.getpngcomment Lib "VIC32.DLL" (ByVal filename As String, ByVal commenttype As String, ByVal buffer As String, ByVal buffermax As Integer) As Integer
C#int vicwin.getpngcomment(string filename, ref byte commenttype, ref byte commentstring, int commentstringsize);
C/C++int getpngcomment(LPCSTR filename, char * commenttype, char * commentstring, int commentstringsize);
Javaint vic.vic32jni.getpngcomment(String filename, String commenttype, char[] commentstring, int commentstringsize);

Function Arguments
filename Filename to read
commenttypeType of comment to receive
commentstringBuffer to receive comment
commentstringsize Number of characters buffer can hold

Description
The getpngcomment function copies a comment string (if present) from a PNG file to a buffer. If the number of characters in the comment exceeds commentstringsize, the string is truncated to fit into the buffer. To determine the size of the buffer to allocate to hold the string, call getpngcomment with the commentstring value equal 0 (see example).

Only uncompressed comments can be retrieved with getpngcomment. The defined comment type values are "Title", "Author", "Description", "Copyright", "Creation Time", "Software", "Disclaimer", "Warning", "Source", and "Comment."

Return value

Example C/C++




gifframecount

Visual BasicDeclare Function gifframecount Lib "VIC32.DLL" (ByVal filenameAs String, ByRef totalframes As Long) As Long
VB.NETDeclare Function vicwin.gifframecount Lib "VIC32.DLL" (ByVal filename As String, ByRef totalFrames As Integer) As Integer
C#int vicwin.gifframecount(string filename, ref int totalframes);
C/C++int gifframecount(LPCSTR filename, int *totalframes);
Javaint vic.vic32jni.gifframecount(String filename, refvar totalframes);

Function Arguments
filename Filename to read
totalframesVariable to receive the number of frames in the file

Description

The gifframecount function determines the number of frames in a multiframe GIF file and places the value in the totalframes parameter.

Return value

Example C/C++




gifframecountfrombuffer

Visual BasicDeclare Function gifframecountfrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, ByRef totalframes As Long) As Long
VB.NETDeclare Function vicwin.gifframecountfrombuffer Lib "VIC32.DLL" (ByVal buff As Integer, ByRef totalFrames As Integer) As Integer
C#int vicwin.gifframecountfrombuffer(int buffer, ref int totalframes);
C/C++int gifframecountfrombuffer(UCHAR *buffer, int *totalframes);
Javaint vic.vic32jni.gifframecountfrombuffer(int buffer, refvar totalframes);
viclib64
C#int vicwin.gifframecountfrombuffer(System.IntPtr buffer, buffer, ref int totalframes);

Function Arguments
buffer Buffer address
totalframesVariable to receive the number of frames in the file

Description

The gifframecountfrombuffer function determines the number of frames in a multiframe GIF file stored in memory at buffer address buffer and places the value in the totalframes parameter.

Return value

Example C/C++




gifinfo

Visual BasicDeclare Function gifinfo Lib "VIC32.DLL" (ByVal filenameAs String, gdat As GifData) As Long
VB.NETDeclare Function vicwin.gifinfo Lib "VIC32.DLL" (ByVal filename As String, ByRef gdat As GifData) As Integer
C#int vicwin.gifinfo(string filename, ref GifData gdat);
C/C++int gifinfo(LPCSTR filename, GifData *gdat);
Javaint vic.vic32jni.gifinfo(String filename, GifData gdat);

Function Arguments
filename Filename to read
gdatVariable of type GifData to receive the data

Description

The gifinfo function reads the header of a GIF file and places the image information in the ginfo structure. The structure is defined in the header file VICDEFS.H.

The GifData structure elements are defined as follows:
width Image width in pixels
length Image length in pixels
BitsColRes Number of bits of color resolution
BitsPPixel Number of bits per pixe
TransColor Transparent color
Laceflag Interlace flag
Codesize LZW code size
GIFvers GIF version 87 or 89
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage)

The purpose of the gifinfo function is to determine if a GIF file is readable and permit allocating enough memory to load the file. The GIF file format specification is available on Compuserve.

If a GIF file contains a transparent color, gifinfo will return it in the structure element TransColor. If a transparent color is not present, TransColor is set to -1.

Return value

See also

loadgif, savegif

Example C/C++ | Example VB




gifinfoallframes

Visual BasicDeclare Function gifinfoallframes Lib "VIC32.DLL" (ByVal filename As String, gdata As GifGlobalData, fdatarray As GifFrameData, ByVal frameElem As Long) As Long
VB.NETDeclare Function vicwin.gifinfoallframes Lib "VIC32.DLL" (ByVal filename As String, ByRef gdata As GifGlobalData, ByRef fdata As GifFrameData, ByVal frameElem As Integer) As Integer
C#int vicwin.gifinfoallframes(string filename, ref GifGlobalData gdata, ref GifFrameData fdatarray, int frameElem);
C/C++int gifinfoallframes(LPCSTR filename, GifGlobalData *gdata, GifFrameData *fdatarray, int frameElem);
Javaint vic.vic32jni.gifinfoallframes(String filename, GifGlobalData gdata, GifFrameData[] fdatarray, int frameElem);

Function Arguments
filename Filename to read
gdataGifGlobalData structure to be filled in
fdatarray Array of GifFrameData structures to be filled in
frameElem Number of GifFrameData structures in fdatarray

Description

The gifinfoallframes function reads through an entire multiframe GIF file and places the file and the frame information for frameElem number of frames in the data structures.

The GifGlobalData structure elements are defined as follows:
saveDataGlobal data of type GifGlobalSaveData
scrwidthMaximum pixel width of the animation
scrlengthMaximum pixel length of the animation
hasColorMapnonzero = global palette
bckColorColor index of screen background color
loopNumber of times the animation should repeat
BitsPPixelBitcount
colorResint pixelAspectRatio;
commentOffsetBytes from file start to first comment extension
colorsNumber of colors in global color table
colorMapOffsetGlobal color table offset in file

The GifFrameData structure elements are defined as follows:
saveDataFrame data of type GifFrameSaveData
startxX pixel position with respect to scrwidth
startyY pixel position with respect to scrlength
hasColorMapLocal palette is present!
delay100ths of a second to display frame
transColorTransparent color index, 0 - 255 or -1 for no transparancy
removeByHow frame is to be treated after display:
0 The image is left unremoved
1 The image is left unremoved
2 The image is replaced by the background
3 The image is replaced by the previous image
waitForUserInputnonzero = expect user input
vbitcountVictor bits per pixel
widthGIF image width, length
lengthGIF image width, length
frameFrame number the data describes
interlaceInterlaced image
codesizeCode size
colorsNumber of colors in local color table
colorMapOffsetLocal color table offset in file
rasterDataOffsetBytes from file start to start of raster data

This function should be preceded by a call to gifframecount to determine the number of frames in the file.

Return value

See also

loadgif, savegif

Example C/C++




gifinfoallframesfrombuffer

Visual BasicDeclare Function gifinfoallframesfrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, gdata As GifGlobalData, fdatarray As GifFrameData, ByVal frameElem As Long) As Long
VB.NETDeclare Function vicwin.gifinfoallframesfrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef gdata As GifGlobalData, ByRef fdatarray As GifFrameData, ByVal frameElem As Integer) As Integer
C#int vicwin.gifinfoallframesfrombuffer(ref byte buffer, ref GifGlobalData gdata, ref GifFrameData fdata, int frameElem);
C/C++int gifinfoallframesfrombuffer(unsigned char *buffer, GifGlobalData *gdata, GifFrameData *fdata, int frameElem);
Javaint vic.vic32jni.gifinfoallframesfrombuffer(int buffer, GifGlobalData gdata, GifFrameData[] fdatarray, int frameElem);
viclib64
C#int vicwin.gifinfoallframesfrombuffer(System.IntPtr buffer, ref GifGlobalData gdata, ref GifFrameData fdata, int frameElem);

Function Arguments
bufferBuffer address
gdataGifGlobalData structure to be filled in
fdatarray Array of GifFrameData structures to be filled in
frameElem Number of GifFrameData structures in fdatarray

Description

The gifinfoallframesfrombuffer function reads through an entire multiframe GIF file and places the file and the frame information for frameElem number of frames in the data structures.

The GifGlobalData structure elements are defined as follows:
saveDataGlobal data of type GifGlobalSaveData
scrwidthMaximum pixel width of the animation
scrlengthMaximum pixel length of the animation
hasColorMapnonzero = global palette
bckColorColor index of screen background color
loopNumber of times the animation should repeat
BitsPPixelBitcount
colorResint pixelAspectRatio;
commentOffsetBytes from file start to first comment extension
colorsNumber of colors in global color table
colorMapOffsetGlobal color table offset in file

The GifFrameData structure elements are defined as follows:
saveDataFrame data of type GifFrameSaveData
startxX pixel position with respect to scrwidth
startyY pixel position with respect to scrlength
hasColorMapLocal palette is present!
delay100ths of a second to display frame
transColorTransparent color index, 0 - 255 or -1 for no transparancy
removeByHow frame is to be treated after display:
0 The image is left unremoved
1 The image is left unremoved
2 The image is replaced by the background
3 The image is replaced by the previous image
waitForUserInputnonzero = expect user input
vbitcountVictor bits per pixel
widthGIF image width, length
lengthGIF image width, length
frameFrame number the data describes
interlaceInterlaced image
codesizeCode size
colorsNumber of colors in local color table
colorMapOffsetLocal color table offset in file
rasterDataOffsetBytes from file start to start of raster data

This function should be preceded by a call to gifframecount to determine the number of frames in the file.

Return value

See also

loadgif, savegif

Example C/C++




gifinfoframe

Visual BasicDeclare Function gifinfoframe Lib "VIC32.DLL" (ByVal filename As String, ginfo As GifData, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameTarget As Long) As Long
VB.NETDeclare Function vicwin.gifinfoframe Lib "VIC32.DLL" (ByVal filename As String, ByRef ginfo As GifData, ByRef gdata As GifGlobalData, ByRef fdata As GifFrameData, ByVal frameTarget As Integer) As Integer
C#int vicwin.gifinfoframe(string filename, ref GifData ginfo, ref GifGlobalData gdata, ref GifFrameData fdata, int frameTarget);
C/C++int gifinfoframe(LPCSTR filename, GifData *ginfo, GifGlobalData *gdata, GifFrameData *fdata, int frameTarget);
Javaint vic.vic32jni.gifinfoframe(String filename, GifData ginfo, GifGlobalData gdata, GifFrameData fdata, int frameTarget);

Function Arguments
filename Filename to read
ginfo GifData structure to be filled in
gdataGifGlobalData structure to be filled in
fdata GifFrameData structure to be filled in
frameTarget Frame number (zero-based)

Description

The gifinfoframe function reads the header of a GIF file and the frame header of a specified frame and places the file and image information in the data structures. The first frame in a file is frame number zero.

The GifData structure elements are defined as follows:
width Image width in pixels
length Image length in pixels
BitsColRes Number of bits of color resolution
BitsPPixel Number of bits per pixe
TransColor Transparent color
Laceflag Interlace flag
Codesize LZW code size
GIFvers GIF version 87 or 89
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage)

The GifGlobalData structure elements are defined as follows:
saveDataGlobal data of type GifGlobalSaveData
scrwidthMaximum pixel width of the animation
scrlengthMaximum pixel length of the animation
hasColorMapnonzero = global palette
bckColorColor index of screen background color
loopNumber of times the animation should repeat
BitsPPixelBitcount
colorResint pixelAspectRatio;
commentOffsetBytes from file start to first comment extension
colorsNumber of colors in global color table
colorMapOffsetGlobal color table offset in file

The GifFrameData structure elements are defined as follows:
saveDataFrame data of type GifFrameSaveData
startxX pixel position with respect to scrwidth
startyY pixel position with respect to scrlength
hasColorMapLocal palette is present!
delay100ths of a second to display frame
transColorTransparent color index, 0 - 255 or -1 for no transparancy
removeByHow frame is to be treated after display:
0 The image is left unremoved
1 The image is left unremoved
2 The image is replaced by the background
3 The image is replaced by the previous image
waitForUserInputnonzero = expect user input
vbitcountVictor bits per pixel
widthGIF image width, length
lengthGIF image width, length
frameFrame number the data describes
interlaceInterlaced image
codesizeCode size
colorsNumber of colors in local color table
colorMapOffsetLocal color table offset in file
rasterDataOffsetBytes from file start to start of raster data

Return value

See also

loadgif, savegif

Example C/C++


gifinfoframefrombuffer

Visual BasicDeclare Function gifinfoframefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, ginfo As GifData, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameTarget As Long) As Long
VB.NETDeclare Function vicwin.gifinfoframefrombuffer Lib "VIC32.DLL" (ByVal buff As Integer, ByRef ginfo As GifData, ByRef gdata As GifGlobalData, ByRef fdata As GifFrameData, ByVal frameTarget As Integer) As Integer
C#int vicwin.gifinfoframefrombuffer(ref byte buffer, ref GifData ginfo, ref GifGlobalData gdata, ref GifFrameData fdata, int frameTarget);
C/C++int gifinfoframefrombuffer(UCHAR *buffer, GifData *ginfo, GifGlobalData *gdata, GifFrameData *fdata, int frameTarget);
Javaint vic.vic32jni.gifinfoframefrombuffer(int buffer, GifData ginfo, GifGlobalData gdata, GifFrameData fdata, int frameTarget);
viclib64
C#int vicwin.gifinfoframefrombuffer(System.IntPtr buffAddr buffer, ref GifData ginfo, ref GifGlobalData gdata, ref GifFrameData fdata, int frameTarget);

Function Arguments
buffer Buffer address
ginfo GifData structure to be filled in
gdataGifGlobalData structure to be filled in
fdata GifFrameData structure to be filled in
frameTarget Frame number (zero-based)

Description

The gifinfoframefrombuffer function reads from a GIF file in memory and places the file and frame image information in the data structures. The first frame in a file is frame number zero.

The GifData structure elements are defined as follows:
width Image width in pixels
length Image length in pixels
BitsColRes Number of bits of color resolution
BitsPPixel Number of bits per pixe
TransColor Transparent color
Laceflag Interlace flag
Codesize LZW code size
GIFvers GIF version 87 or 89
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage)

The GifGlobalData structure elements are defined as follows:
saveDataGlobal data of type GifGlobalSaveData
scrwidthMaximum pixel width of the animation
scrlengthMaximum pixel length of the animation
hasColorMapnonzero = global palette
bckColorColor index of screen background color
loopNumber of times the animation should repeat
BitsPPixelBitcount
colorResint pixelAspectRatio;
commentOffsetBytes from file start to first comment extension
colorsNumber of colors in global color table
colorMapOffsetGlobal color table offset in file

The GifFrameData structure elements are defined as follows:
saveDataFrame data of type GifFrameSaveData
startxX pixel position with respect to scrwidth
startyY pixel position with respect to scrlength
hasColorMapLocal palette is present!
delay100ths of a second to display frame
transColorTransparent color index, 0 - 255 or -1 for no transparancy
removeByHow frame is to be treated after display:
0 The image is left unremoved
1 The image is left unremoved
2 The image is replaced by the background
3 The image is replaced by the previous image
waitForUserInputnonzero = expect user input
vbitcountVictor bits per pixel
widthGIF image width, length
lengthGIF image width, length
frameFrame number the data describes
interlaceInterlaced image
codesizeCode size
colorsNumber of colors in local color table
colorMapOffsetLocal color table offset in file
rasterDataOffsetBytes from file start to start of raster data

Return value

See also

loadgif, savegif




gifinfofrombuffer

Visual BasicDeclare Function gifinfofrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, ginfo As GifData) As Long
VB.NETDeclare Function vicwin.gifinfofrombuffer Lib "VIC32.DLL" (ByVal buff As Integer, ByRef gdat As GifData) As Integer
C#int vicwin.gifinfofrombuffer(ref byte buffer, ref GifData ginfo);
C/C++int gifinfofrombuffer(UCHAR *buffer, GifData *ginfo);
Javaint vic.vic32jni.gifinfofrombuffer(int buffer, GifData ginfo);
viclib64
C#int vicwin.gifinfofrombuffer(System.IntPtr buffer, ref GifData ginfo);

Function Arguments
buffer Buffer address
ginfo Variable of type GifData to receive the data

Description

The gifinfofrombuffer function reads the header information from memory holding GIF file data and places the image information in the ginfo structure.

The GifData structure elements are defined as follows:
width Image width in pixels
length Image length in pixels
BitsColRes Number of bits of color resolution
BitsPPixel Number of bits per pixe
TransColor Transparent color
Laceflag Interlace flag
Codesize LZW code size
GIFvers GIF version 87 or 89
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage)

The purpose of the gifinfofrombuffer function is to identify the type and size of the image and permit allocating enough memory to load the image.

If a GIF file contains a transparent color, gifinfo will return it in the structure element TransColor. If a transparent color is not present, TransColor is set to -1.

Return value

See also
gifinfo

Example C/C++




histobrighten

      8   24 

Function Prototypes
Visual BasicDeclare Function histobrighten Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.histobrighten Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.histobrighten(ref imgdes srcimg, ref imgdes resimg);
C/C++int histobrighten(imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.histobrighten(imgdes srcimg, imgdes resimg);

Function Arguments
srcimg Source image
resimg Result image

Description

The histobrighten function brightens an image area by reassigning brightness levels so that the integral of the resulting histogram increases quadratically with brightness level. The source and result image areas are defined by the corresponding image descriptors.

Histogram brightening generally reduces the number of brightness levels present in the image. Contrast is improved, but details may be lost. Histogram brightening is sometimes very effective in bringing out the details of an image when the subject of interest is hidden in shadows.

Return value

See also

histoequalize

Example C/C++ | Example VB




histoequalize

      8   24 

Function Prototypes
Visual BasicDeclare Function histoequalize Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.histoequalize Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.histoequalize(ref imgdes srcimg, ref imgdes resimg);
C/C++int histoequalize(imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.histoequalize(imgdes srcimg, imgdes resimg);

Function Arguments
srcimg Source image
resimg Result image

Description

The histoequalize function reassigns brightness levels of the image area so that the integral of the resulting histogram increases linearly with brightness level. The source and result image areas are defined by the corresponding image descriptors. Histogram equalization is most effective when applied to a dark image.

Return value

Example C/C++ | Example VB




hsv2rgb

Function Prototypes
Visual BasicDeclare Sub hsv2rgb Lib "VIC32.DLL" (ByRef hsvtab As HSVTRIPLE, ByRef rgbtab As RGBQUAD, ByVal colors As Long)
VB.NETDeclare Sub hsv2rgb Lib "VIC32.DLL" (ByRef hsvtab As HSVTRIPLE, ByRef rgbtab As RGBQUAD, ByVal colors As Integer)
C#void vicwin.hsv2rgb(ref HSVTRIPLE hsvtab, ref RGBQUAD rgbtab, int colors);
C/C++void hsv2rgb(HSVTRIPLE *hsvtab, RGBQUAD *rgbtab, int colors);
Javavoid vic.vic32jni.hsv2rgb(HSVTRIPLE[] hsvtab, RGBQUAD[] rgbtab, int colors);
viclib64
C#void vicwin.hsv2rgb(HSVTRIPLE[] hsvtab, ref RGBQUAD rgbtab, int colors);

Function Arguments
hsvtab HSV data table
rgbtab RGB palette table
colors Number of colors to convert

Description

The hsv2rgb function converts a hue, saturation, value (HSV) table to a red, green, blue (RGB) color palette. This function and the rgb2hsv function are used to convert between the RGB and HSV color models.

The HSVTRIPLE structure describes a color consisting of relative intensities of hue, saturation, and value. The hsvtab variable is an array of HSVTRIPLE structures. HSVTRIPLE is a Victor Library data structure.

The RGBQUAD structure describes a color consisting of relative intensities of red, green, and blue. The rgbtab variable is an array of RGBQUAD structures. RGBQUAD is a Windows data structure.

Each HSV table entry can range from 0 to 255. The RGB table must be large enough to hold colors RGBQUAD structures. Each RGB table entry will range from 0 to 255.

Return value

There is no return value.

Example C/C++




hsvimagetorgbimage

         24 

Function Prototypes
Visual BasicDeclare Function hsvimagetorgbimage Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.hsvimagetorgbimage Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.hsvimagetorgbimage(ref imgdes srcimg, ref imgdes resimg);
C/C++int hsvimagetorgbimage(imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.hsvimagetorgbimage(imgdes srcimg, imgdes resimg);

Function Arguments
srcimg Source image
resimg Result image

Description The hsvimagetorgbimage function converts a hue, saturation, value (HSV) image area to a red, green, blue (RGB) image area. This function and the rgbimagetohsvimage function are used to convert between the RGB and HSV color models. The source and result image areas are defined by the corresponding image descriptors.

For more information about a color models, see any introductory graphics textbook.

Return value




imageareatorect

Function Prototypes
Visual BasicDeclare Sub imageareatorect Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef arect As RECT)
VB.NETDeclare Sub imageareatorect Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef arect As RECT)
C#void vicwin.imageareatorect(ref imgdes srcimg, ref RECT arect);
C/C++void imageareatorect(imgdes *srcimg, RECT *arect);
Javavoid vic.vic32jni.imageareatorect(imgdes srcimg, RECT arect);

Function Arguments
srcimg Source image
arect Variable of type RECT to receive the data

Description

The imageareatorect function sets the members of a RECT data structure to the image area defined by the image descriptor.

The RECT structure elements are defined as follows:
leftX-coordinate of the rectangle's upper-left corner
topY-coordinate of the rectangle's upper-left corner
rightX-coordinate of the rectangle's lower-right corner
bottomY-coordinate of the rectangle's lower-right corner

This function performs the following assignments:

Return value

There is no return value.

Example C/C++




imagetodib

  1    8   24 

Function Prototypes
Visual BasicDeclare Function imagetodib Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef dibaddr As Long) As Long
VB.NETDeclare Function vicwin.imagetodib Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef dibaddr As Integer) As Integer
C#int vicwin.imagetodib(ref imgdes srcimg, ref int dibaddr);
C/C++int imagetodib(imgdes *srcimg, UCHAR **dibaddr);
Javaint vic.vic32jni.imagetodib(imgdes srcimg, refvar dibaddr);
viclib64
C#int vicwin.imagetodib(ref imgdes srcimg, ref System.IntPtr dibaddr);

Function Arguments
srcimg Source image
dibaddr Variable to receive result DIB address

Description

The imagetodib example creates a packed device independent bitmap (DIB) from an image area. The image area is defined by the image descriptor. This function is useful for passing an image to the clipboard. In 32-bit Windows imagetoDIB uses the allocDIB function to create a clipboard-compatible DIB in contiguous memory.

A DIB created with this function must be released when no longer needed. To free the memory the following code can be used:

   hMem = GlobalPtrHandle(dib); // WINDOWSX.H macro
   GlobalUnlock(hMem);  // Unlock the handle to the DIB
   GlobalFree(hMem);

If the DIB is passed to the clipboard, memory owned by the DIB must NOT be freed, since Windows assumes responsibility for this memory.

Return value

Example C/C++ | Example VB




insertplane

      8     

Function Prototypes
Visual BasicDeclare Function insertplane Lib "VIC32.DLL" (ByVal planeno As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.insertplane Lib "VIC32.DLL" (ByVal planeno As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.insertplane(int planeno, ref imgdes srcimg, ref imgdes resimg);
C/C++int insertplane(int planeno, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.insertplane(int planeno, imgdes srcimg, imgdes resimg);

Function Arguments
planenoPlane number to insert
srcimg Source image
resimg Result image

Description

The insertplane function copies the values in an image area and puts them into the the specified plane in result image area.

The source image must be 8-bit, the result image must be 24- or 32-bits per pixel. The plane numbers are:

Plane24-bit RGB Image24-bit HSV Image32-bit CMYK Image
0RedHueCyan
1GreenSaturationMagenta
2BlueValueYellow
3 -- -- Black

The source and result image areas are defined by the corresponding image descriptors.

Return value




isgrayscaleimage

            1    8   24 

Function Prototypes
Visual BasicDeclare Function isgrayscaleimage Lib "VIC32.DLL" (srcimg As imgdes) As Long
VB.NETDeclare Function vicwin.isgrayscaleimage Lib "VIC32.DLL" (ByRef srcimg As imgdes) As Integer
C#BOOL vicwin.isgrayscaleimage(ref imgdes srcimg);
C/C++BOOL isgrayscaleimage(imgdes *srcimg);
Javaint vic.vic32jni.isgrayscaleimage(imgdes srcimg);

Function Arguments
srcimg Source image


Description
The isgrayscaleimage function examines the image's palette information and reports whether it is grayscale. This function does not alter the value of the image descriptor element imgtype.

The source image is defined by the image descriptor.

To be judged grayscale an image must have a palette with these characteristics:

This function returns FALSE if the image does not have a palette, for example for a 16-bit grayscale or a 24-bit RGB image.

The loadfile functions call isgrayscaleimage internally and correctly set the value of the image descriptor element imgtype.

Return value






isolate

      8   24 

Function Prototypes
Visual BasicDeclare Function isolate Lib "VIC32.DLL" Alias "addimage"(srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.isolate Lib "VIC32.DLL" Alias "addimage"(ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.isolate(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int isolate(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Javaint vic.vic32jni.isolate(imgdes srcimg,imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The isolate function combines each pixel in the source image area with the corresponding pixel in the operator image area and places the resulting value in the result image area. Result values greater than 255 are set to 255. Result values less than zero are set to zero.

This function is used to isolate a portion of the source image. The operator is treated as a mask such that the operator should be black in the area where source area is to be retained. The operator should be white in the source area to be turned to white.

The image areas are defined by the corresponding image descriptors. Download the combine images module vicfx.

Return value

Example C/C++ | Example VB




jpeggeterror

Function Prototypes
Visual BasicDeclare Function jpeggeterror Lib "VIC32.DLL" () As Long
VB.NETDeclare Function vicwin.jpeggeterror Lib "VIC32.DLL" () As Integer
C#int vicwin.jpeggeterror(void);
C/C++int jpeggeterror(void);
Javaint vic.vic32jni.jpeggeterror();

Description
The jpeggeterror function reports extended error information after a JPEG function returns BAD_JPEG.

Return value

Example C/C++




jpeginfo

Visual BasicDeclare Function jpeginfo Lib "VIC32.DLL" (ByVal filename As String, ByRef jinfo As JpegData) As Long
VB.NETDeclare Function vicwin.jpeginfo Lib "VIC32.DLL" (ByVal filename As String, ByRef jdat As JpegData) As Integer
C#int vicwin.jpeginfo(string filename, ref JpegData jinfo);
C/C++int jpeginfo(LPCSTR filename, JpegData *jinfo);
Javaint vic.vic32jni.jpeginfo(String filename, JpegData jinfo);

Function Arguments
filename Filename to read
jinfoVariable of type JpegData to receive the data

Description

The jpeginfo function reads the header of a JPEG File Interchange Format (JFIF) file and places the image information in the jinfo structure.

The purpose of the jpeginfo function is to determine if a JPEG file is readable and permit allocating enough memory to load the image.

The JpegData structure elements are defined as follows:
ftype File type, 0 - 11 are valid file types, ftype is set to -1 if the file type cannot be determined.
width Image width in pixels
length Image length in pixels
comps Number of components, 1 for a grayscale image, 3 or 4 for a color image
precision Sample precision, 8 or 12 bits per component
sampFac[4] Sampling factors for each component. Each sampFac[] element contains the horizontal and vertical sampling factors in the most significant 4 bits and the least significant 4 bits, respectively. Each sampling factor can be 1, 2, or 4.
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage).

JPEG references:

  1. The Data Compression Book, Mark Nelson, M & T Books, San Mateo, CA 94402, 1992. A good discussion of most of the principles involved in JPEG compression, but this book does not actually implement the algorithm as specified in the standard.
  2. The archive JPSRC3.ZIP. Available from various sources including CompuServe in the GRAPHICSUPPORT forum (GO PICS), library 10. This archive contains CJPEG.EXE, DJPEG.EXE, and oodles of source code.
  3. "Digital Compression and Coding of Continuous-tone Still Images, Part 1, Requirements and Guidelines", ISO/IEC DIS 10918-1. Available from ANSI sales at (212) 642-4900.
  4. JFIF file specification. Available from Literature Dept., C-Cube Microsystems, Inc., 399A W. Trimble Rd., San Jose, CA 95131, (408) 944-6300. The savejpg() and loadjpg() routines read and write files using the JPEG File Interchange Format (JFIF), which is described in this document.

Return value

See also

loadjpg, savejpg

Example C/C++




jpeginfoex

Visual BasicDeclare Function jpeginfoex Lib "VIC32.DLL" (ByVal filename As String, ByRef jinfoex As JpegDataEx) As Long
VB.NETDeclare Function vicwin.jpeginfoex Lib "VIC32.DLL" (ByVal filename As String, ByRef jdat As JpegDataEx) As Integer
C#int vicwin.jpeginfoex(string filename, ref JpegDataEx jinfoex);
C/C++int jpeginfoex(LPCSTR filename, JpegDataEx *jinfoex);
Javaint vic.vic32jni.jpeginfoex(String filename, JpegDataEx jinfoex);

Function Arguments
filename Filename to read
jinfoexJpegDataEx structure to be filled in

Description

The jpeginfoex function reads the header of a JPEG File Interchange Format (JFIF) file and places the image information in the jinfoex structure. Jpeginfoex provides the same information as jpeginfo and, in addition, supplies resolution and thumbnail data.

The JpegDataEx structure elements are defined as follows:
ftype File type, 0 - 11 are valid file types, ftype is set to -1 if the file type cannot be determined.
width Image width in pixels
length Image length in pixels
comps Number of components, 1 for a grayscale image, 3 or 4 for a color image
precision Sample precision, 8 or 12 bits per component
sampFac[4] Sampling factors for each component. Each sampFac[] element contains the horizontal and vertical sampling factors in the most significant 4 bits and the least significant 4 bits, respectively. Each sampling factor can be 1, 2, or 4.
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage).
xres Horizontal resolution
yres Vertical resolution
resunit Resolution units:
0 = No units, xres/yres represent aspect ratio
1 = Dots per inch (dpi)
2 = Dots per centimeter (dpc)
thumbNail Thumbnail descriptor of type JPEG_THUMB_DATA
hasThumbNailnonzero if thumbnail image is present
widthThumbnail width in pixels
lengthThumbnail length in pixels
bitcountThumbnail bits per pixel, 8 or 24
codingThumbnail coding
0x10 = JPEG encoded thumbnail
0x11 = 8-bit palette color thumbnail
0x13 = 24-bit RGB thumbnail

Return value

See also

jpeginfo




jpeginfofrombuffer

Visual BasicDeclare Function jpeginfofrombuffer Lib "VIC32.DLL" (ByVal buff As Long, ByRef jinfo As JpegData) As Long
VB.NETDeclare Function vicwin.jpeginfofrombuffer Lib "VIC32.DLL" (ByVal buffaddr As Integer, ByRef jdat As JpegData) As Integer
C#int vicwin.jpeginfofrombuffer(ref byte buff, ref JpegData jinfo);
C/C++int jpeginfofrombuffer(UCHAR *buff, JpegData *jinfo);
Javaint vic.vic32jni.jpeginfofrombuffer(int buff, JpegData jinfo);
viclib64
C#int vicwin.jpeginfofrombuffer(System.IntPtr buff, ref JpegData jinfo);

Function Arguments
buff Buffer address
jinfoJpegData structure to be filled in

Description

The jpeginfofrombuffer function reads JPEG header data from memory holding JPEG file data and places the image information in the jinfo structure.

The purpose of the jpeginfofrombuffer function is to determine if JPEG data is readable and permit allocating enough memory to load the image.

The JpegData structure elements are defined as follows:
ftype File type, 0 - 11 are valid file types, ftype is set to -1 if the file type cannot be determined.
width Image width in pixels
length Image length in pixels
comps Number of components, 1 for a grayscale image, 3 or 4 for a color image
precision Sample precision, 8 or 12 bits per component
sampFac[4] Sampling factors for each component. Each sampFac[] element contains the horizontal and vertical sampling factors in the most significant 4 bits and the least significant 4 bits, respectively. Each sampling factor can be 1, 2, or 4.
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage).

JPEG references:

  1. The Data Compression Book, Mark Nelson, M & T Books, San Mateo, CA 94402, 1992. A good discussion of most of the principles involved in JPEG compression, but this book does not actually implement the algorithm as specified in the standard.
  2. The archive JPSRC3.ZIP. Available from various sources including CompuServe in the GRAPHICSUPPORT forum (GO PICS), library 10. This archive contains CJPEG.EXE, DJPEG.EXE, and oodles of source code.
  3. "Digital Compression and Coding of Continuous-tone Still Images, Part 1, Requirements and Guidelines", ISO/IEC DIS 10918-1. Available from ANSI sales at (212) 642-4900.
  4. JFIF file specification. Available from Literature Dept., C-Cube Microsystems, Inc., 399A W. Trimble Rd., San Jose, CA 95131, (408) 944-6300. The savejpg() and loadjpg() routines read and write files using the JPEG File Interchange Format (JFIF), which is described in this document.

Return value

See also

jpeginfo

Example C/C++




jpeginfofrombufferex

Visual BasicDeclare Function jpeginfofrombufferex Lib "VIC32.DLL" (ByVal buff As Long, ByRef jinfoex As JpegDataEx) As Long
VB.NETDeclare Function vicwin.jpeginfofrombufferex Lib "VIC32.DLL" (ByVal buffaddr As Integer, ByRef jdat As JpegDataEx) As Integer
C#int vicwin.jpeginfofrombufferex(ref byte buff, ref JpegDataEx jinfoex);
C/C++int jpeginfofrombufferex(UCHAR *buff, JpegDataEx *jinfoex);
Javaint vic.vic32jni.jpeginfofrombufferex(int buff, JpegDataEx jinfoex);
viclib64
C#int vicwin.jpeginfofrombufferex(System.IntPtr buff, ref JpegDataEx jinfoex);

Function Arguments
buff Buffer address
jinfoexJpegDataEx structure to be filled in

Description

The jpeginfofrombufferex function reads the header information from memory holding JPEG file data and places the image information in the jinfoex structure. Jpeginfofrombufferex provides the same information as jpeginfofrombuffer and, in addition, supplies resolution and thumbnail data.

The JpegDataEx structure elements are defined as follows:
ftype File type, 0 - 11 are valid file types, ftype is set to -1 if the file type cannot be determined.
width Image width in pixels
length Image length in pixels
comps Number of components, 1 for a grayscale image, 3 or 4 for a color image
precision Sample precision, 8 or 12 bits per component
sampFac[4] Sampling factors for each component. Each sampFac[] element contains the horizontal and vertical sampling factors in the most significant 4 bits and the least significant 4 bits, respectively. Each sampling factor can be 1, 2, or 4.
vbitcount Victor bits per pixel (used to allocate an imagebuffer with allocimage).
xres Horizontal resolution
yres Vertical resolution
resunit Resolution units:
0 = No units, xres/yres represent aspect ratio
1 = Dots per inch (dpi)
2 = Dots per centimeter (dpc)
thumbNail Thumbnail descriptor of type JPEG_THUMB_DATA
hasThumbNailnonzero if thumbnail image is present
widthThumbnail width in pixels
lengthThumbnail length in pixels
bitcountThumbnail bits per pixel, 8 or 24
codingThumbnail coding
0x10 = JPEG encoded thumbnail
0x11 = 8-bit palette color thumbnail
0x13 = 24-bit RGB thumbnail
Return value

See also

jpeginfofrombuffer, loadjpgfrombuffer




jpegsetthumbnailsize

Function Prototypes
Visual BasicDeclare Function jpegsetthumbnailsize Lib "VIC32.DLL" (ByVal longEdge As Long) As Long
VB.NETDeclare Function vicwin.jpegsetthumbnailsize Lib "VIC32.DLL" (ByVal longEdge As Integer) As Integer
C#int vicwin.jpegsetthumbnailsize(int longEdge);/td>
C/C++int jpegsetthumbnailsize(int longEdge);/td>
Javaint vic.vic32jni.jpegsetthumbnailsize(int longEdge);

Function Arguments
longEdge Size of longer dimension, width or length (1 - 255)

Description

The jpegsetthumbnailsize function sets the size for embedded thumbnails for all subsequent JPEG files created with savejpgex. The value of longEdge is used for the longer dimension, width or length, and the other dimension is calculated to preserve the image aspect ratio. LongEdge must be in the range 1 - 255.

Even if jpegsetthumbnailsize returns NO_ERROR, that does not guarantee that savejpgex will be able to write a JPEG file with an embedded thumbnail of the size specified. The embedded thumbnail must occupy less than 65536 bytes. This is only a concern for 24-bit images where the calculation is

   thumbnail bytes = width * length * 3 +16

So, for example, if longEdge is set to 255 and the other dimension is greater than 85, savejpgex will fail and return BAD_TN_SIZE.

Return value

See also
savejpgex

Example C/C++




jpegsetxyresolution

Visual BasicDeclare Sub jpegsetxyresolution Lib "VIC32.DLL" (ByVal xres As Long, ByVal yres As Long, ByVal resUnit As Long)
VB.NETDeclare Sub jpegsetxyresolution Lib "VIC32.DLL" (ByVal xres As Integer, ByVal yres As Integer, ByVal resunit As Integer)
C#void vicwin.jpegsetxyresolution(unsigned xres, unsigned yres, unsigned resUnit);
C/C++void jpegsetxyresolution(unsigned xres, unsigned yres, unsigned resUnit);
Javavoid vic.vic32jni.jpegsetxyresolution(int xres, int yres, int resUnit);

Function Arguments
xres Horizontal resolution in pixels (0 - 65535)
yres Vertical resolution in pixels (0 - 65535)
resUnit Resolution unit (0-2)
0 = No unit of measurement, xres/yres represent aspect ratio
1 = Inch
2 = Centimeter
Description

The jpegsetxyresolution function sets the horizontal and vertical resolution and resolution unit for a JPEG file. All subsequent files saved with the savejpg functions will use the values set by jpegsetxyresolution. The default values are xres = 1, yres = 1, resunit = 0 (no units); that is, the default setting represents a pixel aspect ratio of 1:1 (square).

Return value

There is no return value.

See also

tiffsetxyresolution




kodalith

      8   24 

Function Prototypes
Visual BasicDeclare Function kodalith Lib "VIC32.DLL" (ByVal threshold As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.kodalith Lib "VIC32.DLL" (ByVal threshold As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.kodalith(const int threshold, ref imgdes srcimg, ref imgdes resimg);
C/C++int kodalith(const int threshold, imgdes *srcimg, imgdes *resimg);
Javaint vic.vic32jni.kodalith(int threshold, imgdes srcimg, imgdes resimg);

Function Arguments
threshold Threshold value for separation (0-255)
srcimg Source image
resimg Result image

Description

The kodalith function creates a high contrast image area, containing only black and white pixels, similar to a Kodalith print. The threshold value determines whether a pixel is set to black or white.

For an RGB image the source pixel value is calculated

The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB


next section