Twain.SetPixelType
------------------

Sets the pixel type requested on next [Twain.Acquire](TwainAcquire.md) command.

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

MBS( "Twain.SetPixelType"; Value ) 

**MBS**( **"Twain.SetPixelType";** /\* Sets the pixel type requested on next Twain.Acquire command. \*/  
**$Value**) /\* The new pixel type setting.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The new pixel type setting. | 2 |

### Result

Returns OK.

### Description

Sets the pixel type requested on next [Twain.Acquire](TwainAcquire.md) command.  
Value can be 0 for BW, 1 for Gray, 2 for RGB, 3 for Palette.  
The plugin can request als CMY (4), CMYK (5), YUV (6), YUVK (7) and CIEXYZ (8), but can't currently decode those.  
### See also

- [Twain.Acquire](TwainAcquire.md)
- [Twain.GetFileType](TwainGetFileType.md)
- [Twain.GetPixelType](TwainGetPixelType.md)
- [Twain.SetFileType](TwainSetFileType.md)

### Example Databases

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

### Blog Entries

- [MBS Filemaker Plugin, version 3.2pr5](https://www.mbsplugins.de/archive/2013-03-25/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function is free to use.

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

  
[Twain.SetPaperSize](TwainSetPaperSize.md) - [Twain.SetResolutionX](TwainSetResolutionX.md)

[HTML Version](TwainSetPixelType.shtml)