-
C++ Bitblt sample
Hi,
I'm writing a program, I have too many bitmaps used as the program has become very large and bitmaps can also be difficult to make certain points clear.
Hence my question: Can you embed PNG images, and if so how? And if you can provide me a sample of Bitblt.
Somehow, the question was when surfing the net not really clear enough ...
I am pleased with answers or ideas ...
-
Re: C++ Bitblt sample
I think there is there no Lib: http://members.gamedev.net/lode/projects/LodePNG/ would possibly help you. Otherwise simple GDI +
-
Re: C++ Bitblt sample
Thanks for the link but if the so complicated is a PNG image process. I think this is nothing for me ... thought that is so similar to bitmaps, known as Visual Studio, and adding resources
Code:
hBmp = LoadBitmap (hInstance, TEXT ( "BITMAP NAME"));
GetObject (hBmp, sizeof (BITMAP), & Bmp);
SelectObject (hdcMem, hBmp);
BitBlt (hdc, x, y, size x, y size, hdcMem, 0, 0, SRCPAINT);
spends ... because the code is just very complicated (for me ) And very long, therefore, to ask again ... is there easy way to do it?
-
Re: C++ Bitblt sample
Well take it easy because you have just put as a parameter in the following manner:
Code:
std:: ifstream file_stream ( "C: \ \ sample.png", std:: ios_base:: binary);
if (! file_stream) (std:: cerr << "ERROR: File Not Found!"; return 1;)
std:: vector <unsigned char> image (file_stream. seekg (0, std:: ios_base:: end). tellg ());
file_stream. seekg (0, std:: ios_base:: beg). read (& image [0], image. size ());
std:: pair <unsigned long, unsigned long> size;
decodePNG (image, size. firstName, size. Second, & image [0], image. size ());
then you should have the data in just like normal image pixel bitmap that you can use .....
Page generated in 1,717,392,141.43147 seconds with 10 queries