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);

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);

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);

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);

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(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);

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);

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);

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);

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);

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);

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);

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);

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);

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);