lighter

      8   24 

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

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The lighter function places the lighter 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


limitlevel

      8   24 

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

Function Arguments
limit Maximum brightness level (0-255)
srcimg Source image
resimg Result image

Description

The limitlevel function sets any brightness levels within an image area that are greater than limit to limit.

For an RGB image the source red, green, and blue components all must be greater than or equal to limit for the result pixel to be set to limit. The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




loadbif

      8 

Function Prototypes
Visual Basic Declare Function loadbif Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadbif Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadbif(ref string filename, ref imgdes resimg);
C/C++int loadbif(LPCSTR filename, imgdes *resimg);
Javaint vic.vic32jni.loadbif(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadbif function loads an 8-bit binary image file (BIF) into an area in an image buffer. The image area is defined by the image descriptor.

BIF files contain only brightness level data stored as one byte per pixel. Level data can range from 0 to 255. The image data is stored in rows where the first row of data corresponds to the topof the image. There is no palette data associated with a BIF file. When a BIF image is loaded, bit 0 of the image descriptor member imgtype is set to 1.

Return value

Example C/C++ | Example VB




loadbmp

  1    8   24 

Function Prototypes
Visual Basic Declare Function loadbmp Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadbmp Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadbmp(ref string filename, ref imgdes resimg);
C/C++int loadbmp(LPCSTR filename, imgdes *resimg);
Javaint vic.vic32jni.loadbmp(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadbmp function loads image data from a BMP file into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The BMP file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file. Loadbmp will enter into the image descriptor member colors the number of palette colors loaded. Loadbmp loads 1-, 4-, 8-, 16-, 24-, or 32-bit BMP files. When 4-bit BMP files are loaded, they are expanded into 8-bit image buffers and when 16- or 32-bit BMP files are loaded they are stored in 24-bit image buffers.

A BMP file contains a BITMAPFILEHEADER followed by a device independent bitmap (DIB) consisting of a BITMAPINFO structure, which describes the dimensions and colors of the bitmap, and an array of bytes defining the pixels of the bitmap. The bits in the array are packed together, but each scan line must be zero-padded to end on a LONG boundary. The origin of the bitmap is the lower-left corner.

DIBs are discussed in the Victor User's Guide in the DIB Review section. The BMP file format data structures are discussed in Microsoft Windows SDK Programmer's Reference .

Return value

See also

bmpinfo, savebmp

Example C/C++ | Example VB




loadbmpfrombuffer

            1    8   24 


Function Prototypes
Visual Basic Declare Function loadbmpfrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadbmpfrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.loadbmpfrombuffer(ref byte buffer_firstelem, ref imgdes resimg);
C/C++int loadbmpfrombuffer(UCHAR *buffer, imgdes *resimg);
Javaint vic.vic32jni.loadbmpfrombuffer(int buffer, imgdes resimg);
viclib64
C#int vicwin.loadbmpfrombuffer(System.IntPtr buffer, ref imgdes resimg);

Function Arguments
buffer Buffer address
resimg Result image

Description
The loadbmpfrombuffer function loads BMP file data from a memory buffer into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The BMP file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file. Loadbmpfrombuffer will enter into the image descriptor member colors the number of palette colors loaded.

Loadbmpfrombuffer loads 1-, 4-, 8-, 16-, 24-, or 32-bit BMP files. When 4-bit BMP files are loaded, they are expanded into 8-bit image buffers and when 16- or 32-bit BMP files are loaded they are stored in 24-bit image buffers.

BMP file data contains a BITMAPFILEHEADER followed by a device independent bitmap (DIB) consisting of a BITMAPINFO structure, which describes the dimensions and colors of the bitmap, and an array of bytes defining the pixels of the bitmap. The bits in the array are packed together, but each scan line must be zero-padded to end on a LONG boundary. The origin of the bitmap is the lower-left corner.

DIBs are discussed in the Victor User's Guide. The BMP file format data structures are discussed in Microsoft Windows SDK Programmer's Reference .

Return value

See also bmpinfo, savebmp




loadbmppalette

Function Prototypes
Visual Basic Declare Function loadbmppalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadbmppalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadbmppalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadbmppalette(LPCSTR filename, RGBQUAD *paltab);
Javaint vic.vic32jni.loadbmppalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values

Description

The loadbmppalette function loads the palette data from a BMP image file into paltab. Paltab must be large enough to hold all of the palette data:


 

biBitCount

Number of RGBQUAD elements

Palette table size (bytes)

1

2 8
4 16 64
8 256 1024
24 0 0


When loading a BMP file, it is not necessary to explicitly call this function, because loadbmp automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadbmppalettefrombuffer


Function Prototypes
Visual Basic Declare Function loadbmppalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadbmppalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadbmppalettefrombuffer(ref byte buffer_firstelem, ref RGBQUAD paltab);
C/C++int loadbmppalettefrombuffer(UCHAR *buffer, RGBQUAD *paltab);
Java int vic.vic32jni.loadbmppalettefrombuffer(int buffer, RGBQUAD[] paltab);
viclib64
C#int vicwin.loadbmppalettefrombuffer(System.IntPtr buffer, ref RGBQUAD paltab);

Function Arguments

buffer Buffer address
paltab Address of RGBQUAD buffer for palette values


Description
The loadbmppalettefrombuffer function loads the palette data from a memory buffer holding BMP file data into paltable. Paltable must be large enough to hold all of the palette data:

 

biBitCount

Number of RGBQUAD elements

Palette table size (bytes)

1

2 8
4 16 64
8 256 1024
24 0 0


When loading a BMP file, it is not necessary to call this function, because loadbmpfrombuffer automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value




loadgif

 

  1    8 

Function Prototypes
Visual Basic Declare Function loadgif Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadgif Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadgif(ref string filename, ref imgdes resimg);
C/C++int loadgif(LPCSTR filename, imgdes *resimg);
Java int vic.vic32jni.loadgif(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadgif function loads image data from a GIF file into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The GIF file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadgif will enter into the image descriptor member colors the number of palette colors loaded. Loadgif loads 1- to 8-bit GIF images. 1-Bit GIF images are loaded into 1-bit image buffers and 2-to 8-bit GIF images are loaded into 8-bit image buffers.

The transparent color in a GIF file can be obtained using the gifinfo function. If a transparent color is present, 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, loadgifpalette, savegif, savegifex

Example C/C++ | Example VB




loadgifframe

  1    8 

Function Prototypes
Visual BasicDeclare Function loadgifframe Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, gdata As GifGlobalData, fdata As GifFrameData) As Long
VB.NETDeclare Function vicwin.loadgifframe Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByRef gdata As GifGlobalData, ByRef fdata As GifFrameData) As Integer
C#int vicwin.loadgifframe(ref string filename, ref imgdes resimg, ref GifGlobalData gdata, ref GifFrameData fdata);
C/C++int loadgifframe(LPCSTR filename, imgdes *resimg, GifGlobalData *gdata, GifFrameData *fdata);
Java int vic.vic32jni.loadgifframe(String filename, imgdes resimg, GifGlobalData gdata, GifFrameData fdata);

Function Arguments
filenameFilename to load
resimgResult image
gdataAddress of global-file data structuree
fdataAddress of frame-specific data structure

Description

The loadgifframe function loads image data from an individual frame in a GIF file into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette. The specific frame is defined by the GifFrameData structure fdata. Before calling this function the data structures must be completed by calling the gifinfoframe or gifinfoallframes function.

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

Refer to the description of loadgif for information about the gif format and lzw compression restrictions.

Return value

See also

loadgif, gifinfoframe, gifframecount, gifinfoallframes, savegifframe

Example C/C++




loadgifframefrombuffer

  1    8 

Function Prototypes
Visual BasicDeclare Function loadgifframefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, resimg As imgdes, gdata As GifGlobalData, fdata As GifFrameData) As Long
VB.NETDeclare Function vicwin.loadgifframefrombuffer Lib "VIC32.DLL" (ByVal buff As Integer, ByRef resimg As imgdes, ByRef gdata As GifGlobalData, ByRef fdata As GifFrameData) As Integer
C#int vicwin.loadgifframefrombuffer(ref byte buffer_firstelem, ref imgdes resimg, ref GifGlobalData gdata, ref GifFrameData fdata);
C/C++int loadgifframefrombuffer(UCHAR *buffer, imgdes *resimg, GifGlobalData *gdata, GifFrameData *fdata);
Java int vic.vic32jni.loadgifframefrombuffer(int buffer, imgdes resimg, GifGlobalData gdata, GifFrameData fdata);
viclib64
C#int vicwin.loadgifframefrombuffer(System.IntPtr buffer, ref imgdes resimg, ref GifGlobalData gdata, ref GifFrameData fdata);

