I have a Gdiplus::Bitmap object. It's a greyscale image of known width and height. What I want to do is to load it's contents into 2D array, like
char image[width][height]
I need both Gdiplus::Bitmap (to render in Winapi window) and the char array (to perform lot of image filtering and do it relatively fast). I considered some options:
- Iterate through Gdiplus::Bitmap, pixel by pixel to load data
- Load Gdiplus::Bitmap using new Gdiplus::Bitmap(filename) but use some other library to load image from the same file to my array
- Not use Gdiplus at all and use something else to render and perform filtering on image. Unfortunatelly, I don't know if there is a better way to render image in Winapi window than Gdiplus
What is the best way?