What is the difference between .xpm and .pgm?
- Extension
- .xpm
- .pgm
- Format
- Text
- Binary
- Category
- Raster Image
- Raster Image
- Developer
- X Consortium
- Jef Poskanzer
- Description
- The XPM (X11 Pixmap Graphic) file format is a plain text file format used to store pixmap images, which are pixel-based graphics. It is designed for use with the X Window System, commonly used in Unix and Linux environments. XPM files define images in a structured format, using ASCII text to describe each pixel's color and location within the image. This format supports both monochrome and color images and allows for the definition of custom color palettes.
- A PGM file is a grayscale image file saved in the portable gray map (PGM) format and encoded with one or two bytes (8 or 16 bits) per pixel. It contains header information and a grid of numbers that represent different shades of gray from black (0) to white (up to 65,536). PGM files are typically stored in ASCII text format, but also have a binary representation.
- MIME Type
- image/x-xbitmap
- image/x-portable-graymap
- Sample
- sample.xpm
- sample.pgm
- Wikipedia
- .xpm on Wikipedia
- .pgm on Wikipedia