Function Arguments
bufferBuffer address
resimgResult image
gdataAddress of global-file data structuree
fdataAddress of frame-specific data structure

Description

The loadgifframefrombuffer function loads image data from an individual frame in a GIF file in memory into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette. The specific frame is defined by the GifFrameData structure fdata. Before calling this function the data structures must be completed by calling the gifinfoframefrombuffer or gifinfoallframesfrombuffer function.

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,Y pixel position with respect to scrwidth, scrlength
startyX,Y pixel position with respect to scrwidth, 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
waitForUserInputIf true, 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

Refer to the description of loadgif for information about the gif format and lzw compression restrictions.

Return value

See also

loadgif, gifinfoframe, gifframecount, gifinfoallframes, savegifframe




loadgiffrombuffer

            1    8 


Function Prototypes
Visual Basic Declare Function loadgiffrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadgiffrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.loadgiffrombuffer(ref byte buffer_firstelem, ref imgdes resimg);
C/C++int loadgiffrombuffer(UCHAR *buffer, imgdes resimg);
Java int vic.vic32jni.loadgiffrombuffer(int buffer, imgdes resimg);
viclib64
C#int vicwin.loadgiffrombuffer(System.IntPtr buffer, ref imgdes resimg);

Function Arguments
buffer Buffer address
resimg Result image

Description
The loadgiffrombuffer function loads image data from a memory buffer holding GIF file data into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The GIF file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadgiffrombuffer will enter into the image descriptor member colors the number of palette colors loaded. Loadgiffrombuffer loads 1- to 8-bit GIF images. 1-Bit GIF images are loaded into 1-bit image buffers and 2- to 8-bit GIF images are loaded into 8-bit image buffers.
The transparent color in a GIF file can be obtained using the gifinfofrombuffer function.

Return value

See also gifinfofrombuffer, loadgifpalettefrombuffer, savegiftobufferex




loadgifpalette

Function Prototypes
Visual Basic Declare Function loadgifpalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadgifpalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadgifpalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadgifpalette(LPCSTR filename, RGBQUAD far *paltab);
Java int vic.vic32jni.loadgifpalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values

Description

The loadgifpalette function loads the palette data from a GIF image file into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes). A GIF image may contain up to 256 colors.

When loading a GIF file, it is not necessary to call this function, because loadgif automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadgifframepalette

Function Prototypes
Visual Basic Declare Function loadgifframepalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD, ByVal framenumber As Long) As Long
VB.NETDeclare Function vicwin.loadgifframepalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD, ByVal framenumber As Integer) As Integer
C#int vicwin.loadgifframepalette(ref string filename, ref RGBQUAD paltab, int framenumber);
C/C++int loadgifframepalette(LPCSTR filename, RGBQUAD *paltab, int framenumber);
Java int vic.loadgifframepalette(String filename, RGBQUAD[] paltab, int framenumber);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values
framenumber Frame number whose palette is requested, zero-based

Description

The loadgifframepalette function loads the palette data used by the specified frame number from a GIF image file into paltable. If there is no local palette for the frame the global palette will be retrieved. Paltab must be an array of 256 RGBQUAD structures (1024 bytes). A GIF image may contain up to 256 colors.

When loading a GIF frame, it is not necessary to call this function, because loadgifframe automatically loads the correct palette data.

Return value

Example C/C++




loadgifframepalettefrombuffer

Function Prototypes
Visual Basic Declare Function loadgifframepalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, paltab As RGBQUAD, ByVal framenumber As Long) As Long
VB.NETDeclare Function vicwin.loadgifframepalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef paltab As RGBQUAD, ByVal framenumber As Integer) As Integer
C#int vicwin.loadgifframepalettefrombuffer(ref byte buffer_firstelem, ref RGBQUAD paltab, int framenumber);
C/C++int loadgifframepalettefrombuffer(UCHAR *buffer, RGBQUAD *paltab, int framenumber);
Java int vic.loadgifframepalettefrombuffer(int buffer, RGBQUAD[] paltab, int framenumber);
viclib64
C#int vicwin.loadgifframepalettefrombuffer(System.IntPtr buffer, ref RGBQUAD paltab, int framenumber);

Function Arguments
buffer Buffer address
paltab Address of RGBQUAD buffer for palette values
framenumber Frame number whose palette is requested, zero-based

Description

The loadgifframepalettefrombuffer function loads the palette data used by the specified frame number from a GIF image file into paltab. If there is no local palette for the frame the global palette will be retrieved. Paltab must be an array of 256 RGBQUAD structures (1024 bytes). A GIF image may contain up to 256 colors.

When loading a GIF frame, it is not necessary to call this function, because loadgifframefrombuffer automatically loads the correct palette data.

Return value




loadgifglobalpalette

Function Prototypes
Visual Basic Declare Function loadgifglobalpalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadgifglobalpalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadgifglobalpalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadgifglobalpalette(LPCSTR filename, RGBQUAD *paltab);
Java int vic.vic32jni.loadgifglobalpalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values

Description

The loadgifglobalpalette function loads the global palette data from a GIF image file into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes). A GIF image may contain up to 256 colors.

When loading a GIF file, it is not necessary to call this function, because loadgif automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadgifglobalpalettefrombuffer

Function Prototypes
Visual Basic Declare Function loadgifglobalpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadgifglobalpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadgifglobalpalettefrombuffer(ref byte buffer_firstelem, ref RGBQUAD paltab);
C/C++int loadgifglobalpalettefrombuffer(UCHAR *buffer, RGBQUAD far *paltab);
Java int vic.vic32jni.loadgifglobalpalettefrombuffer(int buffer, RGBQUAD[] paltab);
viclib64
C#int vicwin.loadgifglobalpalettefrombuffer(System.IntPtr buffer, ref RGBQUAD paltab);

Function Arguments
buffer Buffer address
paltab Address of RGBQUAD buffer for palette values

Description

The loadgifglobalpalettefrombuffer function loads the global palette data from a GIF image file into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes). A GIF image may contain up to 256 colors.

When loading a GIF file, it is not necessary to call this function, because loadgiffrombuffer automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value




loadgifpalettefrombuffer

