Thread: need for an image saving code (e.g. BMP)

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    7

    need for an image saving code (e.g. BMP)

    Hello everyone


    I have an urgent need for a code that saves an image data to a file readable by any image viewer. I assume a simple format would be BMP but there are probably others, too. The reason that I'm asking here is that probably some of you might have a code that does it and would like to share it with me. I'm compiling and running the program on a computer where I can't install anything, so any installable library wouldn't be the answer. The images would be pretty "ordinary" I guess, 24 bit with no alpha channel.

    I haven't found it by googling. Thank you very much if any of you can do this simple favor.


    Let me just add that this is not a homework assignment or anything like that (like I said, any commonly readable 24 bit format is good) but my personal project. However, it would make it a lot easier if someone could point me to a right place where I can find this part of it ready (because saving an image is an old trick). I also understand there are people who don't want to give away things that one can make by himself.
    Last edited by apawamajawa; 08-13-2011 at 10:19 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    What?
    You mean googling "BMP source code" didn't show anything useful?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    7
    Alright, I didn't try that one, and when I did, there was one code that worked with very little modification. Thanks Salem!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. saving bmp image files
    By aniramg69 in forum C Programming
    Replies: 10
    Last Post: 12-30-2008, 10:08 AM
  2. Image acquisition code
    By ejohns85 in forum C Programming
    Replies: 14
    Last Post: 08-24-2006, 11:36 PM
  3. Saving code?
    By superpickle in forum C Programming
    Replies: 6
    Last Post: 05-21-2006, 12:19 PM
  4. Saving ASCII code
    By NavyBlue in forum C Programming
    Replies: 1
    Last Post: 11-12-2002, 12:30 AM
  5. How to write a C code to load an image file.
    By dv007 in forum C Programming
    Replies: 4
    Last Post: 05-25-2002, 05:27 PM