Thread: Save as picture

  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485

    Save as picture

    Hallo,

    I need to save the output from a program I’m making as a picture file. The file format is not really important; I am just looking for something which is easy to work with.

    I need to be able to set the colour for each pixel (RGB, or some other type of colour) but I have no need for the alpha channel that some formats can store.

    So my question:
    What is the easiest picture format to work with? Also, do I need to get a specialized library, or is there someone I can use which is “default”? Any links or tutorials are also greatly appreciated.

    Thanks for your time.

    Oh, forgot to mention this: Windows XP, service pack 2.

  2. #2
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    It depends on what type of file you're working with, but you don't need a specialized library. I would suggest saving the picture as a 24bit .bmp file. I'm not sure how many tutorials you will find on saving a bitmap but there are plenty about loading them. You can always work backward.
    Don't quote me on that... ...seriously

  3. #3
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    Thank you, I will look into it.

    I need it to save the output from my basic raytracer which is almost finished

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Save vs Save As.... OPENFILENAME flags
    By csonx_p in forum Windows Programming
    Replies: 16
    Last Post: 06-01-2008, 02:42 PM
  2. save and save as functions
    By willc0de4food in forum Windows Programming
    Replies: 2
    Last Post: 06-29-2005, 02:49 AM
  3. save webpage? some save some not
    By kryptkat in forum Tech Board
    Replies: 3
    Last Post: 06-07-2005, 09:21 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Major glitch losing source files with MSVC++ and WinXP
    By JasonD in forum C++ Programming
    Replies: 10
    Last Post: 08-14-2003, 12:15 PM