imgdes

Image Descriptor used by most Victor Library functions (always passed by reference)
TypeElementBytesComment
UCHAR *ibuff4Address of image buffer
unsignedstx4start x, Image area to be processed (pixel coords)
unsignedsty4start y, Image area to be processed (pixel coords)
unsignedendx4end x, Image area to be processed (pixel coords)
unsignedendy4end y, Image area to be processed (pixel coords)
unsignedbuffwidth4Image buffer width in bytes
RGBQUAD *palette4Address of palette associated with the image
intcolors4Palette colors
intimgtype4Image type: bit 0 = 1 if image is grayscale
BITMAPINFOHEADER *bmh4Address of BITMAPINFOHEADER (and DIB)
HBITMAPhBitmap4Device-independent bitmap handle


TiffData

TIFF file format info structure definition used by tiffinfo() (always passed by reference)
TypeElementBytesComment
unsigned ByteOrder 4 Byte order -- II or MM
unsigned width 4 TIF image width
unsigned length 4 TIF image length
unsigned BitsPSample 4 TIF bits per sample
unsigned Comp 4 Compression scheme code
unsigned SamplesPPixel 4 Samples per pixel
unsigned PhotoInt 4 Photo interpretation
unsigned PlanarCfg 4 Planar configuration
int vbitcount 4 Victor bits per pixel


TiffDataEx

TIFF file format info structure definition used by tiffinfoex() (always passed by reference)
TypeElement BytesComment
unsigned ByteOrder 4 Byte order -- II or MM
unsigned width 4 TIF image width
unsigned length 4 TIF image length
unsigned BitsPSample 4 TIF bits per sample
unsigned Comp 4 Compression scheme code
unsigned SamplesPPixel 4 Samples per pixel
unsigned PhotoInt 4 Photo interpretation
unsigned PlanarCfg 4 Planar configuration
int vbitcount 4 Victor bits per pixel
unsigned xres 4 Horiz pixel density of image
unsigned yres 4 Vert pixel density of image
unsigned resunit 4 X/Y density units
unsigned fillorder 4 Fill order
unsigned rowsperstrip 4 Rows per strip
unsigned orientation 4 Orientation
unsigned long IFDofs 4 Bytes from file start to 1st IFD tag
int page 4 Page label


PcxData

PCX file format info structure definition used by pcxinfo() (always passed by reference)
TypeElement BytesComment
int PCXvers 4 PCX version number
unsigned width 4 PCX image width
unsigned length 4 PCX image length
int BPPixel 4 PCX bits per pixel
int Nplanes 4 Number of planes
int BytesPerLine 4 Bytes per line
int PalInt 4 Palette info interpretation: 1 = color, 2 = gray scale
int vbitcount 4 Victor bits per pixel


PNGSIGBITS

Significant bits in PNG file
TypeElement BytesComment
char [4] or DWORD sb_long (or sb_char[4]) 4 PNG image bits per pixel, up to 4 values


PNGTRANSINFO

Transparency or background color data
TypeElement BytesComment
BOOL isPresent 4 TRUE (1) if transparency data is present
UCHAR data[6] 6 Up to 6 bytes of transparency data
int byteCount 4 Bytes of transparency data


PNG_DATA

Used by savepngex() (always passed by reference)
TypeElement BytesComment
ULONG transcolor 4 Transparent color for GS, RGB and palette color images
ULONG reserved1 4
ULONG reserved2 4
ULONG reserved3 4


PngData

PNG file format info structure definition used by pnginfo() (always passed by reference)
TypeElement BytesComment
unsigned width 4 PNG image width
unsigned length 4 PNG image length
int bitDepth 4 Bits per pixel, 1, 2, 4, 8, or 16
int vbitcount 4 Victor bits per pixel
int colorType 4 Color types: 0=GS, 2=RGB, 3=PalCol, 4=GS+alpha, 6=RGB+alpha
int interlaced 4 0 => non-interlaced, 1 => interlaced
int imageId 4 Unique identifier for colorType/bitDepth
int channels 4 Number of channels of data per pixel
int pixelDepth 4 Number of bits per pixel
unsigned rowBytes 4 Bytes in one image row
PNGTRANSINFO transData 14 Transparency data
PNGTRANSINFO backData 14 Background color data
DWORD igamma 4 Gamma as float = igamma / 100000
DWORD physXres 4 X axis pixels per unit
DWORD physYres 4 Y axis pixels per unit
DWORD physUnits 4 X, Y axis pixel units
PNGSIGBITS sigBit 4 Significant bits in file (PNGSIGBITS)
DWORD offsXoffset 4 X axis offset
DWORD offsYoffset 4 Y axis offset
UCHAR offsUnits 4 X, Y axis offset units