Function Prototypes
Visual Basic Declare Function loadgifpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadgifpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadgifpalettefrombuffer(ref byte buffer_firstelem, ref RGBQUAD paltab);
C/C++int loadgifpalettefrombuffer(UCHAR *buffer, RGBQUAD *paltab);
Java int vic.vic32jni.loadgifpalettefrombuffer(int buffer, RGBQUAD[] paltab);
viclib64
C#int vicwin.loadgifpalettefrombuffer(System.IntPtr buffer, ref RGBQUAD paltab);

Function Arguments
buffer Buffer address
paltab Address of RGBQUAD buffer for palette values

Description
The loadgifpalettefrombuffer function loads the palette data from a memory buffer holding GIF file data into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes). A GIF image may contain up to 256 colors.

When loading a GIF file, it is not necessary to call this function, because loadgiffrombuffer automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value




loadjpg

      8   24 

Function Prototypes
Visual Basic Declare Function loadjpg Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadjpg Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadjpg(ref string filename, ref imgdes resimg);
C/C++int loadjpg(LPCSTR filename, imgdes *resimg);
Java int vic.vic32jni.loadjpg(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadjpg function loads image data from a JPEG file into an area in an image buffer defined by the image descriptor. The JPEG file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadjpg loads 24-bit color or 8-bit grayscale images in the JPEG File Interchange Format (JFIF). Loadjpg reads baseline and extended DCT sequential and progressive files that are Huffman encoded (file types SOF0, SOF1, SOF2). The JPEG lossless mode format is not supported.

Return value

See also

jpeginfo, savejpg

Example C/C++ | Example VB




loadjpgex

      8   24 

Function Prototypes
Visual Basic Declare Function loadjpgex Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, ByVal mode as long) As Long
VB.NETDeclare Function vicwin.loadjpgex Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByVal mode As Integer) As Integer
C#int vicwin.loadjpgex(ref string filename, ref imgdes resimg, int mode);
C/C++int loadjpgex(LPCSTR filename, imgdes *resimg, int mode);
Java int vic.vic32jni.loadjpgex(String filename, imgdes resimg, int mode);

Function Arguments
filename Filename to load
resimg Result image
mode Conversion mode
0 = standard conversion of ycc to rgb
2 = no conversion

Description

The loadjpgex function loads image data from a JPEG file into an area in an image buffer defined by the image descriptor. The JPEG file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadjpgex loads 24-bit color or 8-bit grayscale images in the JPEG File Interchange Format (JFIF). Loadjpgex reads baseline and extended DCT sequential and progressive files that are Huffman encoded (file types SOF0, SOF1, SOF2). The JPEG lossless mode format is not supported.

When the mode parameter is set to two, the image will be loaded without conversion from YCbCr color space to RGB color space.

Return value

See also

loadjpg




loadjpgfrombuffer

      8   24 

Function Prototypes
Visual Basic Declare Function loadjpgfrombuffer Lib "VIC32.DLL" (ByVal buffer as Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadjpgfrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.loadjpgfrombuffer(ref byte buffer_firstelem, ref imgdes resimg);
C/C++int loadjpgfrombuffer(UCHAR *buffer, imgdes *resimg);
Java int vic.vic32jni.loadjpgfrombuffer(int buffer, imgdes resimg);
viclib64
C#int vicwin.loadjpgfrombuffer(System.IntPtr buffer, ref imgdes resimg);

Function Arguments
buffer Buffer address
resimg Result image

Description

The loadjpgfrombuffer function loads image data from memory holding JPEG file data into an area in an image buffer defined by the image descriptor. The JPEG file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadjpgfrombuffer loads 24-bit color or 8-bit grayscale images in the JPEG File Interchange Format (JFIF). Loadjpgfrombuffer reads baseline and extended DCT sequential and progressive files that are Huffman encoded (file types SOF0, SOF1, SOF2). The JPEG lossless mode format is not supported.

Return value

See also

loadjpg, jpeginfofrombuffer

Example C/C++




loadjpgfrombufferex

      8   24 

Function Prototypes
Visual Basic Declare Function loadjpgfrombufferex Lib "VIC32.DLL" (ByVal buffer as Long, resimg As imgdes, ByVal mode as long) As Long
VB.NETDeclare Function vicwin.loadjpgfrombufferex Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes, ByVal mode As Integer) As Integer
C#int vicwin.loadjpgfrombufferex(ref byte buffer_firstelem, ref imgdes resimg, int mode);
C/C++int loadjpgfrombufferex(UCHAR *buffer, imgdes *resimg, int mode);
Java int vic.vic32jni.loadjpgfrombufferex(int buffer, imgdes resimg, int mode);
viclib64
C#int vicwin.loadjpgfrombufferex(System.IntPtr buffer, ref imgdes resimg, int mode);

Function Arguments
buffer Buffer address
resimg Result image
mode Conversion mode
0 = standard conversion of ycc to rgb
2 = no conversion

Description

The loadjpgfrombufferex function loads image data from memory holding JPEG file data into an area in an image buffer defined by the image descriptor. The JPEG file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadjpgfrombufferex loads 24-bit color or 8-bit grayscale images in the JPEG File Interchange Format (JFIF). Loadjpgfrombufferex reads baseline and extended DCT sequential and progressive files that are Huffman encoded (file types SOF0, SOF1, SOF2). The JPEG lossless mode format is not supported.

When the mode parameter is set to two, the image will be loaded without conversion from YCbCr color space to RGB color space.

Return value

See also

loadjpgfrombuffer




loadjpgthumbnail

       8   24 

Function Prototypes
Visual Basic Declare Function Declare Function loadjpgthumbnail Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, ByVal createThumbNail as Long) As Long
VB.NETDeclare Function vicwin.loadjpgthumbnail Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByVal createThumbNail As Integer) As Integer
C#int vicwin.loadjpgthumbnail(ref string filename, ref imgdes resimg, int createThumbNail);
C/C++int loadjpgthumbnail(LPCSTR filename, imgdes *resimg, BOOL createThumbNail);
Java int vic.vic32jni.loadjpgthumbnail(String filename, imgdes resimg, int createThumbNail);

Function Arguments
filename Filename to load
resimg Result image
createThumbNail Create thumbnail flag
nonzero = TRUE
zero = FALSE
Description

The loadjpgthumbnail function loads or creates thumbnail image data from a JPEG image file into an area in an image buffer defined by the image descriptor.

This function is similar to loadjpg. But instead of loading a full size image, a smaller "thumbnail" version of the image is loaded.

Use the jpeginfoex function to obtain information about the main image and the thumbnail image. If an embedded thumbnail does not exist in the file, a thumbnail image will be created from the main image. The thumbnail image (embedded or created) will be resized to fit the area specified by the image descriptor while maintaining the aspect ratio. The resulting image will not, however, be resized larger than the main image contained in the file.

As an example, if a thumbnail is created from a 640 x 480 main image (4:3 aspect ratio) and the image area is 100 x 100, the resulting image dimensions will be 100 x 75.

A JPEG file may have an embedded thumbnail in the header information. The createThumbNail flag determines whether a new thumbnail image is to be created regardless of the presence of an existing embedded thumbnail.

CreateThumbNail can have the following values:

     TRUE      Create thumbnail from main image

     FALSE     Load embedded thumbnail if present, otherwise create thumbnail from main image

Loadjpgthumbnail loads a 24-bit color, 8-bit palette color, or grayscale thumbnail image. If an embedded JPEG-encoded thumbnail is in the file, loadjpgthumbnail will create a thumbnail based on the main image.

