Save as picture

This is a discussion on Save as picture within the C++ Programming forums, part of the General Programming Boards category; Hallo, I need to save the output from a program Iím making as a picture file. The file format is ...

  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, 09: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21