Home > Software engineering >  MFC, 2012, 1 d or 2 d Array into RGB image is displayed in the Static control
MFC, 2012, 1 d or 2 d Array into RGB image is displayed in the Static control

Time:10-04

As title,
Someone has a solution, a deposit has good RGB image array, output on the Static controls directly?

Ex:
Unsigned int width=16, height=16;//picture size=16 x16
Unsigned int R [256];
Unsigned int G [256];
Unsigned int B [256];

????? - & gt; Output on the Static???????


Now know that a good CImageCtrl class libraries, but tried to view can only be used in the 8 bit or 256 gray-scale:
CImageCtrl: : Load ( const BYTE data [],
Const UINT width,
Const UINT height,
Const PixelFormat format)

I present the main color, hope to solve!

CodePudding user response:

Figure is not big; Direct SetPixel ()

CodePudding user response:

Excuse me schlafenhamster, if further, I put the 16 x16 generative after 64 x64? 64 x64 - & gt; SetPixel ok?

CodePudding user response:

If you can put the 16 x16 exhibition in 64 x64 (interpolation algorithm), still can use SetPixel,
If not algorithm, which can be saved as a BMP first, and then SketchBitmap to 64 * 64