For the fastest loading of a thumbnail, set CreateThumbNail to FALSE. Setting CreateThumbNail to TRUE will probably result in a clearer image if the dimensions of image are much larger that those of the embedded thumbnail.

Return value

See also

jpeginfoex, savejpgex

Example C/C++




loadjpgthumbnailfrombuffer

       8   24 

Function Prototypes
Visual Basic Declare Function loadjpgthumbnailfrombuffer Lib "VIC32.DLL" (ByVal buffer as Long, resimg As imgdes, ByVal createThumbNail as Long) As Long
VB.NETDeclare Function vicwin.loadjpgthumbnailfrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes, ByVal createThumbNail As Integer) As Integer
C#int vicwin.loadjpgthumbnailfrombuffer(ref byte buffer_firstelem, ref imgdes resimg, int createThumbNail);
C/C++int loadjpgthumbnailfrombuffer(UCHAR *buffer, imgdes *resimg, BOOL createThumbNail);
Java int vic.vic32jni.loadjpgthumbnailfrombuffer(int buffer, imgdes resimg, int createThumbNail);
viclib64
C#int vicwin.loadjpgthumbnailfrombuffer(System.IntPtr buffer, ref imgdes resimg, int createThumbNail);

Function Arguments
buffer Buffer address
resimg Result image
createThumbNail Create thumbnail flag
nonzero = TRUE
zero = FALSE
Description

The loadjpgthumbnailfrombuffer function loads or creates thumbnail image data from memory holding JPEG file data into an area in an image buffer defined by the image descriptor.

This function is similar to loadjpgfrombuffer. But instead of loading a full size image, a smaller "thumbnail" version of the image is loaded.

Use the jpeginfofrombufferex function to obtain information about the main image and the thumbnail image. If an embedded thumbnail does not exist, a thumbnail image will be created from the main image. The thumbnail image (embedded or created) will be resized to fit the area specified by the image descriptor while maintaining the aspect ratio. The resulting image will not, however, be resized larger than the main image.

As an example, if a thumbnail is created from a 640 x 480 main image (4:3 aspect ratio) and the image area is 100 x 100, the resulting image dimensions will be 100 x 75.

A JPEG file may have an embedded thumbnail in the header information. The createThumbNail flag determines whether a new thumbnail image is to be created regardless of the presence of an existing embedded thumbnail.

CreateThumbNail can have the following values:

     TRUE      Create thumbnail from main image

     FALSE     Load embedded thumbnail if present, otherwise create thumbnail from main image

Loadjpgthumbnailfrombuffer loads a 24-bit color, 8-bit palette color, or grayscale thumbnail image. If an embedded JPEG-encoded thumbnail is in the file, loadjpgthumbnailfrombuffer will create a thumbnail based on the main image.

For the fastest loading of a thumbnail, set CreateThumbNail to FALSE. Setting CreateThumbNail to TRUE will probably result in a clearer image if the dimensions of image are much larger than those of the embedded thumbnail,

Return value

See also

jpeginfofrombufferex, loadjpgthumbnail




loadpcx

  1    8   24 

Function Prototypes
Visual Basic Declare Function loadpcx Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadpcx Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadpcx(ref string filename, ref imgdes resimg);
C/C++int loadpcx(LPCSTR filename, imgdes *resimg);
Java int vic.vic32jni.loadpcx(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadpcx function loads an image from a PCX file into an area in the image buffer. The image area is defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The PCX file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadpcx will enter into the image descriptor member colors the number of palette colors loaded. Loadpcx loads a 1-, 4-, 8-, or 24-bit PCX file. (When a 4-bit PCX file is loaded, it is expanded into an 8-bit image buffer.)

When an 8-bit PCX image without palette data is loaded, a grayscale palette is created and bit 0 of the image descriptor member imgtype is set to 1. When a 4-bit PCX image without palette data is loaded, a palette is created that corresponds to the default EGA colors.

Return value

See also

loadpcxpalette, savepcx

Example C/C++ | Example VB




loadpcxpalette

Function Prototypes
Visual Basic Declare Function loadpcxpalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadpcxpalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadpcxpalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadpcxpalette(LPCSTR filename, RGBQUAD *paltab);
Java int vic.loadpcxpalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette value

Description

The loadpcxpalette function loads the palette data from a PCX image file into paltab. Paltab must be large enough to hold all of the palette data:
BPPixel Planes Number of RGBQUAD elements Palette table size (bytes)
1 1 2 8
1 4 16 64
4 1 16 64
8 1 256 1024

When loading a PCX file, it is not necessary to explicitly call this function, because loadpcx automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadpng

            1    8   24 

Function Prototypes
Visual Basic Declare Function loadpng Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadpng Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadpng(ref string filename, ref imgdes resimg);
C/C++int loadpng(LPCSTR filename, imgdes *resimg);
Java int vic.vic32jni.loadpng(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description
The loadpng function loads image data from a PNG file into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The PNG file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadpng will enter into the image descriptor member colors the number of palette colors loaded. Loadpng loads all PNG images. 1-Bit PNG images are loaded into 1-bit image buffers and 2- to 8-bit PNG images are loaded into 8-bit image buffers. All grayscale PNG images are loaded into 8-bit buffers. All RGB images are loaded into 24-bit buffers. Alpha channel data is ignored. Supported pixel depth is 1- to 64-bit.

The transparent color(s) in a PNG file can be obtained using the pnginfo function. If a transparent color is present, pnginfo will return it in the structure element TransData. If a transparent color is not present, the isPresent element of TransData is set to FALSE.

The Victor loadpng function is based on the source code for the ZLIB compression library by Jean-loup Gailly and Mark Adler. PNG stands for Portable Network Graphics. This format is intended to be a patent-free replacement for GIF and uses the LZ77 compression rather than LZW.

Return value

See also

pnginfo, loadpngpalette, savepng, pnggeterror

Example C/C++ | Example VB




loadpngfrombuffer

            1    8   24 


Function Prototypes
Visual Basic Declare Function loadpngfrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadpngfrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.loadpngfrombuffer(ref byte buffer_firstelem, ref imgdes resimg);
C/C++int loadpngfrombuffer(UCHAR *buffer, imgdes *resimg);
Java int vic.vic32jni.loadpngfrombuffer(int buffer, imgdes resimg);
viclib64
C#int vicwin.loadpngfrombuffer( System.IntPtr buffer, ref imgdes resimg);

Function Arguments
buffer Buffer address
resimg Result image

Description
The loadpngfrombuffer function loads PNG file data from a memory buffer into an area in an image buffer defined by the image descriptor. Palette data is loaded into the buffer defined by the image descriptor member palette.

The PNG file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used to load the file.

Loadpngfrombuffer will enter into the image descriptor member colors the number of palette colors loaded. Loadpngfrombuffer loads all PNG images. 1-Bit PNG images are loaded into 1-bit image buffers and 2- to 8-bit PNG images are loaded into 8-bit image buffers. All grayscale PNG images are loaded into 8-bit buffers. All RGB images are loaded into 24-bit buffers. Alpha channel data is ignored. Supported pixel depth is 1- to 64-bit.

The Victor loadpngfrombuffer function is based on the source code for the ZLIB compression library by Jean-loup Gailly and Mark Adler. PNG stands for Portable Network Graphics. This format is intended to be a patent-free replacement for GIF. It uses the LZ77 compression rather than LZW.

Return value




See also
pnginfofrombuffer, loadpngpalettefrombuffer, savepngtobuffer, pnggeterror




loadpngpalette

Function Prototypes
Visual Basic Declare Function loadpngpalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadpngpalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadpngpalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadpngpalette(LPCSTR filename, RGBQUAD *paltab);
Java int vic.vic32jni.loadpngpalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette value


Description
The loadpngpalette function loads the palette data from a PNG image file into paltab.

Paltab must be an array of 256 RGBQUAD structures (1024 bytes) since a PNG image may contain up to 256 colors. When loading a PNG file, it is not necessary to call this function, because loadpng automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadpngpalettefrombuffer

Function Prototypes
Visual Basic Declare Function loadpngpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadpngpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadpngpalettefrombuffer(ref byte buffer_firstelem, ref RGBQUAD paltab);
C/C++int loadpngpalettefrombuffer(UCHAR *buffer, RGBQUAD *paltab);
Java int vic.vic32jni.loadpngpalettefrombuffer(int buffer, RGBQUAD[] paltab);
viclib64
C#int vicwin.loadpngpalettefrombuffer( System.IntPtr buffer, ref RGBQUAD paltab);

Function Arguments
buffer Buffer address
paltab Address of RGBQUAD buffer for palette values

Description
The loadpngpalettefrombuffer function loads the palette data from a memory buffer holding PNG file data into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes). A PNG image may contain up to 256 colors.

When loading a PNG file, it is not necessary to call this function, because loadpngfrombuffer automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value




loadtga

      8   24 

Function Prototypes
Visual Basic Declare Function loadtga Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadtga Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadtga(ref string filename, ref imgdes resimg);
C/C++int loadtga(LPCSTR filename, imgdes *resimg);
Java int vic.vic32jni.loadtga(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadtga function loads an image from a Targa True Color, color mapped, or grayscale image file into an area in an 8- or 24-bit image buffer. The image area is defined by the image descriptor. This function reads uncompressed or run length encoded 16-, 24-, or 32-bits per pixel true color images (types 2 and 10). 16- and 32-bit images are stored as 24-bit RGB images in the image buffer. Loadtga reads uncompressed (type 1 and 3) or run length encoded (type 9 and 11) 8-bit color mapped or grayscale images.

The TGA file header includes the image width and length. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller will be used.

Return value

See also

savetga, tgainfo

Example C/C++ | Example VB




loadtgapalette

Function Prototypes
Visual Basic Declare Function loadtgapalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadtgapalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadtgapalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadtgapalette(LPCSTR filename, RGBQUAD *paltab);
Java int vic.vic32jni.loadtgapalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette value

Description

The loadtgapalette function loads the palette data from a palette color TGA image file into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes), since a TGA image may contain up to 256 colors.

When loading a TGA file, it is not necessary to call this function, because loadtga automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadtgawithalpha

      8   24 


Function Prototypes
Visual Basic Declare Function loadtgawithalpha Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, alphaimage as imgdes) As Long
VB.NETDeclare Function vicwin.loadtgawithalpha Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByRef alphaimage As imgdes) As Integer
C#int vicwin.loadtgawithalpha(ref string afilename, ref imgdes resimg, ref imgdes alphaimage);
C/C++int loadtgawithalpha(LPCSTR afilename, imgdes *resimg, imgdes *alphaimage);
Java int vic.vic32jni.loadtgawithalpha(String filename, imgdes resimg, imgdes alphaimage);

