You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > TWAIN Features > TwainSetPixelFlavor Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.TwainSetPixelFlavor Method

Try to specify the pixel 'flavor' (0 is black or white). 

CHOCOLATE means this pixel represents the darkest data value that can be generated by the device (the darkest available optical value may measure greater than 0). 

VANILLA means this pixel represents the lightest data value that can be generated by the device (the lightest available optical value may measure greater than 0).

C#
public Boolean TwainSetPixelFlavor(
    TwainPixelFlavor PixelFlavor
);
Visual Basic
Public Function TwainSetPixelFlavor(
    ByVal PixelFlavor As TwainPixelFlavor
) As Boolean
Parameters
Parameters 
Description 
PixelFlavor 
A member of the TwainPixelFlavor enumeraion.  
Returns

True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error.

Before using this function check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN) 

To get the TWAIN state, use the TwainGetState() function.

What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.