GifData

GIF file format info structure definition used by gifinfo() (always passed by reference)
TypeElement BytesComment
unsigned width 4 GIF image width
unsigned length 4 GIF image length
int BitsColRes 4 Bits of color resolution
int BitsPPixel 4 Bits per pixel
int BckCol 4 Transparent color
int Laceflag 4 Interlace flag
int Codesize 4 Code size
int GIFvers 4 GIF version, 87 or 89
int vbitcount 4 Victor bits per pixel


GifGlobalSaveData

GIF global data used by savegifframe(), et al. (always passed by reference)
TypeElement BytesComment
unsigned scrwidth 4 GIF screen width
unsigned scrlength 4 GIF screen length
BOOL hasColorMap 4 Global color table is present!
int bckColor 4 Color index of screen backgnd
unsigned loop 4 Number of times to repeat animation


GifGlobalData

GIF global data used by loadgifframe(), et al. (always passed by reference)
TypeElement BytesComment
GifGlobalSaveData saveData 20 Global vars needed to save a GIF frame (GifGlobalSaveData)
int BitsPPixel 4 Bit count
int colorRes 4 Color resolution
int pixelAspectRatio 4 Pixel aspect ratio
long commentOffset 4 Bytes from file start to first comment extension
int colors 4 Number of colors in global color table
long colorMapOffset 4 Global color table offset in file


GifFrameSaveData

GIF frame data used by savegifframe(), et al. (always passed by reference)
TypeElementBytesComment
unsignedstartx4X pixel position with respect to scrwidth
unsignedstarty4Y pixel position with respect to scrlength
BOOLhasColorMap4Local color table is present!
unsigneddelay4100ths of a second to display frame
inttransColor4Transparent color index, -1 => none
intremoveBy4How graphic is to be treated after display
BOOLwaitForUserInput4If true, expect user input


MULTIFRAME_DATA

Data used by savegifmultiframetobuffer()
TypeElementBytesComment
UCHAR *buffAddr4Address of
DWORDframeDataOfsOffset of where the frame data starts
DWORDcommentOfsOffset of where the image data starts
DWORDterminatorOfsOffset of GIF terminator


GifFrameData

GIF frame data used by loadgifframe(), et al. (always passed by reference)
TypeElementBytesComment
GifFrameSaveDataGifFrameSaveData saveData28Frame vars needed to save a GIF frame
intvbitcount4Victor bits per pixel
unsignedwidth4GIF image width
unsignedlength4GIF image length
intframe4Frame number the data describes
BOOLinterlace4Interlaced image
intcodesize4Code size
intcolors4Number of colors in local color table
longcolorMapOffset4Local color table offset in file
longrasterDataOffset4Bytes from file start to start of raster data


TgaData

Targa file format info structure definition used by tgainfo() (always passed by reference)
TypeElementBytesComment
intIDfieldchars4Chars in ID field
unsignedwidth4Targa image width
unsignedlength4Targa image length
intColorMapType4Color map type: 0=no, 1=yes
intImageType4Image type
intColorMapEntryBits4No. bits in color map entry
intXorigin4X origin of image
intYorigintd>4Y origin of image
intBPerPix4Bits per pixel
intABPerPix4Attribute bits per pixel
intScreenOrigin40=lower left corner, 2=upper left
intInterleave4Data storage interleave: 0=none
intvbitcount4Victor bits per pixel


JpegData

JPEG file format info structure definition used by jpeginfo() (always passed by reference)
TypeElementBytesComment
intftypeJPEG file type: -1 or 0 - 15
unsignedwidthJPEG image width
unsignedlengthJPEG image length
unsignedcompsNumber of components
unsignedprecisionSample precision, 8 or 16
unsignedsampFac[4]Horiz * 16 + Vert
intvbitcountVictor bits per pixel


JPEG_THUMB_DATA

JPEG Thumbnail data used inside JpegDataEx by jpeginfoex() (always passed by reference)
TypeElementBytesComment
BOOLhasThumbNail4TRUE (1) if thumbnail present
UCHARwidth1Thumbnail dimensions
UCHARlength1Thumbnail dimensions
UCHARbitcount1Bits per pixel of thumbnail, 8 or 24
UCHARcoding1THUMB_CODE_JPEG, THUMB_CODE_PAL, or THUMB_CODE_RGB


