1 / 2

PPM file format

PPM file format. Name ppm - portable pixmap file format Definitions A "magic number" for identifying the file type. A ppm file's magic number is the two characters "P3" or “P6”. Whitespace (blanks, TABs, CRs, LFs). A width, formatted as ASCII characters in decimal.

chung
Download Presentation

PPM file format

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PPM file format • Name • ppm - portable pixmap file format • Definitions • A "magic number" for identifying the file type. A ppm file's magic number is the two characters "P3" or “P6”. • Whitespace (blanks, TABs, CRs, LFs). • A width, formatted as ASCII characters in decimal. • A height, again in ASCII decimal. • The maximum color-component value, again in ASCII decimal. • Width * height pixels, each three ASCII decimal values between 0 and the specified maximum value, starting at the top-left corner of the pixel map, proceeding in normal English reading order. The three values for each pixel represent red, green, and blue, respectively. • Characters from a "#" to the next end-of-line are ignored (comments). • No line should be longer than 70 characters.

  2. Sample Header P3 <-- Image format type # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) <-- Comment 160 120 <-- 160 columns (width) and 120 rows (height) of image 255 <-- Max pixel value • 45 45 45 45 45 49 49 49 57 57 57 65 65 65 85 85 85 121 121 121 . . .

More Related