How can i get image.bpp value from OfImage?

I  get bpp is protected member of > 'ofImage_<unsigned char>', 

love to get number bits per pixel from loaded image, some idea how to get this number?

You can get the BPP from the ofPixels which are inside every ofImage.

ofImage myImage;
myImage.load("/path/to/image.jpg");
int bpp = bikeIcon.getPixels().getBitsPerPixel();
cout << "BPP is " << bpp << endl; 

Cheers,

Joel

2 Likes