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
Post a Comment