' VICDEF32.TXT -- Visual Basic 32-bit version of VICDEFS.H, prototypes, definitions, and error codes for ' Victor Image Processing Library for Windows '---------------------------------------------------------- ' Necessary data structures from Windows.h Type BITMAPINFOHEADER biSize As Long biWidth As Long biHeight As Long biPlanes As Integer biBitCount As Integer biCompression As Long biSizeImage As Long biXPelsPerMeter As Long biYPelsPerMeter As Long biClrUsed As Long biClrImportant As Long End Type Type RGBQUAD rgbBlue As Byte rgbGreen As Byte rgbRed As Byte rgbReserved As Byte End Type Type RECT left As Long top As Long right As Long bottom As Long End Type '---------------------------------------------------------- ' Image descriptor Type imgdes ibuff As Long stx As Long sty As Long endx As Long endy As Long buffwidth As Long palette As Long colors As Long imgtype As Long bmh As Long hBitmap As Long End Type Type TiffData ByteOrder As Long width As Long length As Long BitsPSample As Long comp As Long SamplesPPixel As Long PhotoInt As Long PlanarCfg As Long vbitcount As Long End Type Type TiffDataEx ByteOrder As Long width As Long length As Long BitsPSample As Long comp As Long SamplesPPixel As Long PhotoInt As Long PlanarCfg As Long vbitcount As Long xres As Long yres As Long resunit As Long fillorder As Long rowsperstrip As Long orientation As Long IFDofs As Long page As Long End Type Type PcxData PCXvers As Long width As Long length As Long BPPixel As Long Nplanes As Long BytesPerLine As Long PalInt As Long vbitcount As Long End Type Type GifData width As Long length As Long BitsColRes As Long BitsPPixel As Long BckCol As Long Laceflag As Long codesize As Long GIFvers As Long vbitcount As Long End Type Type GifGlobalSaveData scrwidth As Long scrlength As Long hasColorMap As Long bckColor As Long loop As Long End Type Type GifGlobalData savedata As GifGlobalSaveData BitsPPixel As Long colorRes As Long pixelAspectRatio As Long commentOffset As Long colors As Long colorMapOffset As Long End Type Type GifFrameSaveData startx As Long starty As Long hasColorMap As Long delay As Long ' 100ths of a second to display frame transColor As Long ' Transparent color index, -1 => none removeBy As Long ' How graphic is to be treated after display waitForUserInput As Long 'If true, expect user input End Type Type GifFrameData savedata As GifFrameSaveData vbitcount As Long width As Long length As Long frame As Long interlace As Long codesize As Long colors As Long colorMapOffset As Long rasterDataOffset As Long End Type Type PNGSIGBITS sb_long As Long End Type 'Transparency or background color data Type PNGTRANSINFO isPresent As Long data(5) As Byte byteCount As Long End Type ' PNG file format info structure definition (used by pnginfo) Type PngData width As Long length As Long bitDepth As Long vbitcount As Long colorType As Long interlaced As Long imageId As Long channels As Long pixelDepth As Long rowBytes As Long transData As PNGTRANSINFO backData As PNGTRANSINFO igamma As Long physXres As Long physYres As Long physUnits As Long sigBit As PNGSIGBITS offsXoffset As Long offsYoffset As Long offsUnits As Long End Type Type TgaData IDfieldchars As Long width As Long length As Long ColorMapType As Long ImageType As Long ColorMapEntryBits As Long Xorigin As Long Yorigin As Long BPerPix As Long ABPerPix As Long ScreenOrigin As Long Interleave As Long vbitcount As Long End Type Type JpegData ftype As Long width As Long length As Long comps As Long precision As Long sampfac0 As Long sampfac1 As Long sampfac2 As Long sampfac3 As Long vbitcount As Long End Type Global Const THUMB_CODE_JPEG = 16 '0x10 JPEG-coded Thumbnail Global Const THUMB_CODE_PAL = 17 '0x11 Palette-coded Thumbnail Global Const THUMB_CODE_RGB = 19 '0x13 RGB-coded Thumbnail Type JPEG_THUMB_DATA hasThumbNail As Long width As Byte length As Byte bitcount As Byte coding As Byte End Type Type JpegDataEx ftype As Long width As Long length As Long comps As Long precision As Long sampfac0 As Long sampfac1 As Long sampfac2 As Long sampfac3 As Long vbitcount As Long xres As Long yres As Long resunit As Long thumbNail As JPEG_THUMB_DATA End Type Type HSVTRIPLE hue As Byte saturation As Byte value As Byte End Type ' Victor version struct Type VIC_VERSION_INFO version As Integer flags As Integer End Type ' OS version info struct Type MYVERSIONINFO version As Long platformID As Long End Type Type TW_STR32 items(33) As Byte ' Actually creates a 34-byte array End Type ' Data for Twain ONEVALUE-type container Type TWAIN_ONEVALUE val As Integer ' the value End Type ' Data for Twain ENUM-type container Type TWAIN_ENUMTYPE tarray(17) As Integer nelems As Integer ' Number of valid elements in array() currentIndex As Integer ' Index to the value that is currently in effect defaultIndex As Integer ' Power-up value End Type ' Data for Twain RANGE-type container Type TWAIN_RANGE min As Integer ' Starting value in the range max As Integer ' Final value in the range stepSize As Integer ' Increment from min to max currentVal As Integer ' The value that is currently in effect defaultVal As Integer ' Power-up value End Type ' Capability get/set struct Type TWAIN_CAP_DATA conType As Integer ' Container type, TWON_ONEVALUE, TWON_ENUMERATION, or TWON_RANGE, oneValue As TWAIN_ONEVALUE ' Data if using ONEVALUE-type container enumType As TWAIN_ENUMTYPE ' Data if using ENUM-type container range As TWAIN_RANGE ' Data if using RANGE-type container End Type ' ........................... vicstats.dll ..................... Type COORD_VAL val As Long x As Long y As Long End Type Declare Function calcavglevelfloat Lib "vicstats.dll" (ByRef srcimg As imgdes, ByRef redavg As Double, ByRef grnavg As Double, ByRef bluavg As Double) As Long Public Declare Function correlationcoef Lib "vicstats.dll" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef Coef As Double) As Long Declare Function correlationcoefRGB Lib "vicstats.dll" (srcimg As imgdes, oprimg As imgdes, ByRef redCoef As Double, ByRef grnCoef As Double, ByRef bluCoef As Double) As Long Public Declare Function correlateimages Lib "vicstats.dll" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef resimg As imgdes) As Long Public Declare Function sortpixelsbyval Lib "vicstats.dll" (ByRef srcimg As imgdes, ByRef first_elem As COORD_VAL, ByVal nelem As Long) As Long ' .......................................................... ' ........................... vicfx.dll ..................... Declare Function addtexture Lib "vicfx.dll" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long Declare Function bleach Lib "vicfx.dll" (ByRef srcimg As imgdes, ByRef oprimg As imgdes, ByRef desimg As imgdes) As Long Declare Function darker Lib "vicfx" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long Declare Function difference Lib "vicfx.dll" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long Declare Function differenceabs Lib "vicfx.dll" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long Declare Function divideimage Lib "vicfx.dll" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long Declare Function isolate Lib "vic32.dll" Alias "addimage" (srcimg As imgdes, masimg As imgdes, desimg As imgdes) As Long Declare Function lighter Lib "vicfx.dll" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long Declare Function multiplynegative Lib "vicfx.dll" (srcimg As imgdes, oprimg As imgdes, desimg As imgdes) As Long ' .......................................................... Type minmax min As Long max As Long res1 As Long res2 As Long End Type 'Function declarations for Victor Image Processing Library Declare Function addimage Lib "vic32.dll" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function allocDIB Lib "vic32.dll" (image As imgdes, ByVal wid As Long, ByVal leng As Long, ByVal BPPixel As Long) As Long Declare Function allocimage Lib "vic32.dll" (image As imgdes, ByVal wid As Long, ByVal leng As Long, ByVal BPPixel As Long) As Long Declare Function andimage Lib "vic32.dll" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function blur Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function blurthresh Lib "vic32.dll" (ByVal thres As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function bmpinfo Lib "vic32.dll" (ByVal filename As String, bdat As BITMAPINFOHEADER) As Long Declare Function bmpinfofrombuffer Lib "vic32.dll" (ByVal buff As Long, ByRef bminfo As BITMAPINFOHEADER) As Long Declare Function bmpinfofrombytearray Lib "vic32.dll" Alias "bmpinfofrombuffer" (ByRef firstelement As Byte, ByRef bminfo As BITMAPINFOHEADER) As Long Declare Function brightenmidrange Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function calcavglevel Lib "vic32.dll" (srcimg As imgdes, redavg As Long, grnavg As Long, bluavg As Long) As Long Declare Function calchisto Lib "vic32.dll" (srcimg As imgdes, redtab As Long, grntab As Long, blutab As Long) As Long Declare Function calchistorgb Lib "vic32.dll" (srcimg As imgdes, redtab As Long, grntab As Long, blutab As Long, ByVal mode As Long) As Long Declare Function calcminmax Lib "vic32.dll" (srcimg As imgdes, redMinmax As minmax, grnMinmax As minmax, bluMinmax As minmax) As Long Declare Function changebright Lib "vic32.dll" (ByVal amt As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function clienttoimage Lib "vic32.dll" (ByVal hwnd As Long, resimg As imgdes) As Long Declare Function colordither Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes, ByVal colormode As Long) As Long Declare Function colorscatter Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes, ByVal colormode As Long) As Long Declare Function colortogray Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function convert1bitto8bit Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function convert1bitto8bitsmooth Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function convert8bitto1bit Lib "vic32.dll" (ByVal mode As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function convertgray8to16 Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function convertgray16to8 Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function convertpaltorgb Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function convertrgbtopal Lib "vic32.dll" (ByVal palcolors As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function convertrgbtopalex Lib "vic32.dll" (ByVal palcolors As Long, srcimg As imgdes, resimg As imgdes, ByVal mode As Long) As Long Declare Function copyimage Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function copyimagebits Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Sub copyimagepalette Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) Declare Sub copyimgdes Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) Declare Function cover Lib "vic32.dll" (ByVal thres As Long, srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function coverclear Lib "vic32.dll" (ByVal transColor As Long, srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function ddbtoimage Lib "vic32.dll" (ByVal hBitmap As Long, ByVal hPal As Long, resimg As imgdes) As Long Declare Function defaultpalette Lib "vic32.dll" (image As imgdes) As Long Declare Function dibsecttoimage Lib "vic32.dll" (ByVal hBitmap As Long, image As imgdes) As Long Declare Function dibtobitmap Lib "vic32.dll" (ByVal hdc As Long, ByVal dib As Long, hBitmap As Long) As Long Declare Function dibtoimage Lib "vic32.dll" (ByVal dib As Long, resimg As imgdes) As Long Declare Function dilate Lib "vic32.dll" (ByVal amount As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function divide Lib "vic32.dll" (ByVal divsr As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function drawhisto Lib "vic32.dll" (ByVal hdc As Long, RECT As RECT, ByVal BPPixel As Long, redtab As Long, grntab As Long, blutab As Long) As Long Declare Function erode Lib "vic32.dll" (ByVal amount As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function exchangelevel Lib "vic32.dll" (ByVal min As Long, ByVal max As Long, ByVal newval As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function expandcontrast Lib "vic32.dll" (ByVal min As Long, ByVal max As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function flipimage Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Sub freeimage Lib "vic32.dll" (image As imgdes) Declare Function gammabrighten Lib "vic32.dll" (ByVal amt As Double, srcimg As imgdes, resimg As imgdes) As Long Declare Function getgifcomment Lib "vic32.dll" (ByVal filename As String, ByVal buff As String, ByVal maxbuff As Long) As Long Declare Function getpixelcolor Lib "vic32.dll" (image As imgdes, ByVal xcoord As Long, ByVal ycoord As Long) As Long Declare Function getpngcomment Lib "vic32.dll" (ByVal filename As String, ByVal commenttype As String, ByVal buffer As String, ByVal buffermax As Long) As Long Declare Function gifframecount Lib "vic32.dll" (ByVal filename As String, ByRef totalFrames As Long) As Long Declare Function gifframecountfrombuffer Lib "vic32.dll" (ByVal buff As Long, ByRef totalFrames As Long) As Long Declare Function gifframecountfrombytearray Lib "vic32.dll" Alias "gifframecountfrombuffer" (ByRef firstelement As Byte, ByRef totalFrames As Long) As Long Declare Function gifinfo Lib "vic32.dll" (ByVal filename As String, gdat As GifData) As Long Declare Function gifinfoallframes Lib "vic32.dll" (ByVal filename As String, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameElem As Long) As Long Declare Function gifinfoallframesfrombuffer Lib "vic32.dll" (ByVal buff As Long, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameElem As Long) As Long Declare Function gifinfoallframesfrombytearray Lib "vic32.dll" Alias "gifinfoallframesfrombuffer" (ByRef firstelement As Byte, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameElem As Long) As Long Declare Function gifinfoframe Lib "vic32.dll" (ByVal filename As String, ginfo As GifData, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameTarget As Long) As Long Declare Function gifinfoframefrombuffer Lib "vic32.dll" (ByVal buff As Long, ginfo As GifData, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameTarget As Long) As Long Declare Function gifinfoframefrombytearray Lib "vic32.dll" Alias "gifinfoframefrombuffer" (ByRef firstelement As Byte, ginfo As GifData, gdata As GifGlobalData, fdata As GifFrameData, ByVal frameTarget As Long) As Long Declare Function gifinfofrombuffer Lib "vic32.dll" (ByVal buff As Long, gdat As GifData) As Long Declare Function gifinfofrombytearray Lib "vic32.dll" Alias "gifinfofrombuffer" (ByRef firstelement As Byte, gdat As GifData) As Long Declare Function histobrighten Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function histoequalize Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Sub hsv2rgb Lib "vic32.dll" (ByRef hsvtab As HSVTRIPLE, ByRef rgbtab As RGBQUAD, ByVal colors As Long) Declare Sub imageareatorect Lib "vic32.dll" (image As imgdes, RECT As RECT) Declare Function imagetodib Lib "vic32.dll" (srcimg As imgdes, dib As Long) As Long Declare Function isgrayscaleimage Lib "vic32.dll" (image As imgdes) As Long Declare Function jpeggeterror Lib "vic32.dll" () As Long Declare Function jpeginfo Lib "vic32.dll" (ByVal filename As String, jdat As JpegData) As Long Declare Function jpeginfoex Lib "vic32.dll" (ByVal filename As String, jdat As JpegDataEx) As Long Declare Function jpeginfofrombuffer Lib "vic32.dll" (ByVal buffaddr As Long, jdat As JpegData) As Long Declare Function jpeginfofrombytearray Lib "vic32.dll" Alias "jpeginfofrombuffer " (ByRef firstelement As Byte, jdat As JpegData) As Long Declare Function jpeginfofrombufferex Lib "vic32.dll" (ByVal buffaddr As Long, jdat As JpegDataEx) As Long Declare Function jpeginfofrombytearrayex Lib "vic32.dll" Alias "jpeginfofrombufferex " (ByRef firstelement As Byte, jdat As JpegDataEx) As Long Declare Sub jpegsetxyresolution Lib "vic32.dll" (ByVal xres As Long, ByVal yres As Long, ByVal resunit As Long) Declare Function jpegsetthumbnailsize Lib "vic32.dll" (ByVal longEdge As Long) As Long Declare Function kodalith Lib "vic32.dll" (ByVal thres As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function limitlevel Lib "vic32.dll" (ByVal thres As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function loadbif Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadbmp Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadbmpfrombuffer Lib "vic32.dll" (ByVal buff As Long, resimg As imgdes) As Long Declare Function loadbmpfrombytearray Lib "vic32.dll" Alias "loadbmpfrombuffer" (ByRef firstelement As Byte, resimg As imgdes) As Long Declare Function loadbmppalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadbmppalettefrombuffer Lib "vic32.dll" (ByVal buff As Long, paltab As RGBQUAD) As Long Declare Function loadbmppalettefrombytearray Lib "vic32.dll" Alias "loadbmppalettefrombuffer" (ByRef firstelement As Byte, paltab As RGBQUAD) As Long Declare Function loadgif Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadgifframe Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, gdata As GifGlobalData, fdata As GifFrameData) As Long Declare Function loadgifframefrombuffer Lib "vic32.dll" (ByVal buff As Long, resimg As imgdes, gdata As GifGlobalData, fdata As GifFrameData) As Long Declare Function loadgifframefrombytearray Lib "vic32.dll" Alias "loadgifframefrombuffer" (ByRef firstelement As Byte, resimg As imgdes, gdata As GifGlobalData, fdata As GifFrameData) As Long Declare Function loadgifframepalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD, ByVal frame As Long) As Long Declare Function loadgifframepalettefrombuffer Lib "vic32.dll" (ByVal buff As Long, paltab As RGBQUAD, ByVal frame As Long) As Long Declare Function loadgifframepalettefrombytearray Lib "vic32.dll" Alias "loadgifframepalettefrombuffer" (ByRef firstelement As Byte, paltab As RGBQUAD, ByVal frame As Long) As Long Declare Function loadgiffrombuffer Lib "vic32.dll" (ByVal buff As Long, resimg As imgdes) As Long Declare Function loadgiffrombytearray Lib "vic32.dll" Alias "loadgiffrombuffer" (ByRef firstelement As Byte, resimg As imgdes) As Long Declare Function loadgifglobalpalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadgifglobalpalettefrombuffer Lib "vic32.dll" (ByVal buff As Long, paltab As RGBQUAD) As Long Declare Function loadgifglobalpalettefrombytearray Lib "vic32.dll" Alias "loadgifglobalpalettefrombuffer" (ByRef firstelement As Byte, paltab As RGBQUAD) As Long Declare Function loadgifpalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadgifpalettefrombuffer Lib "vic32.dll" (ByVal buff As Long, paltab As RGBQUAD) As Long Declare Function loadgifpalettefrombytearray Lib "vic32.dll" Alias "loadgifpalettefrombuffer" (ByRef firstelement As Byte, paltab As RGBQUAD) As Long Declare Function loadjpg Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadjpgex Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, ByVal mode As Long) As Long Declare Function loadjpgfrombuffer Lib "vic32.dll" (ByVal buffaddr As Long, resimg As imgdes) As Long Declare Function loadjpgfrombytearray Lib "vic32.dll" Alias "loadjpgfrombuffer" (ByRef firstelement As Byte, resimg As imgdes) As Long Declare Function loadjpgfrombufferex Lib "vic32.dll" (ByVal buffaddr As Long, resimg As imgdes, ByVal mode As Long) As Long Declare Function loadjpgfrombytearrayex Lib "vic32.dll" Alias "loadjpgfrombufferex" (ByRef firstelement As Byte, resimg As imgdes, ByVal mode As Long) As Long Declare Function loadjpgthumbnail Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, ByVal createThumbNail As Long) As Long Declare Function loadjpgthumbnailfrombuffer Lib "vic32.dll" (ByVal buffaddr As Long, resimg As imgdes, ByVal createThumbNail As Long) As Long Declare Function loadjpgthumbnailfrombytearray Lib "vic32.dll" Alias "loadjpgthumbnailfrombuffer" (ByRef firstelement As Byte, resimg As imgdes, ByVal createThumbNail As Long) As Long Declare Function loadpcx Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadpcxpalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadpng Lib "vic32.dll" (ByVal filename As String, image As imgdes) As Long Declare Function loadpngfrombuffer Lib "vic32.dll" (ByVal buff As Long, resimg As imgdes) As Long Declare Function loadpngfrombytearray Lib "vic32.dll" Alias "loadpngfrombuffer" (ByRef firstelement As Byte, resimg As imgdes) As Long Declare Function loadpngpalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadpngpalettefrombuffer Lib "vic32.dll" (ByVal buff As Long, paltab As RGBQUAD) As Long Declare Function loadpngpalettefrombytearray Lib "vic32.dll" Alias "loadpngpalettefrombuffer" (ByRef firstelement As Byte, paltab As RGBQUAD) As Long Declare Function loadtga Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadtgapalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadtgawithalpha Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, alphaimage As imgdes) As Long Declare Function loadtif Lib "vic32.dll" (ByVal filename As String, resimg As imgdes) As Long Declare Function loadtiffrombuffer Lib "vic32.dll" (ByVal buff As Long, resimg As imgdes) As Long Declare Function loadtiffrombytearray Lib "vic32.dll" Alias "loadtiffrombuffer" (ByRef firstelement As Byte, resimg As imgdes) As Long Declare Function loadtifpage Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, ByVal page As Long) As Long Declare Function loadtifpagebyindex Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, ByVal pageIndex As Long) As Long Declare Function loadtifpagebyindexfrombuffer Lib "vic32.dll" (ByVal buffer As Long, resimg As imgdes, ByVal pageIndex As Long) As Long Declare Function loadtifpagebyindexfrombufferwithalpha Lib "vic32.dll" (ByVal buffer As Long, ByRef resimg As imgdes, ByVal pageIndex As Long, ByRef alpha As imgdes) As Long ' Declare Function loadtifpalette Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD) As Long Declare Function loadtifpalettefrombuffer Lib "vic32.dll" (ByVal buff As Long, paltab As RGBQUAD) As Long Declare Function loadtifpalettefrombytearray Lib "vic32.dll" Alias "loadtifpalettefrombuffer" (ByRef firstelement As Byte, paltab As RGBQUAD) As Long Declare Function loadtifpalettepage Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD, ByVal page As Long) As Long Declare Function loadtifpalettepagebyindex Lib "vic32.dll" (ByVal filename As String, paltab As RGBQUAD, ByVal pageIndex As Long) As Long Declare Function loadtifwithalpha Lib "vic32.dll" (ByVal filename As String, resimg As imgdes, alphaimage As imgdes) As Long Declare Function matchcolorimage Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function matchcolorimageex Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes, ByVal mode As Long) As Long Declare Function matrixconv Lib "vic32.dll" (kernel As Byte, srcimg As imgdes, resimg As imgdes) As Long Declare Function matrixconvex Lib "vic32.dll" (ByVal ksize As Long, ByRef firstelement As Byte, ByVal divsr As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function medianfilter Lib "vic32.dll" (ByVal ksize As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function mirrorimage Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function multiply Lib "vic32.dll" (ByVal multr As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function multiplyex Lib "vic32.dll" (ByVal multiplier As Double, srcimg As imgdes, resimg As imgdes) As Long Declare Function multiplyimage Lib "vic32.dll" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function negative Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function orimage Lib "vic32.dll" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function outline Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function pcxinfo Lib "vic32.dll" (ByVal filename As String, pdata As PcxData) As Long Declare Function pixelcount Lib "vic32.dll" (ByVal min As Long, ByVal max As Long, redct As Long, grnct As Long, bluct As Long, srcimg As imgdes) As Long Declare Function pixellize Lib "vic32.dll" (ByVal factr As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function pnggeterror Lib "vic32.dll" () As Long Declare Function pnggetxyresolution Lib "vic32.dll" (ByVal filename As String, ByRef xres As Long, ByRef yres As Long, ByRef resunit As Long) As Long Declare Sub pngsetxyresolution Lib "vic32.dll" (ByVal xres As Long, ByVal yres As Long, ByVal resunit As Long) Declare Function pnginfo Lib "vic32.dll" (ByVal filename As String, pinfo As PngData) As Long Declare Function pnginfofrombuffer Lib "vic32.dll" (ByVal buff As Long, pdat As PngData) As Long Declare Function pnginfofrombytearray Lib "vic32.dll" Alias "pnginfofrombuffer" (ByRef firstelement As Byte, pdat As PngData) As Long Declare Function printimage Lib "vic32.dll" (ByVal hwnd As Long, ByVal hdcprn As Long, ByVal mode As Long, image As imgdes, pRect As RECT, ByVal boxsiz As Long, ByVal dspfct As Long) As Long Declare Sub printimageenddoc Lib "vic32.dll" (ByVal hdcprn As Long, ByVal ejectPage As Long) Declare Function printimagenoeject Lib "vic32.dll" (ByVal hwnd As Long, ByVal hdcprn As Long, ByVal mode As Long, image As imgdes, pRect As RECT, ByVal boxsiz As Long, ByVal dspfct As Long) As Long Declare Function printimagestartdoc Lib "vic32.dll" (ByVal hdcprn As Long, ByVal docname As String) As Long Declare Function rainbowpalette Lib "vic32.dll" (image As imgdes) As Long Declare Sub recttoimagearea Lib "vic32.dll" (RECT As RECT, image As imgdes) Declare Function reduceimagecolors Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function removenoise Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function resize Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function resizeex Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes, ByVal mode As Long) As Long Declare Sub rgb2hsv Lib "vic32.dll" (ByRef rgbtab As RGBQUAD, ByRef hsvtab As HSVTRIPLE, ByVal colors As Long) Declare Function rotate Lib "vic32.dll" (ByVal angle As Double, srcimg As imgdes, resimg As imgdes) As Long Declare Function rotate90 Lib "vic32.dll" (ByVal direction As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function rotateex Lib "vic32.dll" (ByVal angle As Double, ByRef srcimg As imgdes, ByRef resimg As imgdes, ByVal mode As Long) As Long Declare Function savebif Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes) As Long Declare Function savebmp Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, ByVal cmp As Long) As Long Declare Function savebmptobuffer Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal comp As Long) As Long Declare Function saveeps Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes) As Long Declare Function savegif Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes) As Long Declare Function savegifex Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, ByVal mode As Long, ByVal transColor As Long) As Long Declare Function savegifframe Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, gsdata As GifGlobalSaveData, fsdata As GifFrameSaveData, ByVal mode As Long) As Long Declare Function savegiftobufferex Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal mode As Long, ByVal transColor As Long) As Long Declare Function savejpg Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, ByVal quality As Long) As Long Declare Function savejpgex Lib "vic32.dll" (ByVal filename As String, image As imgdes, ByVal quality As Long, ByVal mode As Long) As Long Declare Function savejpgtobuffer Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal quality As Long) As Long Declare Function savejpgtobufferex Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal quality As Long, ByVal mode As Long) As Long Declare Function savepcx Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes) As Long Declare Function savepng Lib "vic32.dll" (ByVal filename As String, image As imgdes, ByVal comp As Long) As Long Declare Function savepngex Lib "vic32.dll" (ByVal filename As String, image As imgdes, ByVal comp As Long, ByVal mode As Long, ByRef savedata As PNG_DATA) As Long Declare Function savepngtobuffer Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal comp As Long) As Long Declare Function savepngtobufferex Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal comp As Long, ByVal mode As Long, ByRef savedata As PNG_DATA) As Long Declare Function savetga Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, ByVal cmp As Long) As Long Declare Function savetif Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, ByVal cmp As Long) As Long Declare Function savetifpage Lib "vic32.dll" (ByVal filename As String, srcimg As imgdes, ByVal cmp As Long, ByVal page As Long) As Long Declare Function savetiftobuffer Lib "vic32.dll" (ByRef buffaddr As Long, srcimg As imgdes, ByVal comp As Long) As Long Declare Sub setgifcomment Lib "vic32.dll" (ByVal version As Long, ByVal gifcomment As String) Declare Sub setimagearea Lib "vic32.dll" (image As imgdes, ByVal stx As Long, ByVal sty As Long, ByVal endx As Long, ByVal endy As Long) Declare Function setpixelcolor Lib "vic32.dll" (image As imgdes, ByVal xcoord As Long, ByVal ycoord As Long, ByVal level As Long) As Long Declare Function setupimgdes Lib "vic32.dll" (ByVal dib As Long, image As imgdes) As Long Declare Function sharpen Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function sharpengentle Lib "vic32.dll" (srcimg As imgdes, resimg As imgdes) As Long Declare Function subimage Lib "vic32.dll" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function tgainfo Lib "vic32.dll" (ByVal filename As String, tdat As TgaData) As Long Declare Function threshold Lib "vic32.dll" (ByVal thres As Long, srcimg As imgdes, resimg As imgdes) As Long Declare Function tiffgeterror Lib "vic32.dll" () As Long Declare Function tiffgetpageinfo Lib "vic32.dll" (ByVal filename As String, ByRef totalpages As Long, ByRef pageArray As Long, ByVal arrayelems As Long) As Long Declare Function tiffgetpageinfofrombuffer Lib "vic32.dll" (ByVal buffer As Long, ByRef totalpages As Long, ByRef pageArray As Long, ByVal arrayelems As Long) As Long Declare Function tiffgetSOIofspagebyindex Lib "vic32.dll" (ByVal filename As String, soiOfs As Long, ByVal pageIndex As Long) As Long Declare Function tiffgetSOIofspagebyindexfrombuffer Lib "vic32.dll" (ByVal buffer As Long, soiOfs As Long, ByVal pageIndex As Long) As Long Declare Function tiffgetxyresolution Lib "vic32.dll" (ByVal filename As String, xres As Long, yres As Long, resunit As Long) As Long Declare Function tiffgetxyresolutionpagebyindex Lib "vic32.dll" (ByVal filename As String, xres As Long, yres As Long, resunit As Long, ByVal targetpage As Long) As Long Declare Function tiffinfo Lib "vic32.dll" (ByVal filename As String, tdat As TiffData) As Long Declare Function tiffinfofrombuffer Lib "vic32.dll" (ByVal buff As Long, tdat As TiffData) As Long Declare Function tiffinfofrombytearray Lib "vic32.dll" Alias "tiffinfofrombuffer" (ByRef firstelement As Byte, tdat As TiffData) As Long Declare Function tiffinfopage Lib "vic32.dll" (ByVal filename As String, tdat As TiffData, ByVal page As Long) As Long Declare Function tiffinfopagebyindex Lib "vic32.dll" (ByVal filename As String, tdat As TiffData, ByVal pageIndex As Long) As Long Declare Function tiffinfopagebyindexex Lib "vic32.dll" (ByVal filename As String, tinfo As TiffDataEx, ByVal pageIndex As Long) As Long Declare Function tiffinfopagebyindexfrombuffer Lib "vic32.dll" (ByVal buffer As Long, tinfo As TiffData, ByVal pageIndex As Long) As Long Declare Function tiffinfopagebyindexfrombufferex Lib "vic32.dll" (ByVal buffer As Long, tinfo As TiffDataEx, ByVal pageIndex As Long) As Long Declare Sub tiffsetxyresolution Lib "vic32.dll" (ByVal xres As Long, ByVal yres As Long, ByVal resunit As Long) Declare Sub unlockLZW Lib "vic32.dll" (ByVal key As Long) Declare Function updatebitmapcolortable Lib "vic32.dll" (image As imgdes) As Long Declare Function usetable Lib "vic32.dll" (redtab As Byte, grntab As Byte, blutab As Byte, srcimg As imgdes, resimg As imgdes) As Long Declare Function vicSJversion Lib "VICSJ32.DLL" () As Long Declare Function Victorversion Lib "vic32.dll" () As Integer Declare Function Victorversiondate Lib "vic32.dll" (ByVal desStr As String, ByVal bufchars As Long) As Integer Declare Function Victorversionex Lib "vic32.dll" (vicVerInfo As VIC_VERSION_INFO) As Integer Declare Function victowinpal Lib "vic32.dll" (srcimg As imgdes, hPal As Long) As Long Declare Function viewimage Lib "vic32.dll" (ByVal hwnd As Long, ByVal hdc As Long, hPal As Long, ByVal xpos As Long, ByVal ypos As Long, image As imgdes) As Long Declare Function viewimageex Lib "vic32.dll" (ByVal hwnd As Long, ByVal hdc As Long, hPal As Long, ByVal xpos As Long, ByVal ypos As Long, image As imgdes, ByVal scrx As Long, ByVal scry As Long, ByVal colRedMode As Long) As Long Declare Function windowtoimage Lib "vic32.dll" (ByVal hwnd As Long, resimg As imgdes) As Long Declare Function wintovicpal Lib "vic32.dll" (ByVal hPal As Long, resimg As imgdes) As Long Declare Function wtaverage Lib "vic32.dll" (ByVal prct As Long, srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function xorimage Lib "vic32.dll" (srcimg As imgdes, oprimg As imgdes, resimg As imgdes) As Long Declare Function zeroimage Lib "vic32.dll" (ByVal level As Long, image As imgdes) As Long Declare Sub zeroimgdes Lib "vic32.dll" (image As imgdes) Declare Sub TWclose Lib "VICTW32.DLL" () Declare Function TWdetecttwain Lib "VICTW32.DLL" (ByVal hwnd As Long) As Long Declare Function TWgetbrightness Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef brightness As TWAIN_CAP_DATA) As Long Declare Function TWgetcontrast Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef contrast As TWAIN_CAP_DATA) As Long Declare Function TWgeterror Lib "VICTW32.DLL" () As Long Declare Function TWgetfeeder Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef feederIsEnabled As Long, ByRef feederHasPaper As Long) As Long Declare Function TWgetmeasureunit Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef typeUnit As TWAIN_CAP_DATA) As Long Declare Function TWgetphysicalsize Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef width As Long, ByRef height As Long) As Long Declare Function TWgetpixeltype Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef pixelType As TWAIN_CAP_DATA) As Long Declare Function TWgetsourcenames Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef namelist As TW_STR32, ByRef nameCount As Long) As Long Declare Function TWgetsourcencount Lib "VICTW32.DLL" Alias "TWgetsourcenames" (ByVal hwnd As Long, ByVal nullval As Long, ByRef nameCount As Long) As Long Declare Function TWgetxresolution Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef xres As TWAIN_CAP_DATA) As Long Declare Function TWgetyresolution Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef yres As TWAIN_CAP_DATA) As Long Declare Function TWopen Lib "VICTW32.DLL" (ByVal hwnd As Long) As Long Declare Function TWscancountimages Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef resimg As imgdes, ByRef pRect As RECT, ByVal showIU As Long, ByVal maxPages As Long, ByVal saveScan As Long) As Long Declare Function TWscanimage Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef resimg As imgdes) As Long Declare Function TWscanimageex Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef resimg As imgdes, pRect As RECT, ByVal showIU As Long) As Long Declare Function TWscanmultipleimages Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef resimg As imgdes, ByVal saveScan As Long) As Long Declare Function TWscanmultipleimagesex Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef resimg As imgdes, ByRef pRect As RECT, ByVal showIU As Long, ByVal saveScan As Long) As Long Declare Function TWselectsource Lib "VICTW32.DLL" (ByVal hwnd As Long) As Long Declare Function TWselectsourcebyname Lib "VICTW32.DLL" (ByVal hwnd As Long, ByVal dsname As String) As Long Declare Function TWsetbrightness Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef brightness As TWAIN_CAP_DATA) As Long Declare Function TWsetcontrast Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef contrast As TWAIN_CAP_DATA) As Long Declare Function TWsetduplex Lib "VICTW32.DLL" (ByVal hwnd As Long, ByVal enableDuplex As Long) As Long Declare Function TWsetfeeder Lib "VICTW32.DLL" (ByVal hwnd As Long, ByVal enableFeeder As Long) As Long Declare Function TWsetmeasureunit Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef typeUnit As TWAIN_CAP_DATA) As Long Declare Function TWsetpagesize Lib "VICTW32.DLL" (ByVal hwnd As Long, ByVal pageConst As Long) As Long Declare Function TWsetpixeltype Lib "VICTW32.DLL" (ByVal hwnd As Long, ByRef pixelType As TWAIN_CAP_DATA) As Long Declare Function TWsetxresolution Lib "VICTW32.DLL" (ByVal hwnd As Long, xres As TWAIN_CAP_DATA) As Long Declare Function TWsetyresolution Lib "VICTW32.DLL" (ByVal hwnd As Long, yres As TWAIN_CAP_DATA) As Long Declare Sub TWsetproductname Lib "VICTW32.DLL" (ByVal prodName As String) Declare Function TWvicversion Lib "VICTW32.DLL" () As Integer ' Error codes for Victor Image Processing Library for Windows Global Const NO_ERROR = 0 ' No error Global Const BAD_RANGE = -1 ' Range error Global Const NO_DIG = -2 ' Digitizer board not detected Global Const BAD_DSK = -3 ' Disk full, fill not written Global Const BAD_OPN = -4 ' Filename not found Global Const BAD_FAC = -5 ' Non= -dimensional variable out of range Global Const BAD_TIFF = -6 ' Unreadable TIF format Global Const BAD_BPS = -8 ' TIF bits per sample not supported Global Const BAD_CMP = -9 ' Unreadable compression scheme Global Const BAD_CRT = -10 ' Cannot create file Global Const BAD_FTPE = -11 ' Unknown file format Global Const BAD_DIB = -12 ' Device independent bitmap is compressed Global Const BAD_MEM = -14 ' Insufficient memory for function Global Const BAD_PIW = -15 ' Not PIW format Global Const BAD_PCX = -16 ' Unreadable PCX format Global Const BAD_GIF = -17 ' Unreadable GIF format Global Const PRT_ERR = -18 ' Print error Global Const SCAN_ERR = -19 ' Scanner error Global Const BAD_TGA = -25 ' Unreadable TGA format Global Const BAD_BPP = -26 ' Bits per pixel not supported Global Const BAD_BMP = -27 ' Unreadable BMP format Global Const NO_DEV_DATA = -33 ' No data from device Global Const TIMEOUT = -34 ' Function timed out Global Const BAD_LOCK = -40 ' Could not lock memory Global Const PRT_BUSY = -41 ' Print function already executing Global Const BAD_IBUF = -42 ' Invalid image buffer address Global Const BAD_JPEG = -43 ' Unreadable JPEG format Global Const TOO_CPLX = -44 ' Image is too complex to complete operation Global Const SCAN_UNLOAD = -45 ' paper could not be unloaded from ADF Global Const SCAN_LIDUP = -46 ' ADF lid was opened Global Const SCAN_NOPAPER = -47 ' ADF bin is empty Global Const SCAN_NOADF = -48 ' ADF is not connected Global Const SCAN_NOTREADY = -49 ' ADF is connected but not ready Global Const NOT_AVAIL = -50 ' Function not available due to missing module Global Const TIFF_NOPAGE = -51 ' TIF page not found Global Const BAD_PTR = -52 ' Pointer does not point at readable/writable memory Global Const LZW_DISABLED = -53 ' LZW functionality disabled Global Const TWAIN_NOWND = -54 ' Could not create Twain parent window Global Const TWAIN_NODSM = -55 ' Could not open Twain Source Manager Global Const TWAIN_NODS = -56 ' Could not open Twain Data Source Global Const TWAIN_ERR = -57 ' Twain image acquisition error Global Const TWAIN_NOMATCH = -58 ' None of the elements in two lists were equal Global Const TWAIN_BAD_DATATYPE = -59 ' Data type mismatch Global Const TWAIN_SCAN_CANCEL = -60 ' User cancelled scan Global Const TWAIN_BUSY = -61 ' Twain function is busy Global Const TWAIN_NO_PAPER = -66 ' Auto feeder is empty Global Const TWAIN_STOP_SCAN = -67 ' Stop scanning images Global Const TIFF_MOTYPE = -69 ' Motorola byte order ' Printimage() print modes Global Const PRTDEFAULT = 0 Global Const PRTHALFTONE = 1 Global Const PRTSCATTER = 2 ' Colordither, colorscatter modes Global Const COLORSCATTER16 = 0 Global Const COLORSCATTER256 = 1 Global Const COLORDITHER16 = 0 Global Const COLORDITHER256 = 1 ' convertrgbtopalmode() modes Global Const CR_OCTREENODIFF = 0 ' Use octree color method without error diffusion Global Const CR_OCTREEDIFF = 1 ' Use octree color method with error diffusion Global Const CR_TSDNODIFF = 2 ' Use TSD color method without error diffusion Global Const CR_TSDDIFF = 3 ' Use TSD color method with error diffusion Global Const CR_LOW = 0 'CR_OCTREENODIFF Global Const CR_HIGH = 3 'CR_TSDDIFF ' 24-bit RGB display methods (viewimageex()) Global Const VIEWOPTPAL = 0 Global Const VIEWDITHER = 1 Global Const VIEWSCATTER = 2 ' calchistorgb modes Global Const PALETTEIMAGEASGRAY = 0 Global Const PALETTEIMAGEASRGB = 1 ' Resize modes Global Const RESIZEFAST = 0 Global Const RESIZEBILINEAR = 1 ' File save defines Global Const TIFUNC = 0 Global Const TIFLZW = 1 Global Const TIFPB = 2 Global Const TIFG3 = 3 Global Const TIFG4 = 4 Global Const BMPUNC = 0 Global Const BMPRKE = 1 Global Const TGAUNC = 0 Global Const TGARLE = 1 Global Const PIWUNC = 0 Global Const PIWRLE = 1 Global Const PNGINTERLACE = 1 Global Const PNGALLFILTER = 0 Global Const PNGNOFILTER = 2 Global Const PNGSUBFILTER = 4 Global Const PNGUPFILTER = 6 Global Const PNGAVGFILTER = 8 Global Const PNGPAETHFILTER = 10 Global Const PNGALLFILTERS = 0 'PNGALLFILTER ' Savejpgex modes Global Const JPGSEQ = 0 Global Const JPGPROG = 1 Global Const JPGSEQOPT = 2 ' Savegifex mode flags Global Const GIFLZWCOMP = 0 Global Const GIFINTERLACE = 1 Global Const GIFTRANSPARENT = 2 Global Const GIFWRITE4BIT = 4 Global Const GIFNOCOMP = 8 ' Vicversionex flags Global Const VIC_VS_STATIC_RTL = 1 Global Const VIC_VS_THREAD_SAFE = 2 Global Const VIC_VS_RELEASE = 4 Global Const VIC_VS_EVAL_LIB = 8 Global Const VER_PLATFORM_WIN32s = 0 Global Const VER_PLATFORM_WIN32_WINDOWS = 1 Global Const VER_PLATFORM_WIN32_NT = 2 ' Png extended error codes (available when rcode == BAD_PNG) Global Const PNG_ERR_UNK_CRIT_CHK = -100 'Unknown critical chunk Global Const PNG_ERR_TOO_FEW_IDATS = -101 'Not enough IDATs for image Global Const PNG_ERR_INV_IHDR_CHK = -102 'Invalid IHDR chunk Global Const PNG_ERR_INV_BITDEPTH = -103 'Invalid bit depth in IHDR Global Const PNG_ERR_INV_COLORTYPE = -104 'Invalid color type in IHDR Global Const PNG_ERR_INV_BITCOL = -105 'Invalid color type/bit depth combo in IHDR Global Const PNG_ERR_INV_INTERLACE = -106 'Invalid interlace method in IHDR Global Const PNG_ERR_INV_COMP = -107 'Invalid compression method in IHDR Global Const PNG_ERR_INV_FILTER = -108 'Invalid filter method in IHDR Global Const PNG_ERR_IMAGE_SIZE = -109 'Invalid image size in IHDR Global Const PNG_ERR_BAD_SIG = -110 'Bad PNG signature Global Const PNG_ERR_BAD_CRC = -111 'Bad CRC value Global Const PNG_ERR_TOO_MUCH_DATA = -112 'Extra data at end of file Global Const PNG_ERR_EARLY_EOF = -113 'Unexpected End Of File Global Const PNG_ERR_MEM_ERR = -114 'Memory error Global Const PNG_ERR_DECOMPRESSION = -115 'Decompression error Global Const PNG_ERR_COMPRESSION = -116 'Compression error Global Const PNG_ERR_NO_DISK_SPACE = -117 'Out of disk space ' Jpeg extended error codes (available when rcode == BAD_JPEG) Global Const JPG_BAD_PRECISION = -100 'Sample precision is not 8 Global Const JPG_BAD_EOF = -101 'Unexpected End Of File Global Const JPG_BAD_RESTART = -102 'Reset marker could not be found Global Const JPG_INVALID_MARKER = -103 'Invalid marker found in the image data Global Const JPG_READ_ERR = -104 'Error reading data from the file Global Const JPG_INVALID_DATA = -105 'Invalid data found in JPEG file Global Const JPG_BAD_COMPINFO = -106 'Component info out of bounds Global Const JPG_BAD_BLOCKNO = -107 'Blocks in an MCU is > 10 Global Const JPG_BAD_BPPIXEL = -108 'Bits per sample is not 8 Global Const JPG_BAD_COMPNO = -109 'Invalid number of components Global Const JPG_BAD_FTYPE = -110 'File type not SOF0 or SOF1 Global Const JPG_BAD_EOI = -111 'Unexpected End Of Image Global Const JPG_BAD_JFIF = -112 'File is not JPEG JFIF Global Const JPG_BAD_SCAN_PARAM = -113 'Bad progressive JPEG scan parameter Global Const JPG_BAD_MEM = -114 'Out of memory Global Const JPG_NO_DISK_SPACE = -115 'Out of disk space ' TIFF extended error codes (available when rcode == BAD_TIFF) Global Const TIF_INVALID_DATA = -100 'Invalid data found in TIF file Global Const TIF_READ_ERR = -101 'Error reading data from the file Global Const TIF_BAD_EOF = -102 'Unexpected End Of File Global Const TIF_G4_COMPLEX = -103 'Trans point arrays not large enough ' ScanJet models Global Const SCNJET = 0 Global Const SJPLUS = 1 Global Const SJIIC = 2 ' Image output data types Global Const LINEART = 0 Global Const BWDITH = 3 Global Const BWGRAY = 4 Global Const COL24 = 5 Global Const COLDITH = 7 ' ScanJet parameter codes Global Const SJXRES = 0 ' X resolution Global Const SJYRES = 1 ' Y resolution Global Const SJXEXTENT = 2 ' X extent Global Const SJYEXTENT = 3 ' Y extent Global Const SJDATATYPE = 4 ' Output data type Global Const SJINTENSITY = 5 ' Intensity Global Const SJCONTRAST = 6 ' Contrast Global Const SJRESET = 7 ' Reset scanner to default conditions Global Const SJBPLINE = 8 ' Bytes per scanline Global Const SJSLINES = 9 ' Scanline in a window Global Const SJDWIDTH = 10 ' Data width Global Const SJMODEL1 = 11 ' Model 1 Global Const SJMODEL2 = 12 ' Model 2 Global Const SJERRSTACK = 13 ' Get error stack depth Global Const SJGETERRNO = 14 ' Get error number Global Const SJCLRERR = 15 ' Clear last error Global Const SJSCNWIN = 16 ' Scan the window Global Const SJSTDWID = 17 ' Set data width Global Const SJSTDTYP = 18 ' Set output data type, invert image Global Const SJSTXYRS = 19 ' Set X,Y resolution Global Const SJSTINTENS = 20 ' Set intensity Global Const SJSTCONTRAST = 21 ' Set contrast Global Const SJWINSIZ = 22 ' Set scan window size Global Const SJERR = 23 ' No match, return string to generate error Global Const SJADFSCNWIN = 24 ' ADF scan win Global Const SJADFCHANGE = 25 ' ADF change Global Const SJADFUNLOAD = 26 ' ADF unload doc Global Const SJADFREADY = 27 ' ADF is ready Global Const SJADFCONNECTED = 28 ' ADF is connected Global Const SJADFHASPAPERx = 29 ' ADF has paper Global Const SJADFOPENED = 30 ' ADF opened since last change/scan Global Const SJADFREADYTOUNLOAD = 31 ' ADF is ready to unload Global Const SJMAXSTR = 31 ' Number of ScanJet string ' TWAIN function constants ' Container constants (4) Global Const TWON_ARRAY = 3 Global Const TWON_ENUMERATION = 4 Global Const TWON_ONEVALUE = 5 Global Const TWON_RANGE = 6 ' Pixel type constants (9) Global Const TWPT_BW = 0 Global Const TWPT_GRAY = 1 Global Const TWPT_RGB = 2 Global Const TWPT_PALETTE = 3 Global Const TWPT_CMY = 4 Global Const TWPT_CMYK = 5 Global Const TWPT_YUV = 6 Global Const TWPT_YUVK = 7 Global Const TWPT_CIEXYZ = 8 ' Units constants (6) Global Const TWUN_INCHES = 0 Global Const TWUN_CENTIMETERS = 1 Global Const TWUN_PICAS = 2 Global Const TWUN_POINTS = 3 Global Const TWUN_TWIPS = 4 Global Const TWUN_PIXELS = 5 Global Const TW_DONTCARE = 65535