Twain.ImageInfo
---------------

Queries image details for last scanned image.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Twain](component_Twain.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Twain.ImageInfo"; Selector ) 

**MBS**( **"Twain.ImageInfo";** /\* Queries image details for last scanned image. \*/  
**$Selector**) /\* Which information you want to have.e.g. "Width" \*/ 

### 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:  
| XResolution | Horizontal resolution. In pixels per inch. |
|---|---|
| YResolution | Vertical resolution. In pixels per inch. |
| ImageWidth | How wide, in pixels, the entire image to be transferred is. |
| ImageLength | How tall/long, in pixels, the image to be transferred is. |
| SamplesPerPixel | The 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. |
| BitsPerSample | For 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. |
| BitsPerPixel | The 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. |
| Planar | Whether image is planar. If SamplesPerPixel &gt; 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. |
| PixelType | This 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. |
| Compression | The compression method used to process the data being transferred. Default is no compression. |

### Example Databases

- [Win Only/Scanning/Twain](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Scanning/Twain.shtml#6ScriptAnchor_)

This function checks for a license.

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

  
[Twain.GetUIVisible](TwainGetUIVisible.md) - [Twain.Initialize](TwainInitialize.md)

[HTML Version](TwainImageInfo.shtml)