【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.24.7 Layer::GetImageData
Contents
Description
Get the data (gray scale levels) of a bitmap graphic object.
Syntax
BOOL GetImageData( LPCSTR lpcszImageName, matrixbase & mat, int nGrayScaleBits = 8 )
Parameters
- lpcszImageName
- [input] constant pointer to a string contianing the name of the bitmap graphic object
- mat
- [output] the matrix to receive the data
- nGrayScaleBits
- [input] the number of gray scale levels to convert a non-gray scale image to before getting the data
Return
TRUE if the data was obtained else FALSE.
Examples
EX1
//assume a image object name "BMP" in the layet void Layer_GetImageData_ex1() { Layer ly = Project.ActiveLayer(); if( !ly.IsValid() ) return; string strName = "BMP"; matrix<BYTE> mm; if ( ly.GetImageData(strName, mm) ) { printf("GetNumRows() = %d\n", mm.GetNumRows()); printf("GetNumCols() = %d\n", mm.GetNumCols()); } }
Remark
See Also
Header to Included
origin.h