Function Arguments
filename Filename to load
resimg Result image
alphaimage Result image to hold alpha channel

Description
The loadtgawithalpha function loads an image into an area in an image buffer defined by the image descriptor resimg and an alpha channel image into an area in an image buffer defined by the image descriptor alphaimage from a TIFF file. The alphaimage must describe an 8-bit image buffer to successfully receive the alpha channel data.

Except for being able to load an alpha channel, if present, loadtgawithalpha is identical to the loadtga function.

Return value

See also loadtga




loadtif

  1    8   16   24   32 

Function Prototypes
Visual Basic Declare Function loadtif Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadtif Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes) As Integer
C#int vicwin.loadtif(ref string filename, ref imgdes resimg);
C/C++int loadtif(LPCSTR filename, imgdes *resimg);
Java int vic.vic32jni.loadtif(String filename, imgdes resimg);

Function Arguments
filename Filename to load
resimg Result image

Description

The loadtif function loads an image from a bilevel, 8-, 16-, or 32-bit grayscale, palette color, CMYK, or RGB TIFF file into an area in an image buffer. The image area is defined by the image descriptor. Palette data, if present in the file, is loaded into the buffer defined by the image descriptor member palette. This function reads the formats shown in Table 7.

The TIFF file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used. Loadtif will enter into the image descriptor member colors the number of palette colors loaded. When a 4-bit TIFF file is it is expanded into an 8-bit image buffer and a 32-bit color file is placed into a 24-bit buffer. When a grayscale TIFF image is loaded, bit 0 of the image descriptor member imgtype is set to 1.
Table 7. TIFF File formats Read by loadtif
Image type Bits per pixel Compression
Bilevel 1 none
1 PackBits
1 LZW
1 Group 3
1 Group 4
Grayscale or palette color 4 through 8 none
4 PackBits
8 LZW
8 PackBits
16 (grayscale) none
RGB 24 none
24 LZW
32 none
CMYK 32 none
32 LZW


Return value

See also

tiffinfo, savetif

Example C/C++ | Example VB




loadtiffrombuffer

            1    8   16   24   32 


Function Prototypes
Visual Basic Declare Function loadtiffrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.loadtiffrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes) As Integer
C#int vicwin.loadtiffrombuffer(ref byte buffer_firstelem, ref imgdes resimg);
C/C++int loadtiffrombuffer(UCHAR *buffer, imgdes *resimg);
Java int vic.vic32jni.loadtiffrombuffer(int buffer, imgdes resimg);
viclib64
C#int vicwin.loadtiffrombuffer( System.IntPtr buffer, ref imgdes resimg);

Function Arguments
buffer Buffer address
resimg Result image

Description
The loadtiffrombuffer function loads TIFF file data from a memory buffer into an area in an image buffer. The image area is defined by the image descriptor. Palette data, if present in the file, is loaded into the buffer defined by the image descriptor member palette. For a list of all the formats read by this function refer to loadtif.

The TIFF file header includes the image dimensions. If these dimensions do not match the dimensions of the area defined by the image descriptor, the smaller of the two will be used. Loadtiffrombuffer will enter into the image descriptor member colors the number of palette colors loaded. When a 4-bit TIFF file is it is expanded into an 8-bit image buffer and a 32-bit color image is placed into a 24-bit buffer. When a grayscale TIFF image is loaded, bit 0 of the image descriptor member imgtype is set to 1.

Return value

See also loadtif, tiffinfofrombuffer, savetiftobuffer




loadtifpage

  1    8   16   24   32 

Function Prototypes
Visual Basic Declare Function loadtifpage Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, ByVal page As Long) As Long
VB.NETDeclare Function vicwin.loadtifpage Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByVal page As Integer) As Integer
C#int vicwin.loadtifpage(ref string filename, ref imgdes resimg, int page);
C/C++int loadtifpage(LPCSTR filename, imgdes *resimg, int page);
Java int vic.loadtifpage(String filename, imgdes resimg, int page);

Function Arguments
filename Filename to load
resimg Result image
page page number of page to load

Description

The loadtifpage function loads an image from a single or multipage TIFF file into an area in an image buffer. The image area is defined by the image descriptor. The page to load is specified by the tiffPage parameter.

Use loadtifpagebyindex to load an image based on its position in the file. Use loadtifpage to load an image based on the value contained in the page number tag.

