dynarithmic / twain_library

Dynarithmic TWAIN Library, Version 5.x
Apache License 2.0
60 stars 25 forks source link

JNI without "GetPixelType" #35

Closed hebo1982 closed 2 years ago

hebo1982 commented 2 years ago

I can't find this method in jni.

How to get the current Pixel Type (Color) setting?

The DTWAIN_GetPixelType function gets the current Pixel Type (Color) and Bit Depth (Bits Per Pixel) that will be used when acquiring an image.

DTWAIN_BOOL DTWAIN_GetPixelType
dynarithmic commented 2 years ago

Try:

DTWAIN_GetCapValuesInt(source, DTwainCapabilityHandler.ICAP_PIXELTYPE, DTwainJavaAPIConstants.DTWAIN_CAPGETCURRENT);

In general, any capability can be retrieved using the family of function that are named DTWAIN_GetCapValues...(). The capabilities can be found in the Twain Specification.

hebo1982 commented 2 years ago

@dynarithmic thanks!