Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Twain.ImageInfo

Queries image details for last scanned image.

Component Version macOS Windows Linux Server iOS SDK
Twain 3.1 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "Twain.ImageInfo"; Selector )   More

Parameters

Parameter Description Example
Selector Which information you want to have. "Width"

Result

Return error message or value.

Description

Queries image details for last scanned image.
Possible keys:
XResolutionHorizontal resolution. In pixels per inch.
YResolutionVertical resolution. In pixels per inch.
ImageWidthHow wide, in pixels, the entire image to be transferred is.
ImageLengthHow tall/long, in pixels, the image to be transferred is.
SamplesPerPixelThe number of samples being returned. For R-G-B, this field would be set to 3. For C-M-Y-K, 4. For Grayscale or Black and White, 1.
BitsPerSampleFor each sample, the number of bits of information. 24-bit R-G-B will typically have 8 bits of information in each sample (8+8+8). Some 8-bit color is sampled at 3 bits Red, 3 bits Green, and 2 bits Blue. Such a scheme would put 3, 3, and 2 into the first 3 elements of this array. The supplied array allows up to 8 samples. Samples are not limited to 8 bits. However, both the application and Source must simultaneously support sample sizes greater than 8 bits per color.
BitsPerPixelThe number of bits in each image pixel (or bit depth). This value is invariant across the image. 24-bit R-G-B has BitsPerPixel = 24. 40-bit C-M-Y-K has BitsPerPixel=40. 8-bit Grayscale has BitsPerPixel = 8. Black and White has BitsPerPixel = 1.
PlanarWhether image is planar. If SamplesPerPixel > 1, indicates whether the samples follow one another on a pixel-by-pixel basis (R-G-B-R-G-B-R-G-B...) as is common with a one-pass scanner or all the pixels for each sample are grouped together (complete group of R, complete group of G, complete group of B) as is common with a three-pass scanner. If the pixel-by-pixel method (also known as "chunky”) is used, the Source should set Planar = false. If the grouped method (also called "planar”) is used, the Source should set Planar = true.
PixelTypeThis is the highest categorization for how the data being transferred should be interpreted by the application. This is how the application can tell if the data is Black and White, Grayscale, or Color. Currently, the only color type defined is "tri-stimulus”, or color described by three characteristics. Most popular color description methods use tri- stimulus descriptors. For simplicity, the constant used to identify tri-stimulus color is called TWPT_RBG, for R-G-B color. There is no default for this value.
CompressionThe compression method used to process the data being transferred. Default is no compression.

Example Databases

This function checks for a license.

Created 18th August 2014, last changed 18th August 2014


Twain.GetUIVisible - Twain.Initialize