JpegDataEx

JPEG file format info structure definition used by jpeginfoex() (always passed by reference)
TypeElementBytesComment
intftype4JPEG file type: -1 or 0 - 15
unsignedwidth4JPEG image width
unsignedlength4JPEG image length
unsignedcomps4Number of components
unsignedprecision4Sample precision, 8 or 16
unsignedsampFac[4]4Horiz * 16 + Vert
intvbitcount4Victor bits per pixel
unsignedxres4Horiz pixel density of image, NOT thumbnail
unsignedyres4Vert pixel density of image, NOT thumbnail
unsignedresunit4X/Y density units
JPEG_THUMB_DATAthumbNail8Thumbnail data


VIC_VERSION_INFO

Victor version info (always passed by reference)
TypeElementBytesComment
WORDversion2Victor version
WORDflags2Version flags


HSVTRIPLE

TypeElementBytesComment
UCHARhue1
UCHARsaturation1
UCHARvalue1


PALETTEPOINT

Used by makepalette()
TypeElementBytesComment
UCHARindex1
UCHARred1
UCHARgreen1
UCHARblue1


MINMAX

Used by calcminmax()
TypeElementBytesComment
intmin4
intmax4
intres14Possible future expansion
intres24Possible future expansion


COORD_VAL

Used by sortpixelsbyval()
TypeElementBytesComment
unsignedval4
unsignedx4
unsignedy 4


TW_STR32[34]

Twain character array used by TWgetsourcenames()
TypeElementBytesComment
charelement[34]34Character array for TWAIN source name


TWAIN_ONEVALUE

Data for Twain ONEVALUE-type container

TypeElementBytesComment
shortval2


TWAIN_ENUMTYPE

Data for Twain ENUM-type container
TypeElementBytesComment
shortarray[18]36
WORDnelems2Number of elements in array[]
WORDcurrentIndex2The value that is currently in effect
WORDdefaultIndex2Power-up value


TWAIN_RANGE

Data for Twain RANGE-type container
TypeElementBytesComment
shortmin2Starting value in the range
shortmax2Final value in the range
shortstepSize2Increment from min to max
shortcurrentVal2The value that is currently in effect
shortdefaultVal2Power-up value


TWAIN_CAP_DATA

Capability get/set
TypeElementBytesComment
shortconType2Container type, TWON_ONEVALUE, TWON_ENUMERATION, or TWON_RANGE,
TWAIN_ONEVALUEoneValue2Data for ONEVALUE-type container
TWAIN_ENUMTYPEenumType42Data for ENUM-type container
TWAIN_RANGErange10Data for RANGE-type container

Defined Constants

Maximum image dimensions
XLIMIT 32768
YLIMIT 32768
Grayscale image
IMGTYPE_GRAYSCALE 1
Png file
PNG_BASE 0
PNG_WRT_TRANSCOLOR 1
Jpeg thumbnail encoding
THUMB_CODE_JPEG 0x10
THUMB_CODE_PAL 0x11
THUMB_CODE_RGB 0x13
THUMB_CODE_TIFUNC 0x14
THUMB_CODE_TIFJPG 0x15
convert8bitto1bit() modes
CONV8TO1SCATTER 0
CONV8TO1DITHER 1
CONV8TO1THRESHOLD 2
colordither(), colorscatter() modes
COLORSCATTER16 0
COLORSCATTER256 1
COLORDITHER16 0
COLORDITHER256 1
convertrgbtopalmode() modes
CR_OCTREENODIFF 0 Use octree color method without error diffusion
CR_OCTREEDIFF 1 Use octree color method with error diffusion
CR_TSDNODIFF 2 Use TSD color method without error diffusion
CR_TSDDIFF 3 Use TSD color method with error diffusion
CR_LOW 0
CR_HIGH 3
calchistorgb() modes
PALETTEIMAGEASGRAY 0
PALETTEIMAGEASRGB 1
printimage() print modes
PRTDEFAULT 0
PRTHALFTONE 1
PRTSCATTER 2
resizeex modes
RESIZEFAST 0
RESIZEBILINEAR 1
Rotation definitions, used by rotateex()
ROTATE_INTERP 0Pixel interpolation
ROTATE_NO_INTERP 1
savebmp defines
BMPUNC 0
BMPRLE 1
savegifex() mode flags
GIFLZWCOMP 0
GIFINTERLACE 1
GIFTRANSPARENT 2
GIFWRITE4BIT 4
GIFNOCOMP 8
GIFMULTIFRAME 16
GIFWRITE_1BIT 0x00010000
GIFWRITE_2BIT 0x00020000
GIFWRITE_3BIT 0x00030000
GIFWRITE_4BIT 0x00040000
GIFWRITE_5BIT 0x00050000
GIFWRITE_6BIT 0x00060000
GIFWRITE_7BIT 0x00070000
GIFWRITE_8BIT 0x00080000
savejpgex() modes
JPGSEQ 0
JPGPROG 1
JPGSEQOPT 2
JPGSAVETHUMBNAIL 0x0010
JPGSEQTN 0x0010
JPGPROGTN 0x0011
JPGSEQOPTTN 0x0012
loadjpg() conversion modes
YCC_TO_RGB 0
RGB_TO_RGB 1
DONT_CARE 2
YCCK_TO_RGB 3
CMYK_TO_RGB 4
RGBA_TO_RGB 5
savepngex() modes
PNGINTERLACE 1
PNGALLFILTER 0
PNGALLFILTERS 0
PNGNOFILTER 2
PNGSUBFILTER 4
PNGUPFILTER 6
PNGAVGFILTER 8
PNGPAETHFILTER 10
PNGREG 0
PNGTRANSCOLOR 1
TGAUNC 0
TGARLE 1
savetif() defines
TIFUNC 0
TIFLZW 1
TIFPB 2
TIFG3 3
TIFG4 4
TIFFAX 5
TIFJPG6 6
TIFJPG 7
TIFF_WRITE_ONE_STRIP 0x0010 Write TIFF file as a single strip
TIFF_WRITE_FILLORDER_TWO 0x0020 Write TIFF file with FillOrder = 2
TIFF_WRITE_MULTIFILES_NO_BACKUP 0x0040 Write multipage TIFF file without making a backup first
Victor Extended version info
VIC_VS_STATIC_RTL 1 Uses static C run-time lib, 0 => uses MSVCRTxx.DLL
VIC_VS_THREAD_SAFE 2 Multithread safe, 0=> not multithread safe
VIC_VS_RELEASE 4 Release version, 0 => prerelease (beta) version
VIC_VS_EVAL_LIB 8 Evaluation version, 0 => not evaluation version
24-bit RGB display methods (viewimageex())
VIEWOPTPAL 0
VIEWDITHER 1
VIEWSCATTER 2
TW_DONTCARE 0xffff
TWSS_NONE 0
Return codes
NO_ERROR 0 No error
BAD_BPP -26 Bits per pixel not supported
BAD_RANGE -1 Range error
BAD_DIB -12 Device independent bitmap is compressed
BAD_DSK -3 Disk full, file not written
BAD_FAC -5 Non-dimensional variable out of range
BAD_HANDLE -68 Handle not valid
BAD_MEM -14 Insufficient memory for function
BAD_OPN -4 Filename not found
BAD_BMP -27 Unreadable BMP format
BAD_BPS -8 TIF bits per sample not supported
BAD_CMP -9 Unreadable compression scheme
BAD_CRT -10 Cannot create file
BAD_DATA -62 File contains invalid data
BAD_FTPE -11 Unknown file format
BAD_JPEG -43 Unreadable JPEG format
BAD_PIW -15 Not PIW format
BAD_PCX -16 Unreadable PCX format
BAD_PNG -63 Unreadable PNG format
BAD_PNG_CMP -64 PNG compressor error
BAD_GIF -17 Unreadable GIF format
GIF_NOFRAME -71 GIF frame not found
BAD_TGA -25 Unreadable TGA format
BAD_TIFF -6 Unreadable TIF format
TIFF_NOPAGE -51 TIF page not found
TIFF_MOTYPE -69 Can't append an Intel-type TIF to a Motorola-type TIF
BAD_TN_SIZE -70 Thumbnail size out of range
BAD_DIM -73 Image format does not support width or length > 65535
Hardware error codes
PRT_ERR -18 Print error
PRT_BUSY -41 Printimage() is busy
SCAN_ERR -19 Scanner error
BAD_DIGI_MEM -72 Insufficient digitizer memory for selected mode
NO_ACK -65 No ACK from digitizer
NO_DIG -2 Digitizer board not detected
VMODE_ERR -13 Invalid video mode
COM_ERR -31 Serial data reception error
BAD_COM -32 No data from COM port
NO_DEV_DATA -33 No data from device
TIMEOUT -34 Function timed out
Scanner SCAN_NOTREADYADF error codes
SCAN_UNLOAD -45 paper could not be unloaded from ADF
SCAN_LIDUP -46 ADF lid was opened
SCAN_NOPAPER -47 ADF bin is empty
SCAN_NOADF -48 ADF is not connected
SCAN_NOTREADY -49 ADF is connected but not ready
Twain image acquisition errors
TWAIN_FIRST_ERR -54 TWAIN_NOWND
TWAIN_LAST_ERR -67 TWAIN_STOP_SCAN
Twain Informational
TWAIN_SCAN_CANCEL -60 User cancelled scan
TWAIN_BUSY -61 Twain function is busy
TWAIN_NO_PAPER -66 Auto feeder is empty
TWAIN_STOP_SCAN -67 Stop scanning images
Critical errors
TWAIN_NOWND -54 Could not create Twain parent window
TWAIN_NODSM -55 Could not open Twain Source Manager
TWAIN_NODS -56 Could not open Twain Data Source
TWAIN_ERR -57 Twain image acquisition error
TWAIN_NOMATCH -58 None of the elements in two lists were equal
TWAIN_BAD_DATATYPE -59 Data type mismatch
Windows related
BAD_LOCK -40 Could not lock memory (invalid handle or memory discarded)
BAD_IBUF -42 Invalid image buffer address
BAD_PTR -52 Pointer does not point at readable/writable memory
Obsolete
TOO_CPLX -44 Image is too complex to complete operation
NOT_AVAIL -50 Function not available due to missing module
LZW_DISABLED -53 LZW functionality disabled
Jpeg extended error codes (available when rcode == BAD_JPEG)
JPG_BAD_PRECISION -100 Sample precision is not 8
JPG_BAD_EOF -101 Unexpected End Of File
JPG_BAD_RESTART -102 Reset marker could not be found
JPG_INVALID_MARKER -103 Invalid marker found in the image data
JPG_READ_ERR -104 Error reading data from the file
JPG_INVALID_DATA -105 Invalid data found in JPEG file
JPG_BAD_COMPINFO -106 Component info out of bounds
JPG_BAD_BLOCKNO -107 Blocks in an MCU is > 10
JPG_BAD_BPPIXEL -108 Bits per sample is not 8
JPG_BAD_COMPNO -109 Invalid number of components
JPG_BAD_FTYPE -110 File type not SOF0 or SOF1
JPG_BAD_EOI -111 Unexpected End Of Image
JPG_BAD_JFIF -112 File is not JPEG JFIF
JPG_BAD_SCAN_PARAM -113 Bad progressive JPEG scan parameter
JPG_BAD_MEM -114 Out of memory
JPG_NO_DISK_SPACE -115 Out of disk space
Png extended error codes (available when rcode == BAD_PNG)
PNG_ERR_UNK_CRIT_CHK -100 Unknown critical chunk
PNG_ERR_TOO_FEW_IDATS -101 Not enough IDATs for image
PNG_ERR_INV_IHDR_CHK -102 Invalid IHDR chunk
PNG_ERR_INV_BITDEPTH -103 Invalid bit depth in IHDR
PNG_ERR_INV_COLORTYPE -104 Invalid color type in IHDR
PNG_ERR_INV_BITCOL -105 Invalid color type/bit depth combo in IHDR
PNG_ERR_INV_INTERLACE -106 Invalid interlace method in IHDR
PNG_ERR_INV_COMP -107 Invalid compression method in IHDR
PNG_ERR_INV_FILTER -108 Invalid filter method in IHDR
PNG_ERR_IMAGE_SIZE -109 Invalid image size in IHDR
PNG_ERR_BAD_SIG -110 Bad PNG signature
PNG_ERR_BAD_CRC -111 Bad CRC value
PNG_ERR_TOO_MUCH_DATA -112 Extra data at end of file
PNG_ERR_EARLY_EOF -113 Unexpected End Of File
PNG_ERR_MEM_ERR -114 Memory error
PNG_ERR_DECOMPRESSION -115 Decompression error
PNG_ERR_COMPRESSION -116 Compression error
PNG_ERR_NO_DISK_SPACE -117 Out of disk space
TIFF extended error codes (available when rcode == BAD_TIFF)
TIF_INVALID_DATA -100 Invalid data found in TIF file
TIF_READ_ERR -101 Error reading data from the file
TIF_BAD_EOF -102 Unexpected End Of File
TIF_G4_COMPLEX -103 Trans point arrays not large enough