{"id":"image-x-macpaint","mimeType":"image/x-macpaint","name":"MacPaint Image","shortName":"MacPaint","category":"Legacy \u0026 Raster Graphics","extensions":[".mac",".pntg",".pnt",".macp"],"description":"The image/x-macpaint MIME type represents the MacPaint image format, created in 1984 by Bill Atkinson for the original Apple Macintosh. As one of the first widely used raster graphics formats for personal computers, it is heavily tied to the hardware limitations of the era. MacPaint images are strictly 1-bit monochrome (black and white) and have a locked, hard-coded resolution of 576 x 720 pixels—exactly matching the printable area of an 8.5 x 11-inch piece of paper on an Apple ImageWriter printer at 72 dots per inch. The format uses Apple's PackBits (Run-Length Encoding) algorithm to keep file sizes small enough to fit on a 400KB floppy disk.","seo":{"title":"image/x-macpaint MIME Type | Developer Reference for MacPaint Files","description":"Complete reference for the image/x-macpaint MIME type: MacPaint image format, early Apple Macintosh history, PackBits compression, and legacy graphics.","faqs":[{"question":"What is a MacPaint (.mac, .pntg) file?","answer":"A MacPaint file is a historic raster image format created for the original Apple Macintosh in 1984. It is strictly black and white and always measures exactly 576 by 720 pixels."},{"question":"How can I open a MacPaint file today?","answer":"Because the format is entirely obsolete, modern operating systems and web browsers cannot open it. You must use legacy-focused image viewers like XnView, GraphicConverter (on macOS), or command-line tools like ImageMagick and Netpbm."},{"question":"Why are MacPaint files always 576x720 pixels?","answer":"The format was designed specifically to be printed on the Apple ImageWriter dot-matrix printer. At 72 DPI (the exact resolution of the original Mac display), 576x720 pixels equates to exactly 8 by 10 inches, leaving a standard half-inch margin on standard US Letter paper."}]},"index":{"compression":["PackBits (Run-Length Encoding)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Historical Apple Macintosh Archival","Early 1980s Digital Art Preservation","Retro UI/UX Academic Research"]},"technical":{"magicBytes":{"hex":"None (Relies on classic Mac OS 'PNTG' OSType)","ascii":"None"},"container":"Raw pixel payload with a 512-byte pattern header","compressionAlgorithm":["PackBits (Apple RLE)"],"colorDepth":["1-bit (Monochrome)"],"transparency":false,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":false},"alphaChannel":false,"progressiveLoading":false,"hdrSupport":false},"history":{"developer":"Apple Computer, Inc. (Bill Atkinson)","released":"1984","specification":"Inside Macintosh, Volume I (Historical)"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"GraphicConverter","logo":""},{"name":"XnView","logo":""},{"name":"ImageMagick","logo":"image-magic.webp"},{"name":"Netpbm (macptopbm)","logo":""}],"conversion":{"convertTo":["png","pbm","bmp","tiff"],"convertFrom":[]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/x-macpaint"}],"htmlAccept":"image/x-macpaint, .mac, .pntg, .pnt","fileDetection":["MacPaint files do not have standard 'magic bytes' in the file header.","Historically, the classic Mac OS identified them via the Resource Fork using the file Type code 'PNTG'.","In modern operating systems without resource forks, parsers look at the first 512 bytes (the header block). This block often contains the 38 customized 8x8 pixel patterns used by the MacPaint application, padded with zeros. The actual image payload (720 scanlines of PackBits-compressed data) begins precisely at byte 512."]},"prosCons":{"pros":["Profoundly historically significant as the format that introduced millions to the concept of bitmap digital painting","Extremely simple PackBits compression makes it easy for emulator developers or archivists to write parsers from scratch in under an hour"],"cons":["Severely limited: strictly black and white, and hard-locked to exactly 576 x 720 pixels","Lack of standard magic bytes makes programmatic file sniffing unreliable on modern filesystems without relying on the file extension","Completely obsolete and unsupported by modern web browsers or consumer image viewers"]},"specifications":{"url":"https://www.nationalarchives.gov.uk/PRONOM/fmt/430","rfc":"","mimeAliases":["image/macpaint","application/x-macpaint"]},"developerSnippets":{"python":"import magic\n# Libmagic may struggle to identify MacPaint files without extensions due to the lack of strong magic bytes.\nprint(magic.from_file('vintage.mac', mime=True)) # May output 'application/octet-stream'","nodejs":"const fs = require('fs');\n// Structural detection for MacPaint is difficult. \n// You must rely heavily on file extensions (.mac, .pntg) \n// or parse the PackBits stream starting at offset 512 to validate it unpacks to exactly 576 * 720 bits (51840 bytes).","go":"import (\n    \"net/http\"\n    \"strings\"\n)\n// Native Go HTTP detection will not recognize MacPaint.\n// isMacPaint := strings.HasSuffix(strings.ToLower(filename), \".mac\") || strings.HasSuffix(strings.ToLower(filename), \".pntg\")","php":"$mime = mime_content_type('vintage.mac');\necho $mime; // Standard PHP setups will likely return 'application/octet-stream'"},"relatedFormats":["pbm","tiff","bmp","pict"]}
