Results 1 to 3 of 3

Thread: How to determine the ppm file type?

  1. #1
    Join Date
    Jan 2012
    Posts
    37

    How to determine the ppm file type?

    I was surfing on the internet when I came across this file called “PPM file” and its format! How to identify the PPM file? What exactly is this? What are its type?

  2. #2
    Join Date
    May 2011
    Posts
    448

    Re: How to determine the ppm file type?

    The PPM stands for the “Portable Pixel Map”. Ppm file consist of sequential order of ppm images. Image contains:
    .
    1. Magic number to identify the type. This number is of two characters. That is P6.
    2. It also includes whitespace .
    3. It has height and width specified as ASCII character in decimal system.
    4. Maximum color value is specified in ASCII .It is 65536.
    5. Each pixel is a combination of red, green and blue digit.
    6. Each sample is in binary format.
    7. The above mentioned format is one type. It is called normal ppm file. Another type of it is plain format.
    8. Plain image contains:
    9. There is only one image.
    10. It has the magic number as P3.
    11. Each sample is in decimal format with White-space before and after it.
    12. It should have at-least one character space between two samples.
    13. No line has more than 70 characters.

  3. #3
    Join Date
    Aug 2011
    Posts
    695

    Re: How to determine the ppm file type?

    If you have the PPM file then to check the file type do the following:
    1. Open the PPM file.
    2. On the first line find the two character (two byte)magic number!
    3. Now if the number you have found is P3 then it is PPM ASCII file. If it is P6 then it is PPM binary file.

Similar Threads

  1. Replies: 3
    Last Post: 12-01-2011, 02:20 AM
  2. Replies: 1
    Last Post: 16-08-2010, 05:25 PM
  3. How to determine type of video-card?
    By Claudius in forum Monitor & Video Cards
    Replies: 3
    Last Post: 13-03-2009, 03:18 PM
  4. MRxSmb - The redirector failed to determine the connection type
    By Steve White in forum Windows Server Help
    Replies: 1
    Last Post: 14-01-2009, 08:45 PM
  5. Replies: 8
    Last Post: 03-12-2008, 05:19 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,968,538.46516 seconds with 16 queries