Interface
ILeptonicaApiSignatures

The exported leptonica api signatures.

Definition

Namespace:Tesseract.Interop

Assembly:Telerik.Windows.Documents.TesseractOcr.dll

Syntax:

cs-api-definition
public interface ILeptonicaApiSignatures

Methods

boxDestroy(ref nint)

Declaration

cs-api-definition
void boxDestroy(ref nint box)

Parameters

box

nint

boxGetGeometry(HandleRef, out int, out int, out int, out int)

Declaration

cs-api-definition
int boxGetGeometry(HandleRef box, out int px, out int py, out int pw, out int ph)

Parameters

box

HandleRef

px

int

py

int

pw

int

ph

int

Returns

int

boxaDestroy(ref nint)

Declaration

cs-api-definition
void boxaDestroy(ref nint box)

Parameters

box

nint

boxaGetBox(HandleRef, int, PixArrayAccessType)

Declaration

cs-api-definition
nint boxaGetBox(HandleRef boxa, int index, PixArrayAccessType accesstype)

Parameters

boxa

HandleRef

index

int

accesstype

PixArrayAccessType

Returns

nint

boxaGetCount(HandleRef)

Declaration

cs-api-definition
int boxaGetCount(HandleRef boxa)

Parameters

boxa

HandleRef

Returns

int

pixAddGray(HandleRef, HandleRef, HandleRef)

Declaration

cs-api-definition
nint pixAddGray(HandleRef pixd, HandleRef pixs1, HandleRef pixs2)

Parameters

pixd

HandleRef

pixs1

HandleRef

pixs2

HandleRef

Returns

nint

pixBackgroundNormFlex(HandleRef, int, int, int, int, int)

Declaration

cs-api-definition
nint pixBackgroundNormFlex(HandleRef pixs, int sx, int sy, int smoothx, int smoothy, int delta)

Parameters

pixs

HandleRef

sx

int

sy

int

smoothx

int

smoothy

int

delta

int

Returns

nint

pixClone(HandleRef)

Declaration

cs-api-definition
nint pixClone(HandleRef pix)

Parameters

pix

HandleRef

Returns

nint

pixCloseGray(HandleRef, int, int)

Declaration

cs-api-definition
nint pixCloseGray(HandleRef pixs, int hsize, int vsize)

Parameters

pixs

HandleRef

hsize

int

vsize

int

Returns

nint

pixCombineMasked(HandleRef, HandleRef, HandleRef)

Declaration

cs-api-definition
int pixCombineMasked(HandleRef pixd, HandleRef pixs, HandleRef pixm)

Parameters

pixd

HandleRef

pixs

HandleRef

pixm

HandleRef

Returns

int

pixConvertRGBToGray(HandleRef, float, float, float)

Declaration

cs-api-definition
nint pixConvertRGBToGray(HandleRef pix, float rwt, float gwt, float bwt)

Parameters

pix

HandleRef

rwt

float

gwt

float

bwt

float

Returns

nint

pixConvertTo8(HandleRef, int)

Declaration

cs-api-definition
nint pixConvertTo8(HandleRef pix, int cmapflag)

Parameters

pix

HandleRef

cmapflag

int

Returns

nint

pixCreate(int, int, int)

Declaration

cs-api-definition
nint pixCreate(int width, int height, int depth)

Parameters

width

int

height

int

depth

int

Returns

nint

pixDeskewGeneral(HandleRef, int, float, float, int, int, out float, out float)

Declaration

cs-api-definition
nint pixDeskewGeneral(HandleRef pix, int redSweep, float sweepRange, float sweepDelta, int redSearch, int thresh, out float pAngle, out float pConf)

Parameters

pix

HandleRef

redSweep

int

sweepRange

float

sweepDelta

float

redSearch

int

thresh

int

pAngle

float

pConf

float

Returns

nint

pixDestroy(ref nint)

Declaration

cs-api-definition
void pixDestroy(ref nint pix)

Parameters

pix

nint

pixDestroyColormap(HandleRef)

Declaration

