Thread: what api should i look into for reading from picture files?

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    38

    Smile what api should i look into for reading from picture files?

    Today marks the third month since I started teaching myself c++, and to commemorate this milestone I want to challenge myself. I'm wanting to write a program that will flash back and forth between two pictures and find the differences between them. What should I start looking into to be able to do this? How do I access the information inside the picture file? Right now I'm at the level of the c++ made easy tutorials on this site and I've started a little opengl

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    Well i would suggest SDL, only because its the only one i ever learnt with any fluency and it has a wealth of powerful features that will be useful as you develop, but that does make it a little complicated, relatively speaking, i mean it can appear a bit tricky to get started with but you can find lots of good tutorials.
    The image file loading is simple and after learning a few things about pixel handling you will be able to parse image files using it.

    I definitely would not recommend you use openGL for this, thats like swatting a (large-ish) fly with a mallet. Learn a simpler API to get the understanding of simpler graphics.
    Last edited by rogster001; 11-24-2010 at 07:10 AM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    38
    Oh, no. I wasn't planning on using opengl. I was just trying to give an idea of what skill level I'm at right now. Considering I joined two years ago, does it make me a procrastinator that I just now started trying to learn again?
    Last edited by ashinms; 11-24-2010 at 08:14 AM.

  4. #4
    Nasal Demon Xupicor's Avatar
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    179
    What do you mean by "flash back and forth between two pictures"?
    You can also use GD to work with images, I'd say finding a per-pixel difference between two files and then outputting a file based on one of them with different pixels marked with a, say, light-green colour should be fairly easy to do. Or maybe you thought about more advanced concept?

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    38
    No, more complex. The concept is to see how far particular objects move between two pictures taken slightly apart from each other. Closer objects would appear to move more than farther away. The idea is that the program could tell distance, and possibly create 3d objects similar to how photosynth works.... But that would be a little later on....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Application in Nt Native Api
    By sousasamir in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 01-30-2009, 06:41 PM
  2. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 06:55 AM
  3. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 08:36 AM
  4. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM

Tags for this Thread