Except for being able to load a specific image from a multipage TIFF file, loadtifpage is identical to the loadtif function.

To determine the number of pages and their page numbers in a multipage TIFF file, use the tiffgetpageinfo function.

Return value

See also

loadtif, tiffgetpageinfo, tiffinfopage

Example C/C++




loadtifpagebyindex

            1    8   16   24   32 

Function Prototypes
Visual Basic Declare Function loadtifpagebyindex Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, ByVal pageIndex As Long) As Long
VB.NETDeclare Function vicwin.loadtifpagebyindex Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByVal pageIndex As Integer) As Integer
C#int vicwin.loadtifpagebyindex(ref string filename, ref imgdes resimg, int pageIndex);
C/C++int loadtifpagebyindex(LPCSTR filename, imgdes *resimg, int pageIndex);
Java int vic.vic32jni.loadtifpagebyindex(String filename, imgdes resimg, int pageIndex);

Function Arguments
filename Filename to load
resimg Result image
pageIndex Index of target page to load (0 based)

Description
The loadtifpagebyindex function loads an image from a single or multipage TIFF file into an area in an image buffer. The image area is defined by the image descriptor. The page to load is specified by the pageIndex parameter, which is zero-based.

Use loadtifpagebyindex to load an image based on its position in the file. Use loadtifpage to load an image based on its page number tag.

Except for being able to load a specific image from a multipage TIFF file, loadtifpagebyindex is identical to the loadtif function.

To determine the number of pages and their page numbers in a multipage TIFF file, use the tiffgetpageinfo function.

Return value

See also loadtif, loadtifpage, tiffgetpageinfo, tiffinfopagebyindex




loadtifpagebyindexfrombuffer

            1    8   16   24   32 

Function Prototypes
Visual Basic Declare Function loadtifpagebyindexfrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, resimg As imgdes, ByVal pageIndex As Long) As Long
VB.NET Declare Function vicwin.loadtifpagebyindexfrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, resimg As imgdes, ByVal pageIndex As Integer) As Integer
C#int vicwin.loadtifpagebyindexfrombuffer(ref byte buffer_firstelem, ref imgdes resimg, int pageIndex);
C/C++int loadtifpagebyindexfrombuffer(UCHAR *buffer, imgdes *resimg, int pageIndex);
Java int vic.vic32jni.loadtifpagebyindexfrombuffer(int buffer, imgdes resimg, int pageIndex);
viclib64
C#int vicwin.loadtifpagebyindexfrombuffer( System.IntPtr buffer, ref imgdes resimg, int pageIndex);

Function Arguments
buffer Buffer address
resimg Result image
pageIndex Index of target page to load (0 based)

Description
The loadtifpagebyindexfrombuffer function loads an image from a single or multipage TIFF file into an area in an image buffer. The image area is defined by the image descriptor. The page to load is specified by the pageIndex parameter, which is zero-based.

Use loadtifpagebyindexfrombuffer to load an image based on its position in the file.

Except for being able to load a specific image from a multipage TIFF file, loadtifpagebyindexfrombuffer is identical to the loadtif function.

To determine the number of pages and their page numbers in a multipage TIFF file, use the tiffgetpageinfofrombuffer function.

Return value

See also loadtif, loadtifpagebyindex, tiffgetpageinfo, tiffinfopagebyindex




loadtifpagebyindexfrombufferwithalpha

            1    8   16   24   32 

Function Prototypes
Visual Basic Declare Function loadtifpagebyindexfrombufferwithalpha Lib "vic32.dll" (ByVal buffer As Long, ByRef resimg As imgdes, ByVal pageIndex As Long, ByRef alphaimage as imgdes) As Long
VB.NET Declare Function vicwin.loadtifpagebyindexfrombufferwithalpha Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef resimg As imgdes, ByVal pageIndex As Integer, ByRef alphaimage as imgdes) As Integer
C#int vicwin.loadtifpagebyindexfrombufferwithalpha(ref byte buffer_firstelem, ref imgdes resimg, int pageIndex, ref imgdes alphaimage);
C/C++int loadtifpagebyindexfrombufferwithalpha(UCHAR *buffer, imgdes *resimg, int pageIndex, imgdes *alphaimage);
Java int vic.vic32jni.loadtifpagebyindexfrombufferwithalpha(int buffer, imgdes resimg, int pageIndex, imgdes alphaimage);
viclib64
C#int vicwin.loadtifpagebyindexfrombufferwithalpha( System.IntPtr buffer, ref imgdes resimg, int pageIndex, ref imgdes alphaimage);

Function Arguments
buffer Buffer address
resimg Result image
pageIndex Index of target page to load (0 based)
alphaimage 8-bit Image to receive the alpha channel

Description
The loadtifpagebyindexfrombufferwithalpha function loads an image into an area in an image buffer defined by the image descriptor resimg and an alpha channel image into an area in an image buffer defined by the image descriptor alphaimage from a TIFF file. The alphaimage must describe an 8-bit image buffer to successfully receive the alpha channel data.

Except for being able to load an alpha channel, if present, loadtifpagebyindexfrombufferwithalpha is identical to the loadtifpagebyindexfrombuffer function.

Return value

See also loadtif, loadtifpagebyindex, tiffgetpageinfo, tiffinfopagebyindex




loadtifpalette

Function Prototypes
Visual Basic Declare Function loadtifpalette Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadtifpalette Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadtifpalette(ref string filename, ref RGBQUAD paltab);
C/C++int loadtifpalette(LPCSTR filename, RGBQUAD *paltab);
Java int vic.vic32jni.loadtifpalette(String filename, RGBQUAD[] paltab);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values

Description

The loadtifpalette function loads the palette data from a palette color TIFF image file into paltab. Paltab must be an array of 256 RGBQUAD structures (1024 bytes), since a TIFF image may contain up to 256 colors.

When loading a TIFF file, it is not necessary to call this function, because loadtif automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadtifpalettefrombuffer

Function Prototypes
Visual Basic Declare Function loadtifpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Long, paltab As RGBQUAD) As Long
VB.NETDeclare Function vicwin.loadtifpalettefrombuffer Lib "VIC32.DLL" (ByVal buffer As Integer, ByRef paltab As RGBQUAD) As Integer
C#int vicwin.loadtifpalettefrombuffer(ref byte buffer_firstelem, ref RGBQUAD paltab);
C/C++int loadtifpalettefrombuffer(UCHAR *buffer, RGBQUAD *paltab);
Java int vic.vic32jni.loadtifpalettefrombuffer(int buffaddr, RGBQUAD[] paltab);
viclib64
C#int vicwin.loadtifpalettefrombuffer( System.IntPtr buffer, ref RGBQUAD paltab);

Function Arguments
buffer Buffer address
paltab Address of RGBQUAD buffer for palette values

Description
The loadtifpalettefrombuffer function loads the palette data from a memory buffer holding TIFF file data into paltab. Paltab must be an array of 256 RGBQUAD structures (1024 bytes), since a TIFF image may contain up to 256 colors.

When loading a TIFF file, it is not necessary to call this function, because loadtiffrombuffer automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value






loadtifpalettepage

Function Prototypes
Visual Basic Declare Function loadtifpalettepage Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD, ByVal page As Long) As Long
VB.NETDeclare Function vicwin.loadtifpalettepage Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD, ByVal page As Integer) As Integer
C#int vicwin.loadtifpalettepage(ref string filename, ref RGBQUAD paltab, int page);
C/C++int loadtifpalettepage(LPCSTR filename, RGBQUAD *paltab, int page);
Java int vic.vic32jni.loadtifpalettepage(String filename, RGBQUAD[] paltab, int page);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values
page Page number from which to load the palette

