{"success":true,"data":{"ext":"ppm","name":"PPM","description":"Portable Pixmap (PPM) is a simple raster image format from the Netpbm family, originally created by Jef Poskanzer and maintained through the Netpbm project. It is used for basic image storage, conversion workflows, and as an intermediate format in graphics processing and academic software. PPM is a legacy, uncompressed format with minimal metadata, and it generally poses little security risk beyond the usual caution when handling untrusted image files.","mime":["image/x-portable-pixmap"],"risk_level":"Safe","signatures":[{"hex":"50 33","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"50 33 0A","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"50 36 0A","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["avif","bmp","cr2","cr3","dib","exr"],"usage":{"python":"def is_ppm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PPM by magic bytes.\"\"\"\n    signature = bytes([0x50, 0x33])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isPPM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x50, 0x33]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsPPM(data []byte) bool {\n    signature := []byte{0x50, 0x33}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"},"category":"Images"}}