Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 19-05-2009
Member
 
Join Date: May 2008
Posts: 372
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 ...
Reply With Quote
  #2  
Old 19-05-2009
Member
 
Join Date: May 2008
Posts: 376
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 +
Reply With Quote
  #3  
Old 19-05-2009
Member
 
Join Date: May 2008
Posts: 372
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?
Reply With Quote
  #4  
Old 19-05-2009
Member
 
Join Date: May 2008
Posts: 376
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 .....
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "C++ Bitblt sample"
Thread Thread Starter Forum Replies Last Post
Sample for Experience Certificate Gowd Education Career and Job Discussions 6 04-05-2012 12:35 PM
Error during sample compile Agaev Windows Software 5 20-07-2010 10:24 PM
Sample Rate for Cd Mannat Hardware Peripherals 3 03-09-2009 01:09 PM
IAS Sample papers Bhave Education Career and Job Discussions 1 16-03-2009 01:35 PM
Sample Sites Using Joomla Seraphim Software Development 3 27-01-2009 06:35 PM


All times are GMT +5.5. The time now is 03:24 AM.