Description

The loadtifpalettepage function loads the palette data from a specified page in a palette color TIFF image file into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes), since a TIFF image may contain up to 256 colors. When loading a TIFF image, it is not necessary to call this function, because loadtifpage automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

Example C/C++




loadtifpalettepagebyindex

Function Prototypes
Visual Basic Declare Function loadtifpalettepagebyindex Lib "VIC32.DLL" (ByVal filename As String, paltab As RGBQUAD, ByVal pageIndex As Long) As Long
VB.NETDeclare Function vicwin.loadtifpalettepagebyindex Lib "VIC32.DLL" (ByVal filename As String, ByRef paltab As RGBQUAD, ByVal pageIndex As Integer) As Integer
C#int vicwin.loadtifpalettepagebyindex(ref string filename, ref RGBQUAD paltab, int pageIndex);
C/C++int loadtifpalettepagebyindex(LPCSTR filename, RGBQUAD *paltab, int pageIndex);
Java int vic.vic32jni.loadtifpalettepagebyindex(String filename, RGBQUAD[] paltab, int pageIndex);

Function Arguments
filename Filename to load
paltab Address of RGBQUAD buffer for palette values
pageIndex Index of page from which to load the palette (0 based)

Description
The loadtifpalettepagebyindex function loads the palette data from a specified page in a palette color TIFF image file into paltable. Paltable must be an array of 256 RGBQUAD structures (1024 bytes), since a TIFF image may contain up to 256 colors.

Use loadtifpalettepagebyindex to load an image palette based on its position in the file. Use loadtifpalettepage to load an image palette based on its page number tag.

When loading a TIFF image, it is not necessary to call this function, because loadtifpagebyindex automatically loads any palette data available if the image descriptor member palette is nonzero.

Return value

See also
loadtifpalette, loadtifpalettepage




loadtifwithalpha

            1    8   16   24   32 

Function Prototypes
Visual Basic Declare Function loadtifwithalpha Lib "VIC32.DLL" (ByVal filename As String, resimg As imgdes, alphaimage as imgdes) As Long
VB.NETDeclare Function vicwin.loadtifwithalpha Lib "VIC32.DLL" (ByVal filename As String, ByRef resimg As imgdes, ByRef alphaimage As imgdes) As Integer
C#int vicwin.loadtifwithalpha(ref string afilename, ref imgdes resimg, ref imgdes alphaimage);
C/C++int loadtifwithalpha(LPCSTR afilename, imgdes *resimg, imgdes *alphaimage);
Java int vic.vic32jni.loadtifwithalpha(String filename, imgdes resimg, imgdes alphaimage);

Function Arguments
filename Filename to load
resimg Result image
alphaimage Result image to hold alpha channel

Description
The loadtifwithalpha function loads an image into an area in an image buffer defined by the image descriptor resimg and an alpha channel image into an area in an image buffer defined by the image descriptor alphaimage from a TIFF file. The alphaimage must describe an 8-bit image buffer to successfully receive the alpha channel data.

Except for being able to load an alpha channel, if present, loadtifwithalpha is identical to the loadtif function.

Return value

See also loadtif




makepalette

      8     

Function Prototypes
Visual BasicDeclare Function makepalette Lib "VIC32.DLL" (resimg As imgdes, ByRef ppa_firstelement As PALETTEPOINT, ByVal numelem As Long, ) As Long
VB.NETDeclare Function vicwin.makepalette Lib "VIC32.DLL" (ByRef resimg As imgdes, ByRef ppa_firstelement As PALETTEPOINT, ByVal numelem As Integer) As Integer
C#int vicwin.makepalette(ref imgdes resimg, ref PALETTEPOINT ppa_firstelem, int numelem);
C/C++int makepalette(imgdes *resimg, PALETTEPOINT * ppa, int numelem);
Javaint vic.vic32jni.makepalette(imgdes resimg, PALETTEPOINT [] ppa, int numelem);
viclib64
C#int vicwin.makepalette(ref imgdes resimg, PALETTEPOINT [] ppa, int numelem);

Function Arguments
resimg Result image
ppaVariable array of type PALETTEPOINT defining the palette entries
numelemNumber of elements of the palette point array (2 - 256)

Description

The makepalette function creates a color palette for an 8-bit image. Palette index values and the corresponding red, green, and blue intensities are defined in an array of PALETTEPOINT data structures. Up to 256 palette points can be defined in the array.

If there are 256 elements each is treated as an explicitly defined palette entry. If there are fewer elements the makepalette function will create a smooth gradation of color between the explicitly defined entries.

For example, to create a 256-level grayscale palette define two elements to the palette point array. Set the first palette entry with index zero and values of zero and the next palette entry with index and values set to 255. Set numelem to two. The makepalette function will create all the entries in between for a complete 256-level grayscale palette.

The PALETTEPOINT structure elements are defined as follows:
indexpalette index
redRed value
greenGreen value
blueBlue value

Return value




matchcolorimage

      8   24 

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

Function Arguments
srcimg Source image
resimg Result image

Description

The matchcolorimage function assigns the pixel values of the result image based on the colors and palette of the 8- or 24-bit source image to match the palette of the 8-bit result image. The source and result image areas are defined by the image descriptors.

This function can be used several ways:

Matchcolorimage uses an octree method to assign palette colors to pixels. Diffusion scatter is used to improve the quality of the result image. (See matchcolorimageex for additional information.)

Return value

Example

See matchcolorimageex




matchcolorimageex

      8   24 

Function Prototypes
Visual Basic Declare Function matchcolorimageex Lib "VIC32.DLL" (srcimg As imgdes, resimg As imgdes, ByVal mode As Long) As Long
VB.NETDeclare Function vicwin.matchcolorimageex Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef resimg As imgdes, ByVal mode As Integer) As Integer
C#int vicwin.matchcolorimageex(ref imgdes srcimg, ref imgdes resimg, int mode);
C/C++int matchcolorimageex(imgdes *srcimg, imgdes *resimg, int mode);
Java int vic.vic32jni.matchcolorimageex(imgdes srcimg, imgdes resimg, int mode);

Function Arguments
srcimg Source image
resimg Result image
mode Color matching mode to use

Description

The matchcolorimageex function assigns the pixel values of the result image based on the colors and palette of the 8- or 24-bit source image to match the palette of the 8-bit result image. The source and result image areas are defined by the image descriptors. This function can be used several ways:

The colmatchmode parameter determines the mode to be used for the assignment of palette colors to pixels:
Table 8. Matchcolorimageex Options
Mode Speed Image quality Color matching method Use diffusion?
CR_OCTREENODIFF fastest good Octree no
CR_OCTREEDIFF1 faster better Octree yes
CR_TSDNODIFF faster better TSD2 no
CR_TSDDIFF fast best TSD2 yes



In general, there is a trade-off of speed for quality, mode CR_TSDDIFF gives the best color matching but takes the longest time.

Matchcolorimageex uses either an octree or a through-space-distance (TSD) method to map a pixel to a palette color. The octree method uses an octree to select the palette color, while the TSD method calculates the minimum distance in 3-D RGB space to select the palette color. The TSD method provides a more accurate color match but also takes a little longer.

Matchcolorimageex can also use error diffusion. Error diffusion creates a higher quality image by distributing a pixel's error to its nearest neighbors. Error diffusion should not be used if an image will be sharpened or processed with convolution.

