DISQUS

Reflections of my thoughts: http://www.codereflect.com/2007/03/how-to-save-bitmap-to-file.html

  • lumo · 2 years ago
    hi,
    i am trying to use this code for a screenshot function in my program...
    somewhere i get lost, cause i cant even get it working with an "dumb" generated data pool
    so this is what i try to save (note that w= width and h = height, i get this from screen resolution)

    cout
  • lumo · 2 years ago
    awesome, my text got cropped...
  • Gerard · 1 year ago
    Many thanks Sarath.

    It worked perfectly first time.
  • p · 1 year ago
    Thanks for the help!


    Page was indirectly useful for solving a problem I was having.
  • Ahmed · 1 year ago
    Thankx
  • J · 1 year ago
    I never imagined writing a BMP would be so simple. All I needed was the header information and basic file structure, and I adapted my own Save function. It works great so far, thanks!
  • Jimmy jones · 1 year ago
    I am a novice Win32 via C++ programmer, and I have been trying to learn about DIB's
    for a program that I'm creating. At some point I was going to have to learn about how to save bitmaps, but I couldn't find any simple examples. Your example has completely simplified the process, and saved me a lot of grief trying to sort out more complex examples just to even begin saving bmps.


    THANK YOU!
  • gl · 1 year ago
    cheers.
  • Shujjat Khan · 12 months ago
    Thank You brother......
    It worked really well..................
  • Moha · 10 months ago
    can u put pics?
  • Jim · 10 months ago
    Thanks, cut and paste worked like a dream.
  • TW · 7 months ago
    What should be the format for pBitmapBits? I have 4 channels of RGB and alpha, each with 16 bit color, how should I format it so I can pass to pBitmapBits? Can you give an example how this function should be called?
  • TW · 7 months ago
    Hi,
    Thanks for your posting.
    I tried, but how come your code didn't save the COLOR INDEX ARRAY?
    I found my color wrong, may be that's why? Please advise.

    TW
  • ced · 7 months ago
    thanks a lot for this so simple function ..... that works! Thanks