You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Color Depth Conversion & Colors Reduction > ConvertTo1Bpp > ConvertTo1Bpp Method (Integer, Byte)
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.ConvertTo1Bpp Method (Integer, Byte)

Converts a GdPicture image to a 1-bit BW indexed color image specifying a threshold value. 

The color table has 2 entries: 1 Black & 1 White.

C#
public GdPictureStatus ConvertTo1Bpp(
    int ImageID, 
    Byte Threshold
);
Visual Basic
Public Function ConvertTo1Bpp(
    ByVal ImageID As Integer, 
    ByVal Threshold As Byte
) As GdPictureStatus
Parameters
Parameters 
Description 
ImageID 
GdPicture Image Identifier.  
Threshold 
Value between [1 and 254] The medium value is 128 which means '50%'.
pixel lighter than 50% => become white, darker => become black.  
Returns

A member of the GdPictureStatus enumeration.

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