Thread: images files in c

  1. #1
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51

    Smile images files in c

    hey all!

    Can somebody provide a link so i can educate myself on how to manipulate
    image files in c, Jpeg for example as my searches dont seem to provide any
    usefull results

  2. #2
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Try www.google.com
    Then put into the search field something like, oh I don't know, jpeg file structure???

  3. #3
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51
    sorry!!
    That was a bad question.

    What i mean is i already know the way a jpeg file works....roughly, but i dont know how to open the file in c.
    I'm sure this question makes me look an idiot but nevertheless i dont know the answear so if you could shower me with your wisdom i'd be gratefull

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    >> but i dont know how to open the file in c.

    Can't you just use a FILE pointer to open it, and access the file through that? Afterall, it's a file I don't know if there are any standard functions around for playing with images specifically.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    FILE *fp = fopen("image.jpg","rb");

    Read a byte at a time, and use your knowledge of the file format to deal with it.
    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.

  6. #6
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Quote Originally Posted by the bassinvader
    if you could shower me with your wisdom i'd be gratefull
    Sorry kid, I don't have enough to go around.

  7. #7
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51
    Oh right!!!
    So i have to open it using binary!?!

    not done anything using that before. What fun lies ahead

    thanx one and all!!

    you can stop showering now

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  2. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  4. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM
  5. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM