need a simple code to read a PPM file and store its R,G,B in Three arrays

This is a discussion on need a simple code to read a PPM file and store its R,G,B in Three arrays within the C Programming forums, part of the General Programming Boards category; hi every one, I need a simple code to read a PPM (portable pix-map) file and store its R,G,B components ...

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    need a simple code to read a PPM file and store its R,G,B in Three arrays

    hi every one,
    I need a simple code to read a PPM (portable pix-map) file and store its R,G,B components in Three arrays.
    Images are all 256*256 and I want this code to be simple without using any Structure.
    I am new at coding in C language and hence I don't understand a lot.
    can you please post a simple code with comments on how it works.
    I just know about arrays,pointers,files but I don't know structures.
    thanks

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,422
    C Board - Announcements in Forum : C Programming
    You need to make an effort yourself.

    You attempt, we help - that's the deal.

    What this site ISN'T is a "code-on-demand" service.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you help me about tolower() in file
    By nctar in forum C Programming
    Replies: 7
    Last Post: 05-12-2010, 10:04 AM
  2. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  5. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 02:58 PM

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