cs-api-definition
int pixDestroyColormap(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixDilate(HandleRef, HandleRef, HandleRef)

Declaration

cs-api-definition
nint pixDilate(HandleRef pixd, HandleRef pixs, HandleRef sel)

Parameters

pixd

HandleRef

pixs

HandleRef

sel

HandleRef

Returns

nint

pixDisplayWrite(HandleRef, int)

Declaration

cs-api-definition
int pixDisplayWrite(HandleRef pixs, int reduction)

Parameters

pixs

HandleRef

reduction

int

Returns

int

pixEndianByteSwap(HandleRef)

Declaration

cs-api-definition
int pixEndianByteSwap(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixEqual(HandleRef, HandleRef, out int)

Declaration

cs-api-definition
int pixEqual(HandleRef pix1, HandleRef pix2, out int same)

Parameters

pix1

HandleRef

pix2

HandleRef

same

int

Returns

int

pixErodeGray(HandleRef, int, int)

Declaration

cs-api-definition
nint pixErodeGray(HandleRef pixs, int hsize, int vsize)

Parameters

pixs

HandleRef

hsize

int

vsize

int

Returns

nint

pixFindSkew(HandleRef, out float, out float)

Declaration

cs-api-definition
int pixFindSkew(HandleRef pixs, out float pangle, out float pconf)

Parameters

pixs

HandleRef

pangle

float

pconf

float

Returns

int

pixGammaTRCMasked(HandleRef, HandleRef, HandleRef, float, int, int)

Declaration

cs-api-definition
nint pixGammaTRCMasked(HandleRef pixd, HandleRef pixs, HandleRef pixm, float gamma, int minval, int maxval)

Parameters

pixd

HandleRef

pixs

HandleRef

pixm

HandleRef

gamma

float

minval

int

maxval

int

Returns

nint

pixGetColormap(HandleRef)

Declaration

cs-api-definition
nint pixGetColormap(HandleRef pix)

Parameters

pix

HandleRef

Returns

nint

pixGetData(HandleRef)

Declaration

cs-api-definition
nint pixGetData(HandleRef pix)

Parameters

pix

HandleRef

Returns

nint

pixGetDepth(HandleRef)

Declaration

cs-api-definition
int pixGetDepth(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixGetHeight(HandleRef)

Declaration

cs-api-definition
int pixGetHeight(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixGetInputFormat(HandleRef)

Declaration

cs-api-definition
ImageFormat pixGetInputFormat(HandleRef pix)

Parameters

pix

HandleRef

Returns

ImageFormat

pixGetResolution(HandleRef, out int, out int)

Declaration

cs-api-definition
int pixGetResolution(HandleRef pix, out int xres, out int yres)

Parameters

pix

HandleRef

xres

int

yres

int

Returns

int

pixGetWidth(HandleRef)

Declaration

cs-api-definition
int pixGetWidth(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixGetWpl(HandleRef)

Declaration

cs-api-definition
int pixGetWpl(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixGetXRes(HandleRef)

Declaration

cs-api-definition
int pixGetXRes(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixGetYRes(HandleRef)

Declaration

cs-api-definition
int pixGetYRes(HandleRef pix)

Parameters

pix

HandleRef

Returns

int

pixHMT(HandleRef, HandleRef, HandleRef)

Declaration

cs-api-definition
nint pixHMT(HandleRef pixd, HandleRef pixs, HandleRef sel)

Parameters

pixd

HandleRef

pixs

HandleRef

sel

HandleRef

Returns

nint

pixInvert(HandleRef, HandleRef)

Declaration

cs-api-definition
nint pixInvert(HandleRef pixd, HandleRef pixs)

Parameters

pixd

HandleRef

pixs

HandleRef

Returns

nint

pixOpenGray(HandleRef, int, int)

Declaration

cs-api-definition
nint pixOpenGray(HandleRef pixs, int hsize, int vsize)

Parameters

pixs

HandleRef

hsize

int

vsize

int

Returns

nint

pixOtsuAdaptiveThreshold(HandleRef, int, int, int, int, float, out nint, out nint)

Declaration

cs-api-definition
int pixOtsuAdaptiveThreshold(HandleRef pix, int sx, int sy, int smoothx, int smoothy, float scorefract, out nint ppixth, out nint ppixd)

Parameters

pix

HandleRef

sx

int

sy

int

smoothx

int

smoothy

int

scorefract

float

ppixth

nint

ppixd

nint

Returns

int

pixRead(string)

Declaration

cs-api-definition
nint pixRead(string filename)

Parameters

filename

string

Returns

nint

pixReadFromMultipageTiff(string, ref int)

Declaration

cs-api-definition
nint pixReadFromMultipageTiff(string filename, ref int offset)

Parameters

filename

string

offset

int

Returns

nint

pixReadMem(byte*, int)

Declaration

cs-api-definition
nint pixReadMem(byte* data, int length)

Parameters

data

byte*

length

int

Returns

nint

pixReadMemTiff(byte*, int, int)

Declaration

cs-api-definition
nint pixReadMemTiff(byte* data, int length, int page)

Parameters

data

byte*

length

int

page

int

Returns

nint

pixRotate(HandleRef, float, RotationMethod, RotationFill, int, int)

Declaration

cs-api-definition
nint pixRotate(HandleRef pixs, float angle, RotationMethod type, RotationFill fillColor, int width, int heigh)

Parameters

pixs

HandleRef

angle

float

type

RotationMethod

fillColor

RotationFill

width

int

heigh

int

Returns

nint

pixRotate90(HandleRef, int)

Declaration

cs-api-definition
nint pixRotate90(HandleRef pixs, int direction)

Parameters

pixs

HandleRef

direction

int

Returns

nint

pixRotateAMGray(HandleRef, float, byte)

Declaration

cs-api-definition
nint pixRotateAMGray(HandleRef pixs, float angle, byte grayval)

Parameters

pixs

HandleRef

angle

float

grayval

byte

Returns

nint

pixRotateOrth(HandleRef, int)

Declaration

cs-api-definition
nint pixRotateOrth(HandleRef pixs, int quads)

Parameters

pixs

HandleRef

quads

int

Returns

nint

pixSauvolaBinarize(HandleRef, int, float, int, out nint, out nint, out nint, out nint)

Declaration

cs-api-definition
int pixSauvolaBinarize(HandleRef pix, int whsize, float factor, int addborder, out nint ppixm, out nint ppixsd, out nint ppixth, out nint ppixd)

Parameters

pix

HandleRef

whsize

int

factor

float

addborder

int

ppixm

nint

ppixsd

nint

ppixth

nint

ppixd

nint

Returns

int

pixSauvolaBinarizeTiled(HandleRef, int, float, int, int, out nint, out nint)

Declaration

cs-api-definition
int pixSauvolaBinarizeTiled(HandleRef pix, int whsize, float factor, int nx, int ny, out nint ppixth, out nint ppixd)

Parameters

pix

HandleRef

whsize

int

factor

float

nx

int

ny

int

ppixth

nint

ppixd

nint

Returns

int

pixScale(HandleRef, float, float)

Declaration

cs-api-definition
nint pixScale(HandleRef pixs, float scalex, float scaley)

Parameters

pixs

HandleRef

scalex

float

scaley

float

Returns

nint

pixScaleResolution(HandleRef, float, float)

Declaration

cs-api-definition
int pixScaleResolution(HandleRef pix, float xscale, float yscale)

Parameters

pix

HandleRef

xscale

float

yscale

float

Returns

int

pixSetColormap(HandleRef, HandleRef)

Declaration

cs-api-definition
int pixSetColormap(HandleRef pix, HandleRef pixCmap)

Parameters

pix

HandleRef

pixCmap

HandleRef

Returns

int

pixSetInputFormat(HandleRef, ImageFormat)

Declaration

cs-api-definition
int pixSetInputFormat(HandleRef pix, ImageFormat inputFormat)

Parameters

pix

HandleRef

inputFormat

ImageFormat

Returns

int

pixSetResolution(HandleRef, int, int)

Declaration

cs-api-definition
int pixSetResolution(HandleRef pix, int xres, int yres)

Parameters

pix

HandleRef

xres

int

yres

int

Returns

int

pixSetXRes(HandleRef, int)

Declaration

cs-api-definition
int pixSetXRes(HandleRef pix, int xres)

Parameters

pix

HandleRef

xres

int

Returns

int

pixSetYRes(HandleRef, int)

Declaration

cs-api-definition
int pixSetYRes(HandleRef pix, int yres)

Parameters

pix

HandleRef

yres

int

Returns

int

pixSubtract(HandleRef, HandleRef, HandleRef)

Declaration

cs-api-definition
nint pixSubtract(HandleRef pixd, HandleRef pixs1, HandleRef pixs2)

Parameters

pixd

HandleRef

pixs1

HandleRef

pixs2

HandleRef

Returns

nint

pixThresholdToBinary(HandleRef, int)

Declaration

cs-api-definition
nint pixThresholdToBinary(HandleRef pixs, int thresh)

Parameters

pixs

HandleRef

thresh

int

Returns

nint

pixThresholdToValue(HandleRef, HandleRef, int, int)

Declaration

cs-api-definition
nint pixThresholdToValue(HandleRef pixd, HandleRef pixs, int threshval, int setval)

Parameters

pixd

HandleRef

pixs

HandleRef

threshval

int

setval

int

Returns

nint

pixWrite(string, HandleRef, ImageFormat)

Declaration

cs-api-definition
int pixWrite(string filename, HandleRef handle, ImageFormat format)

Parameters

filename

string

handle

HandleRef

format

ImageFormat

Returns

int

pixaAddPix(HandleRef, HandleRef, PixArrayAccessType)

Declaration

cs-api-definition
int pixaAddPix(HandleRef pixa, HandleRef pix, PixArrayAccessType copyflag)

Parameters

pixa

HandleRef

pix

HandleRef

copyflag

PixArrayAccessType

Returns

int

pixaClear(HandleRef)

Declaration

cs-api-definition
int pixaClear(HandleRef pixa)

Parameters

pixa

HandleRef

Returns

int

pixaCreate(int)

Declaration

cs-api-definition
nint pixaCreate(int n)

Parameters

n

int

Returns

nint

pixaDestroy(ref nint)

Declaration

cs-api-definition
void pixaDestroy(ref nint pix)

Parameters

pix

nint

pixaGetCount(HandleRef)

Declaration

cs-api-definition
int pixaGetCount(HandleRef pixa)

Parameters

pixa

HandleRef

Returns

int

pixaGetPix(HandleRef, int, PixArrayAccessType)

Declaration

cs-api-definition
nint pixaGetPix(HandleRef pixa, int index, PixArrayAccessType accesstype)

Parameters

pixa

HandleRef

index

int

accesstype

PixArrayAccessType

Returns

nint

pixaReadMultipageTiff(string)

Declaration

cs-api-definition
nint pixaReadMultipageTiff(string filename)

Parameters

filename

string

Returns

nint

pixaRemovePix(HandleRef, int)

Declaration

cs-api-definition
int pixaRemovePix(HandleRef pixa, int index)

Parameters

pixa

HandleRef

index

int

Returns

int

pixcmapAddBlackOrWhite(HandleRef, int, out int)

Adds a color (black\white) if not already there returning it's index through index.

Declaration

cs-api-definition
int pixcmapAddBlackOrWhite(HandleRef cmap, int color, out int index)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

color

int

The color to add (0 for black; 1 for white)

index

int

The index of the color.

Returns

int

Returns 0 if OK; 1 on error.

pixcmapAddColor(HandleRef, int, int, int)

Adds the color to the pix color map if their is room.

Declaration

cs-api-definition
int pixcmapAddColor(HandleRef cmap, int redValue, int greenValue, int blueValue)

Parameters

cmap

HandleRef

redValue

int

greenValue

int

blueValue

int

Returns

int

Returns 0 if OK, 1 on error.

pixcmapAddNearestColor(HandleRef, int, int, int, out int)

Adds the specified color if it doesn't already exist, returning the color's index in the data array.

Declaration

cs-api-definition
int pixcmapAddNearestColor(HandleRef cmap, int redValue, int greenValue, int blueValue, out int colorIndex)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

redValue

int

The red value

greenValue

int

The green value

blueValue

int

The blue value

colorIndex

int

The index of the new color if it was added, or the existing color if it already existed.

Returns

int

Returns 0 for success, 1 for error, 2 for not enough space.

Remarks

If the color doesn't exist and there is not enough room to add a new color return the nearest color.

pixcmapAddNewColor(HandleRef, int, int, int, out int)

Adds the specified color if it doesn't already exist, returning the colors index in the data array.

Declaration

cs-api-definition
int pixcmapAddNewColor(HandleRef cmap, int redValue, int greenValue, int blueValue, out int colorIndex)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

redValue

int

The red value

greenValue

int

The green value

blueValue

int

The blue value

colorIndex

int

The index of the new color if it was added, or the existing color if it already existed.

Returns

int

Returns 0 for success, 1 for error, 2 for not enough space.

pixcmapClear(HandleRef)

Removes all colors from the color map by setting the count to zero.

Declaration

cs-api-definition
int pixcmapClear(HandleRef cmap)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

Returns

int

Returns 0 if OK, 1 on error.

pixcmapColorToGray(HandleRef, float, float, float)

Declaration

cs-api-definition
nint pixcmapColorToGray(HandleRef cmaps, float redWeight, float greenWeight, float blueWeight)

Parameters

cmaps

HandleRef

redWeight

float

greenWeight

float

blueWeight

float

Returns

nint

pixcmapContrastTRC(HandleRef, float)

Declaration

cs-api-definition
int pixcmapContrastTRC(HandleRef cmap, float factor)

Parameters

cmap

HandleRef

factor

float

Returns

int

pixcmapCopy(HandleRef)

Performs a deep copy of the color map.

Declaration

cs-api-definition
nint pixcmapCopy(HandleRef cmaps)

Parameters

cmaps

HandleRef

The pointer to the colormap instance.

Returns

nint

The pointer to the colormap, or null on error.

pixcmapCountGrayColors(HandleRef, out int)

Returns the number of unique grey colors including black and white.

Declaration

cs-api-definition
int pixcmapCountGrayColors(HandleRef cmap, out int ngray)

Parameters

cmap

HandleRef

ngray

int

Returns

int

Returns 0 if OK; 1 on error.

pixcmapCreate(int)

Creates a new colormap with the specified depth.

Declaration

cs-api-definition
nint pixcmapCreate(int depth)

Parameters

depth

int

The depth of the pix in bpp, can be 2, 4, or 8

Returns

nint

The pointer to the color map, or null on error.

pixcmapCreateLinear(int, int)

Creates a new colormap of the specified depth with equally spaced gray color values.

Declaration

cs-api-definition
nint pixcmapCreateLinear(int depth, int levels)

Parameters

depth

int

The depth of the pix in bpp, can be 2, 4, or 8

levels

int

The number of levels (must be between 2 and 2^depth

Returns

nint

The pointer to the colormap, or null on error.

pixcmapCreateRandom(int, int, int)

Creates a new colormap of the specified depth with random colors where the first color can optionally be set to black, and the last optionally set to white.

Declaration

cs-api-definition
nint pixcmapCreateRandom(int depth, int hasBlack, int hasWhite)

Parameters

depth

int

The depth of the pix in bpp, can be 2, 4, or 8

hasBlack

int

If set to 1 the first color will be black.

hasWhite

int

If set to 1 the last color will be white.

Returns

nint

The pointer to the color map, or null on error.

pixcmapDeserializeFromMemory(HandleRef, int, int)

Declaration

cs-api-definition
nint pixcmapDeserializeFromMemory(HandleRef colorData, int colorCount, int colorDataLength)

Parameters

colorData

HandleRef

colorCount

int

colorDataLength

int

Returns

nint

pixcmapDestroy(ref nint)

Destorys and cleans up any memory used by the color map.

Declaration

cs-api-definition
void pixcmapDestroy(ref nint cmap)

Parameters

cmap

nint

The pointer to the colormap instance, set to null on success.

pixcmapGammaTRC(HandleRef, float, int, int)

Declaration

cs-api-definition
int pixcmapGammaTRC(HandleRef cmap, float gamma, int minVal, int maxVal)

Parameters

cmap

HandleRef

gamma

float

minVal

int

maxVal

int

Returns

int

pixcmapGetColor(HandleRef, int, out int, out int, out int)

Gets the color at the specified index.

Declaration

cs-api-definition
int pixcmapGetColor(HandleRef cmap, int index, out int redValue, out int blueValue, out int greenValue)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

index

int

The index of the color entry.

redValue

int

The color entry's red value.

blueValue

int

The color entry's blue value.

greenValue

int

The color entry's green value.

Returns

int

Returns 0 if OK; 1 if not accessable (caller should check).

pixcmapGetColor32(HandleRef, int, out int)

Gets the color at the specified index.

Declaration

cs-api-definition
int pixcmapGetColor32(HandleRef cmap, int index, out int color)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

index

int

The index of the color entry.

color

int

The color entry as 32 bit value

Returns

int

Returns 0 if OK; 1 if not accessable (caller should check).

Remarks

The alpha channel will always be zero as it is not used in Leptonica color maps.

pixcmapGetCount(HandleRef)

Gets the number of color entries in the color map.

Declaration

cs-api-definition
int pixcmapGetCount(HandleRef cmap)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

Returns

int

Returns the number of color entries in the color map, or 0 on error.

pixcmapGetDepth(HandleRef)

Declaration

cs-api-definition
int pixcmapGetDepth(HandleRef cmap)

Parameters

cmap

HandleRef

Returns

int

Returns color maps depth, or 0 on error.

pixcmapGetFreeCount(HandleRef)

Gets the number of free color entries in the color map.

Declaration

cs-api-definition
int pixcmapGetFreeCount(HandleRef cmap)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

Returns

int

Returns the number of free color entries in the color map, or 0 on error.

pixcmapGetIndex(HandleRef, int, int, int, out int)

Gets the index of the color entry with the specified color, return 0 if found; 1 if not.

Declaration

cs-api-definition
int pixcmapGetIndex(HandleRef cmap, int redValue, int blueValue, int greenValue, out int index)

Parameters

cmap

HandleRef

redValue

int

blueValue

int

greenValue

int

index

int

Returns

int

pixcmapGetMinDepth(HandleRef, out int)

Gets the minimum pix depth required to support the color map.

Declaration

cs-api-definition
int pixcmapGetMinDepth(HandleRef cmap, out int minDepth)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

minDepth

int

Returns the minimum depth to support the colormap

Returns

int

Returns 0 if OK, 1 on error.

pixcmapGetNearestGrayIndex(HandleRef, int, out int)

Finds the index of the color entry closest to the specified color.

Declaration

cs-api-definition
int pixcmapGetNearestGrayIndex(HandleRef cmap, int val, out int index)

Parameters

cmap

HandleRef

val

int

index

int

Returns

int

Returns 0 if OK; 1 on error.

Remarks

Should only be used on gray colormaps.

pixcmapGetNearestIndex(HandleRef, int, int, int, out int)

Finds the index of the color entry closest to the specified color.

Declaration

cs-api-definition
int pixcmapGetNearestIndex(HandleRef cmap, int rVal, int bVal, int gVal, out int index)

Parameters

cmap

HandleRef

rVal

int

bVal

int

gVal

int

index

int

Returns

int

Returns 0 if OK; 1 on error.

pixcmapGetRankIntensity(HandleRef, float, out int)

Finds the index of the color entry with the rank intensity.

Declaration

cs-api-definition
int pixcmapGetRankIntensity(HandleRef cmap, float rankVal, out int index)

Parameters

cmap

HandleRef

rankVal

float

index

int

Returns

int

Returns 0 if OK; 1 on error.

pixcmapGrayToColor(int)

Declaration

cs-api-definition
nint pixcmapGrayToColor(int color)

Parameters

color

int

Returns

nint

pixcmapHasColor(HandleRef, int)

Returns 0 if the color exists in the color map; otherwise 1.

Declaration

cs-api-definition
int pixcmapHasColor(HandleRef cmap, int color)

Parameters

cmap

HandleRef

color

int

Returns

int

Returns 0 if OK; 1 on error.

pixcmapResetColor(HandleRef, int, int, int, int)

Sets a previously allocated color entry.

Declaration

cs-api-definition
int pixcmapResetColor(HandleRef cmap, int index, int redValue, int blueValue, int greenValue)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

index

int

The index of the colormap entry

redValue

int

blueValue

int

greenValue

int

Returns

int

Returns 0 if OK; 1 if not accessable (caller should check).

pixcmapSerializeToMemory(HandleRef, out int, out int, out nint, out int)

Declaration

cs-api-definition
int pixcmapSerializeToMemory(HandleRef cmap, out int components, out int colorCount, out nint colorData, out int colorDataLength)

Parameters

cmap

HandleRef

components

int

colorCount

int

colorData

nint

colorDataLength

int

Returns

int

pixcmapSetBlackAndWhite(HandleRef, int, int)

Sets the darkest color in the colormap to black, if setBlack is 1. Sets the lightest color in the colormap to white if setWhite is 1.

Declaration

cs-api-definition
int pixcmapSetBlackAndWhite(HandleRef cmap, int setBlack, int setWhite)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

setBlack

int

0 for no operation; 1 to set darket color to black

setWhite

int

0 for no operation; 1 to set lightest color to white

Returns

int

Returns 0 if OK; 1 on error.

pixcmapShiftIntensity(HandleRef, float)

Declaration

cs-api-definition
int pixcmapShiftIntensity(HandleRef cmap, float fraction)

Parameters

cmap

HandleRef

fraction

float

Returns

int

pixcmapToArrays(HandleRef, out nint, out nint, out nint)

Declaration

cs-api-definition
int pixcmapToArrays(HandleRef cmap, out nint redMap, out nint blueMap, out nint greenMap)

Parameters

cmap

HandleRef

redMap

nint

blueMap

nint

greenMap

nint

Returns

int

pixcmapToRGBTable(HandleRef, out nint, out int)

Declaration

cs-api-definition
int pixcmapToRGBTable(HandleRef cmap, out nint colorTable, out int colorCount)

Parameters

cmap

HandleRef

colorTable

nint

colorCount

int

Returns

int

pixcmapUsableColor(HandleRef, int, int, int, out int)

Checks if the color already exists or if their is enough room to add it.

Declaration

cs-api-definition
int pixcmapUsableColor(HandleRef cmap, int redValue, int greenValue, int blueValue, out int usable)

Parameters

cmap

HandleRef

The pointer to the colormap instance.

redValue

int

The red value

greenValue

int

The green value

blueValue

int

The blue value

usable

int

Returns 1 if usable; 0 if not.

Returns

int

Returns 0 if OK, 1 on error.

selCreateBrick(int, int, int, int, SelType)

Declaration

cs-api-definition
nint selCreateBrick(int h, int w, int cy, int cx, SelType type)

Parameters

h

int

w

int

cy

int

cx

int

type

SelType

Returns

nint

selCreateFromString(string, int, int, string)

Declaration

cs-api-definition
nint selCreateFromString(string text, int h, int w, string name)

Parameters

text

string

h

int

w

int

name

string

Returns

nint

selDestroy(ref nint)

Declaration

cs-api-definition
void selDestroy(ref nint psel)

Parameters

psel

nint

In this article
DefinitionMethodsboxDestroy(ref nint)boxGetGeometry(HandleRef, out int, out int, out int, out int)boxaDestroy(ref nint)boxaGetBox(HandleRef, int, PixArrayAccessType)boxaGetCount(HandleRef)pixAddGray(HandleRef, HandleRef, HandleRef)pixBackgroundNormFlex(HandleRef, int, int, int, int, int)pixClone(HandleRef)pixCloseGray(HandleRef, int, int)pixCombineMasked(HandleRef, HandleRef, HandleRef)pixConvertRGBToGray(HandleRef, float, float, float)pixConvertTo8(HandleRef, int)pixCreate(int, int, int)pixDeskewGeneral(HandleRef, int, float, float, int, int, out float, out float)pixDestroy(ref nint)pixDestroyColormap(HandleRef)pixDilate(HandleRef, HandleRef, HandleRef)pixDisplayWrite(HandleRef, int)pixEndianByteSwap(HandleRef)pixEqual(HandleRef, HandleRef, out int)pixErodeGray(HandleRef, int, int)pixFindSkew(HandleRef, out float, out float)pixGammaTRCMasked(HandleRef, HandleRef, HandleRef, float, int, int)pixGetColormap(HandleRef)pixGetData(HandleRef)pixGetDepth(HandleRef)pixGetHeight(HandleRef)pixGetInputFormat(HandleRef)pixGetResolution(HandleRef, out int, out int)pixGetWidth(HandleRef)pixGetWpl(HandleRef)pixGetXRes(HandleRef)pixGetYRes(HandleRef)pixHMT(HandleRef, HandleRef, HandleRef)pixInvert(HandleRef, HandleRef)pixOpenGray(HandleRef, int, int)pixOtsuAdaptiveThreshold(HandleRef, int, int, int, int, float, out nint, out nint)pixRead(string)pixReadFromMultipageTiff(string, ref int)pixReadMem(byte*, int)pixReadMemTiff(byte*, int, int)pixRotate(HandleRef, float, RotationMethod, RotationFill, int, int)pixRotate90(HandleRef, int)pixRotateAMGray(HandleRef, float, byte)pixRotateOrth(HandleRef, int)pixSauvolaBinarize(HandleRef, int, float, int, out nint, out nint, out nint, out nint)pixSauvolaBinarizeTiled(HandleRef, int, float, int, int, out nint, out nint)pixScale(HandleRef, float, float)pixScaleResolution(HandleRef, float, float)pixSetColormap(HandleRef, HandleRef)pixSetInputFormat(HandleRef, ImageFormat)pixSetResolution(HandleRef, int, int)pixSetXRes(HandleRef, int)pixSetYRes(HandleRef, int)pixSubtract(HandleRef, HandleRef, HandleRef)pixThresholdToBinary(HandleRef, int)pixThresholdToValue(HandleRef, HandleRef, int, int)pixWrite(string, HandleRef, ImageFormat)pixaAddPix(HandleRef, HandleRef, PixArrayAccessType)pixaClear(HandleRef)pixaCreate(int)pixaDestroy(ref nint)pixaGetCount(HandleRef)pixaGetPix(HandleRef, int, PixArrayAccessType)pixaReadMultipageTiff(string)pixaRemovePix(HandleRef, int)pixcmapAddBlackOrWhite(HandleRef, int, out int)pixcmapAddColor(HandleRef, int, int, int)pixcmapAddNearestColor(HandleRef, int, int, int, out int)pixcmapAddNewColor(HandleRef, int, int, int, out int)pixcmapClear(HandleRef)pixcmapColorToGray(HandleRef, float, float, float)pixcmapContrastTRC(HandleRef, float)pixcmapCopy(HandleRef)pixcmapCountGrayColors(HandleRef, out int)pixcmapCreate(int)pixcmapCreateLinear(int, int)pixcmapCreateRandom(int, int, int)pixcmapDeserializeFromMemory(HandleRef, int, int)pixcmapDestroy(ref nint)pixcmapGammaTRC(HandleRef, float, int, int)pixcmapGetColor(HandleRef, int, out int, out int, out int)pixcmapGetColor32(HandleRef, int, out int)pixcmapGetCount(HandleRef)pixcmapGetDepth(HandleRef)pixcmapGetFreeCount(HandleRef)pixcmapGetIndex(HandleRef, int, int, int, out int)pixcmapGetMinDepth(HandleRef, out int)pixcmapGetNearestGrayIndex(HandleRef, int, out int)pixcmapGetNearestIndex(HandleRef, int, int, int, out int)pixcmapGetRankIntensity(HandleRef, float, out int)pixcmapGrayToColor(int)pixcmapHasColor(HandleRef, int)pixcmapResetColor(HandleRef, int, int, int, int)pixcmapSerializeToMemory(HandleRef, out int, out int, out nint, out int)pixcmapSetBlackAndWhite(HandleRef, int, int)pixcmapShiftIntensity(HandleRef, float)pixcmapToArrays(HandleRef, out nint, out nint, out nint)pixcmapToRGBTable(HandleRef, out nint, out int)pixcmapUsableColor(HandleRef, int, int, int, out int)selCreateBrick(int, int, int, int, SelType)selCreateFromString(string, int, int, string)selDestroy(ref nint)
Not finding the help you need?
Contact Support