Return value

See also

matchcolorimage

Example C/C++ Example 1 | Example C/C++ Example 2




matrixconv

      8   24 

Function Prototypes
Visual Basic Declare Function matrixconv Lib "VIC32.DLL" ( kernel_firstelem As Byte, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.matrixconv Lib "VIC32.DLL" (ByRef kernel_firstelem As Byte, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.matrixconv(ref byte kernel_firstelem, ref imgdes srcimg, ref imgdes resimg);
C/C++int matrixconv(UCHAR * kernel, imgdes *srcimg, imgdes *resimg);
Java int vic.vic32jni.matrixconv(byte[] kernel, imgdes srcimg, imgdes resimg);
viclib64
C#int vicwin.matrixconv(byte[] kernel, ref imgdes srcimg, ref imgdes resimg);

Function Arguments
kernel Convolution matrix
srcimg Source image
resimg Result image

Description

The matrixconv function transforms an image area with a 3 x 3 convolution matrix. The source and result image areas are defined by the corresponding image descriptors.

For a source pixel at position (x,y), the corresponding result pixel will have a brightness value calculated as follows:

The function argument kernel is a 10-member array whose elements can range from -127 to 127. The first 9 members are the numerators and the 10th array member is the divisor. For example, to duplicate the blur function you would use the matrix:
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9

by defining the array and calling the function:

   char kernel[] = {1,1,1,1,1,1,1,1,1,9 };
   matrixconv(kernel, &srcimg, &resimg);

Return value

Example C/C++ | Example VB




matrixconvex

                8   24 

Function Prototypes
Visual Basic Declare Function matrixconvex Lib "VIC32.DLL" (ByVal ksize As Long, ByRef kernel_firstelem As byte, ByVal divsr As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.matrixconvex Lib "VIC32.DLL" (ByVal ksize As Integer, ByRef kernel_firstelem As Byte, ByVal divsr As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.matrixconvex(int ksize, ref byte kernel_firstelem, int divsr, ref imgdes srcimg, ref imgdes resimg);
C/C++int matrixconvex(int ksize, UCHAR * kernel, int divsr, imgdes *srcimg, imgdes *resimg);
Java int vic.vic32jni.matrixconvex(int ksize, byte[] kernel, int divsr, imgdes srcimg, imgdes resimg);
viclib64
C#int vicwin.matrixconvex(int ksize, byte [] kernel, int divsr, ref imgdes srcimg, ref imgdes resimg);

Function Arguments
ksize Width of local area (3 - 63)
kernel Convolution matrix
divsr Divisor
srcimg Source image
resimg Result image

Description
The matrixconvex function transforms an image area with a ksize x ksize convolution matrix. The source and result image areas are defined by the corresponding image descriptors.

For more information about matrix convolution, see the matrixconv function.

The function argument kernel is a ksize x ksize array whose elements can range from -127 to 127. Ksize must be in the range 3 to 63. This function differs from matrixconv in that matrixconvex allows using a ksize greater than 3 and the divisor value is not the last element of the kernel array.

As an example, to duplicate the blur function use the kernel:
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9

by defining the array:

   char kernel[9] = {1,1,1,1,1,1,1,1,1};

and calling the function:

   matrixconvex(3, kernel, 9, &srcimg, &resimg);

Return value

See also  
matrixconv

Example C/C++ | Example VB




medianfilter

                8   24 

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

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

Description
The medianfilter function removes random noise from an image area by replacing a central pixel value with the median of its local area. The local area size is defined as ksize x ksize pixels.

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

The medianfilter function is identical to the removenoise function if ksize equals 3.

Return value

See also removenoise

Example C/C++ | Example VB




mirrorimage

  1    8   24 

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

Function Arguments
srcimg Source image
resimg Result image

Description

The mirrorimage function reverses an image area left to right to create a mirror image. The source and result image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




multiply

      8   24 

Function Prototypes
Visual Basic Declare Function multiply Lib "VIC32.DLL" (ByVal multiplier As Long, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.multiply Lib "VIC32.DLL" (ByVal multiplier As Integer, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.multiply(int multiplier, ref imgdes srcimg, ref imgdes resimg);
C/C++int multiply(int multiplier, imgdes *srcimg, imgdes *resimg);
Java int vic.vic32jni.multiply(int multiplier, imgdes srcimg, imgdes resimg);

Function Arguments
multiplier Multiplier (0 - 255)
srcimg Source image
resimg Result image

Description

The multiply function increases the brightness of each pixel in the source image area by multiplying the level value by a factor and placing the product in the result image area.

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

Return value

Example C/C++ | Example VB




multiplyex

      8   16   24   32 

Function Prototypes
Visual Basic Declare Function multiplyex Lib "VIC32.DLL" (ByVal multiplier As double, srcimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.multiplyex Lib "vic32.dll" (ByVal multiplier As Double, ByRef srcimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.multiplyex(double multiplier, ref imgdes srcimg, ref imgdes resimg);
C/C++int multiplyex(double multiplier, imgdes *srcimg, imgdes *resimg);
Java int vic.vic32jni.multiplyex(double multiplier, imgdes srcimg, imgdes resimg);

Function Arguments
multiplier Multiplier
srcimg Source image
resimg Result image

Description

The multiplyex function increases the brightness of each pixel in the source image area by multiplying the level value by a factor and placing the product in the result image area.

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

Return value

Example C/C++ | Example VB




multiplyimage

      8   24 

Function Prototypes
Visual Basic Declare Function multiplyimage Lib "VIC32.DLL" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.multiplyimage Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.multiplyimage(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int multiplyimage(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Java int vic.vic32jni.multiplyimage(imgdes srcimg, imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The multiplyimage function multiplies the value of each pixel in the source image area with the value of the corresponding pixel in the operator image, scales the value, and places the result in the result image area.

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

Return value

Example VB




multiplynegative

      8   24 

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

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The multiplynegative function combines the brightness level of each pixel in the source image area with the brightness level of the corresponding pixel in the operator image area to create an interesting visual effect. 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




negative

  1    8   24 

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

Function Arguments
srcimg Source image
resimg Result image

Description

The negative function modifies the pixels in an image area to create an effect similar to a photographic negative.

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

Return value

Example C/C++ | Example VB




orimage

  1    8   24 

Function Prototypes
Visual Basic Declare Function orimage Lib "VIC32.DLL" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long
VB.NETDeclare Function vicwin.orimage Lib "VIC32.DLL" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Integer
C#int vicwin.orimage(ref imgdes srcimg, ref imgdes oprimg, ref imgdes resimg);
C/C++int orimage(imgdes *srcimg, imgdes *oprimg, imgdes *resimg);
Java int vic.vic32jni.orimage(imgdes srcimg, imgdes oprimg, imgdes resimg);

Function Arguments
srcimg Source image
oprimg Operator image
resimg Result image

Description

The orimage function ORs the value of each pixel in the source image area with the value of the corresponding pixel in the operator image and places the result in the result image area.

The image areas are defined by the corresponding image descriptors.

Return value

Example C/C++ | Example VB




outline

      8   24 

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

Function Arguments
srcimg Source image
resimg Result image

Description

The outline function creates an outline within 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 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

Example C/C++ | Example VB




outlineongray

      8   24 

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

Function Arguments
srcimg Source image
resimg Result image

Description

The outlineongray function creates an outline within 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 adjacent pixels. The outline is placed on a uniform gray area. This filter is often referred to as a "Laplacian" filter. 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


next section