access color data array from leptonica::PIX (c++) -


i'm loading image file memory using leptonica library, tried print color bytes:

int main() {  pix* pix = pixread("e:/white.png"); // empty image testing  // print pixel color for(int row=0; row<pix->h; row++) {     for(int col=0; col<pix->w; col++) {         cout << pix->data[row*pix->w+col] << " "; // causes crash     } } } 

why crash? or what's correct way of fetching color bytes?

thanks.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -