Data access

Functions

int Image.get_Value (int Row, int Column)
 Gets the value of a pixel in the image. More...
 
bool Image.GetImageBitsDC (int hdc)
 Gets the data from the image and puts it into the selected bitmap in the specified device context. More...
 
bool Image.GetRow (int Row, ref int Vals)
 Gets a row of pixels from the image. More...
 
int Image.GetUniqueColors (double MaxBufferSizeMB, out object Colors, out object Frequencies)
 Returns the arrays with the unique colors of the image and their frequencies. More...
 
void Image.set_Value (int Row, int Column, int pVal)
 Sets the value of a pixel in the image. More...
 
bool Image.SetImageBitsDC (int hdc)
 This function uses a bitmap selected in the specified device context handle as the data to copy into the image for which the function is called. More...
 

Properties

stdole.IPictureDisp Image.Picture [get, set]
 Gets or sets the picture object. More...
 

Detailed Description

Here is a list of methods and properties which provide access to the values of pixels. The properties and methods described here belong to Image class.

dot_inline_dotgraph_3.png

Graph description

Function Documentation

◆ get_Value()

int Image.get_Value ( int  Row,
int  Column 
)

Gets the value of a pixel in the image.

Parameters
RowThe row in the image for which the value is required.
ColumnThe column in the image for which the value is required.
Returns
The value of the specified pixel in the image.

◆ GetImageBitsDC()

bool Image.GetImageBitsDC ( int  hdc)

Gets the data from the image and puts it into the selected bitmap in the specified device context.

This function requires the width and height of the selected bitmap and the image to match. Use of this function requires advanced knowledge in windows graphics concepts and is intended for advanced users only.

Parameters
hdcThe handle to the device context.
Returns
A boolean value representing the success or failure of getting the device context handle for the image.

◆ GetRow()

bool Image.GetRow ( int  Row,
ref int  Vals 
)

Gets a row of pixels from the image.

Parameters
RowThe row of pixels you want to get from the image.
ValsAn array which will return the pixels in the specified row of the image.
Returns
A boolean value representing the success or failure of getting the row of pixels from the image.

◆ GetUniqueColors()

int Image.GetUniqueColors ( double  MaxBufferSizeMB,
out object  Colors,
out object  Frequencies 
)

Returns the arrays with the unique colors of the image and their frequencies.

For large images it's recommended to perform the operation with the smaller size of buffer to improve performance and possible RAM overuse.

Parameters
MaxBufferSizeMBThe size of buffer for calculation.
ColorsThe output array of unsigned integer type with unique colors.
FrequenciesThe output array of the same size with Colors array with the frequency of the each color.
Returns
The number of unique colors.

◆ set_Value()

void Image.set_Value ( int  Row,
int  Column,
int  pVal 
)

Sets the value of a pixel in the image.

Parameters
RowThe row in the image for which the value is required.
ColumnThe column in the image for which the value is required.
pValThe value of the specified pixel in the image.

◆ SetImageBitsDC()

bool Image.SetImageBitsDC ( int  hdc)

This function uses a bitmap selected in the specified device context handle as the data to copy into the image for which the function is called.

This function requires the image to be the same width and height as the bitmap selected in the device context. Use of this function requires advanced knowledge in windows graphics concepts and is intended for advanced users only.

Parameters
hdcThe device context handle of the device context for which the selected bitmap is to be used to copy the bits into the image used to call the function.
Returns
A boolean value representing success or failure of setting the image's bits using the bitmap selected in the specified device context.

Properties

◆ Picture

stdole.IPictureDisp Image.Picture
getset

Gets or sets the picture object.