1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*ae316d1dSXin LI# $File: images,v 1.263 2024/11/10 20:44:30 christos Exp $ 4b6cee71dSXin LI# images: file(1) magic for image formats (see also "iff", and "c-lang" for 5b6cee71dSXin LI# XPM bitmaps) 6b6cee71dSXin LI# 7b6cee71dSXin LI# originally from jef@helios.ee.lbl.gov (Jef Poskanzer), 8b6cee71dSXin LI# additions by janl@ifi.uio.no as well as others. Jan also suggested 9b6cee71dSXin LI# merging several one- and two-line files into here. 10b6cee71dSXin LI# 11b6cee71dSXin LI# little magic: PCX (first byte is 0x0a) 12b6cee71dSXin LI 13b6cee71dSXin LI# Targa - matches `povray', `ppmtotga' and `xv' outputs 14b6cee71dSXin LI# by Philippe De Muyter <phdm@macqel.be> 153e41d09dSXin LI# URL: http://justsolve.archiveteam.org/wiki/TGA 16*ae316d1dSXin LI# https://en.wikipedia.org/wiki/Truevision_TGA 173e41d09dSXin LI# Reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf 18*ae316d1dSXin LI# Update: Joerg Jenderek February 2024 19*ae316d1dSXin LI# Note: called by DROID "Truevision TGA Bitmap" version 1.0 via PUID x-fmt/367 20b6cee71dSXin LI# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 213e41d09dSXin LI# ,32 or 33 (both not observed) 22b6cee71dSXin LI# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise 233e41d09dSXin LI# or theoretically 2-128 reserved for use by Truevision or 128-255 may be used for developer applications 24b6cee71dSXin LI# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs 25b6cee71dSXin LI# `xv' recognizes only a subset of the following (RGB with pixelsize = 24) 26b6cee71dSXin LI# `tgatoppm' recognizes a superset (Index may be anything) 273e41d09dSXin LI# 283e41d09dSXin LI# test of Color Map Type 0~no 1~color map 293e41d09dSXin LI# and Image Type 1 2 3 9 10 11 32 33 303e41d09dSXin LI# and Color Map Entry Size 0 15 16 24 32 313e41d09dSXin LI0 ubequad&0x00FeC400000000C0 0 32*ae316d1dSXin LI# Targa image data (strength=70=110-40) before some Commodore disc image (strength=70=70+0 ./c64) like Cabal+2-MarioSoft(1).d64 33*ae316d1dSXin LI# and some MMDF mailbox (strength=70=70+0 ./mmdf) like uupc.input.1 342726a701SXin LI# Conflict with MPEG sequences. 352726a701SXin LI!:strength -40 3648c779cdSXin LI# Prevent conflicts with CRI ADX. 3743a5ec4eSXin LI#>(2.S-2) belong !0x28632943 3843a5ec4eSXin LI# above line does not work for rgb32_top_left_rle.tga 3943a5ec4eSXin LI# skip some MPEG sequence *.vob and some CRI ADX audio with improbable interleave bits 4043a5ec4eSXin LI>17 ubyte&0xC0 !0xC0 4158a0f0d0SEitan Adler# skip more garbage like *.iso by looking for positive image type 4248c779cdSXin LI>>2 ubyte >0 4358a0f0d0SEitan Adler# skip some compiled terminfo like xterm+tmux by looking for image type less equal 33 4448c779cdSXin LI>>>2 ubyte <34 4543a5ec4eSXin LI# skip some MPEG sequence *.vob HV001T01.EVO winnicki.mpg with unacceptable alpha channel depth 11 4643a5ec4eSXin LI>>>>17 ubyte&0x0F !11 4758a0f0d0SEitan Adler# skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel depth 1 8 15 16 24 32 4843a5ec4eSXin LI>>>>>16 ubyte 1 49*ae316d1dSXin LI# skip few Commodore D64 disc image like "The Great Gianna Sisters.d64" and 50*ae316d1dSXin LI# few MMDF mailbox like uupc.input.1 with unlikely black&white, dimension 0101h x 0101h (257x257) and +0101h origin (+257 +257) 51*ae316d1dSXin LI>>>>>>8 quad !0x0101010101010101 52*ae316d1dSXin LI>>>>>>>0 use tga-image 5343a5ec4eSXin LI>>>>>16 ubyte 8 5443a5ec4eSXin LI>>>>>>0 use tga-image 5543a5ec4eSXin LI>>>>>16 ubyte 15 5643a5ec4eSXin LI>>>>>>0 use tga-image 5743a5ec4eSXin LI>>>>>16 ubyte 16 5843a5ec4eSXin LI>>>>>>0 use tga-image 5943a5ec4eSXin LI>>>>>16 ubyte 24 6043a5ec4eSXin LI>>>>>>0 use tga-image 6143a5ec4eSXin LI>>>>>16 ubyte 32 6243a5ec4eSXin LI>>>>>>0 use tga-image 633e41d09dSXin LI# display tga bitmap image information 643e41d09dSXin LI0 name tga-image 653e41d09dSXin LI>2 ubyte <34 Targa image data 663e41d09dSXin LI!:mime image/x-tga 67*ae316d1dSXin LI# Apple Uniform Type Identifier: com.truevision.tga-image 683e41d09dSXin LI!:apple ????TPIC 693e41d09dSXin LI# normal extension .tga but some Truevision products used others: 703e41d09dSXin LI# tpic (Apple),icb (Image Capture Board),vda (Video Display Adapter),vst (NuVista),win (UNSURE about that) 71*ae316d1dSXin LI# afi bpx 723e41d09dSXin LI!:ext tga/tpic/icb/vda/vst 733e41d09dSXin LI# image type 1 2 3 9 10 11 32 33 743e41d09dSXin LI>2 ubyte&0xF7 1 - Map 753e41d09dSXin LI>2 ubyte&0xF7 2 - RGB 763e41d09dSXin LI# alpha channel 773e41d09dSXin LI>>17 ubyte&0x0F >0 \bA 783e41d09dSXin LI>2 ubyte&0xF7 3 - Mono 793e41d09dSXin LI# type not found, but by http://www.fileformat.info/format/tga/corion.htm 803e41d09dSXin LI# Compressed color-mapped data, using Huffman, Delta, and runlength encoding 813e41d09dSXin LI>2 ubyte 32 - Color 823e41d09dSXin LI# Compressed color-mapped data, using Huffman, Delta, and RLE. 4-pass quadtree- type process 833e41d09dSXin LI>2 ubyte 33 - Color 843e41d09dSXin LI# Color Map Type 0~no 1~color map 853e41d09dSXin LI>1 ubyte 1 ( 863e41d09dSXin LI# first color map entry, 0 normal 873e41d09dSXin LI>>3 uleshort >0 \b%d- 883e41d09dSXin LI# color map length 0 2 1dh 3bh d9h 100h 893e41d09dSXin LI>>5 uleshort x \b%d) 903e41d09dSXin LI# 8~run length encoding bit 913e41d09dSXin LI>2 ubyte&0x08 8 - RLE 923e41d09dSXin LI# gimp can create big pictures! 933e41d09dSXin LI>12 uleshort >0 %d x 943e41d09dSXin LI>12 uleshort =0 65536 x 953e41d09dSXin LI# image height. 0 interpreted as 65536 963e41d09dSXin LI>14 uleshort >0 %d 973e41d09dSXin LI>14 uleshort =0 65536 9858a0f0d0SEitan Adler# Image Pixel depth 1 8 15 16 24 32 993e41d09dSXin LI>16 ubyte x x %d 1003e41d09dSXin LI# X origin of image. 0 normal 1013e41d09dSXin LI>8 uleshort >0 +%d 1023e41d09dSXin LI# Y origin of image. 0 normal; positive for top 1033e41d09dSXin LI>10 uleshort >0 +%d 1043e41d09dSXin LI# Image descriptor: bits 3-0 give the alpha channel depth, bits 5-4 give direction 10543a5ec4eSXin LI# alpha depth like: 1 8 1063e41d09dSXin LI>17 ubyte&0x0F >0 - %d-bit alpha 1073e41d09dSXin LI# bits 5-4 give direction. normal bottom left 1083e41d09dSXin LI>17 ubyte &0x20 - top 1093e41d09dSXin LI#>17 ubyte ^0x20 - bottom 1103e41d09dSXin LI>17 ubyte &0x10 - right 1113e41d09dSXin LI#>17 ubyte ^0x10 - left 1123e41d09dSXin LI# some info say other bits 6-7 should be zero 1133e41d09dSXin LI# but data storage interleave by http://www.fileformat.info/format/tga/corion.htm 1143e41d09dSXin LI# 00 - no interleave;01 - even/odd interleave; 10 - four way interleave; 11 - reserved 1153e41d09dSXin LI#>17 ubyte&0xC0 0x00 - no interleave 1163e41d09dSXin LI>17 ubyte&0xC0 0x40 - interleave 1173e41d09dSXin LI>17 ubyte&0xC0 0x80 - four way interleave 1183e41d09dSXin LI>17 ubyte&0xC0 0xC0 - reserved 1193e41d09dSXin LI# positive length implies identification field 1203e41d09dSXin LI>0 ubyte >0 1213e41d09dSXin LI>>18 string x "%s" 122*ae316d1dSXin LI# Note: called by DROID "Truevision TGA Bitmap" version 2.0 via fmt/402 1233e41d09dSXin LI# last 18 bytes of newer tga file footer signature 1243e41d09dSXin LI>18 search/4261301/s TRUEVISION-XFILE.\0 1253e41d09dSXin LI# extension area offset if not 0 1263e41d09dSXin LI>>&-8 ulelong >0 1273e41d09dSXin LI# length of the extension area. normal 495 for version 2.0 1283e41d09dSXin LI>>>(&-4.l) uleshort 0x01EF 1293e41d09dSXin LI# AuthorName[41] 1303e41d09dSXin LI>>>>&0 string >\0 - author "%-.40s" 1313e41d09dSXin LI# Comment[324]=4 * 80 null terminated 1323e41d09dSXin LI>>>>&41 string >\0 - comment "%-.80s" 1333e41d09dSXin LI# date 1343e41d09dSXin LI>>>>&365 ubequad&0xffffFFFFffff0000 !0 1353e41d09dSXin LI# Day 1363e41d09dSXin LI>>>>>&-6 uleshort x %d 1373e41d09dSXin LI# Month 1383e41d09dSXin LI>>>>>&-8 uleshort x \b-%d 1393e41d09dSXin LI# Year 1403e41d09dSXin LI>>>>>&-4 uleshort x \b-%d 1413e41d09dSXin LI# time 1423e41d09dSXin LI>>>>&371 ubequad&0xffffFFFFffff0000 !0 1433e41d09dSXin LI# hour 1443e41d09dSXin LI>>>>>&-8 uleshort x %d 1453e41d09dSXin LI# minutes 1463e41d09dSXin LI>>>>>&-6 uleshort x \b:%.2d 1473e41d09dSXin LI# second 1483e41d09dSXin LI>>>>>&-4 uleshort x \b:%.2d 1493e41d09dSXin LI# JobName[41] 1503e41d09dSXin LI>>>>&377 string >\0 - job "%-.40s" 1513e41d09dSXin LI# JobHour Jobminute Jobsecond 1523e41d09dSXin LI>>>>&418 ubequad&0xffffFFFFffff0000 !0 1533e41d09dSXin LI>>>>>&-8 uleshort x %d 1543e41d09dSXin LI>>>>>&-6 uleshort x \b:%.2d 1553e41d09dSXin LI>>>>>&-4 uleshort x \b:%.2d 1563e41d09dSXin LI# SoftwareId[41] 1573e41d09dSXin LI>>>>&424 string >\0 - %-.40s 1583e41d09dSXin LI# SoftwareVersionNumber 1593e41d09dSXin LI>>>>&424 ubyte >0 1603e41d09dSXin LI>>>>>&40 uleshort/100 x %d 1613e41d09dSXin LI>>>>>&40 uleshort%100 x \b.%d 1623e41d09dSXin LI# VersionLetter 1633e41d09dSXin LI>>>>>&42 ubyte >0x20 \b%c 1643e41d09dSXin LI# KeyColor 16543a5ec4eSXin LI>>>>&468 ulelong >0 - keycolor %#8.8x 1663e41d09dSXin LI# Denominator of Pixel ratio. 0~no pixel aspect 1673e41d09dSXin LI>>>>&474 uleshort >0 1683e41d09dSXin LI# Numerator 1693e41d09dSXin LI>>>>>&-4 uleshort >0 - aspect %d 1703e41d09dSXin LI>>>>>&-2 uleshort x \b/%d 1713e41d09dSXin LI# Denominator of Gamma ratio. 0~no Gamma value 1723e41d09dSXin LI>>>>&478 uleshort >0 1733e41d09dSXin LI# Numerator 1743e41d09dSXin LI>>>>>&-4 uleshort >0 - gamma %d 1753e41d09dSXin LI>>>>>&-2 uleshort x \b/%d 1763e41d09dSXin LI# ColorOffset 17743a5ec4eSXin LI#>>>>&480 ulelong x - col offset %#8.8x 1783e41d09dSXin LI# StampOffset 17943a5ec4eSXin LI#>>>>&484 ulelong x - stamp offset %#8.8x 1803e41d09dSXin LI# ScanOffset 18143a5ec4eSXin LI#>>>>&488 ulelong x - scan offset %#8.8x 1823e41d09dSXin LI# AttributesType 18343a5ec4eSXin LI#>>>>&492 ubyte x - Attributes %#x 1843e41d09dSXin LI## EndOfTGA 185b6cee71dSXin LI 186b6cee71dSXin LI# PBMPLUS images 18743a5ec4eSXin LI# URL: https://en.wikipedia.org/wiki/Netpbm 188b6cee71dSXin LI# The next byte following the magic is always whitespace. 18943a5ec4eSXin LI# adding 65 to strength so that Netpbm images comes before "x86 boot sector" or 19043a5ec4eSXin LI# "DOS/MBR boot sector" identified by ./filesystems 1915f0216bdSXin LI0 name netpbm 192898496eeSXin LI>3 regex/s =\^[0-9]{1,50}[\040\t\f\r\n]+[0-9]{1,50} Netpbm image data 1935f0216bdSXin LI>>&0 regex =[0-9]{1,50} \b, size = %s x 1945f0216bdSXin LI>>>&0 regex =[0-9]{1,50} \b %s 1955f0216bdSXin LI 196b6cee71dSXin LI0 search/1 P1 19743a5ec4eSXin LI# test for whitespace after 2 byte magic 19843a5ec4eSXin LI>2 regex/2 [\040\t\f\r\n] 19943a5ec4eSXin LI# skip DROID x-fmt-164-signature-id-583.pbm with ten 0 digits 20043a5ec4eSXin LI>>3 string !000000000 20143a5ec4eSXin LI>>>0 use netpbm 20243a5ec4eSXin LI>>>0 string x \b, bitmap 20348c779cdSXin LI!:strength + 65 204b6cee71dSXin LI!:mime image/x-portable-bitmap 20543a5ec4eSXin LI!:ext pbm 20643a5ec4eSXin LI# check for character # starting a comment line 20743a5ec4eSXin LI>>>3 ubyte =0x23 20843a5ec4eSXin LI>>>>4 string x %s 2095f0216bdSXin LI 210b6cee71dSXin LI0 search/1 P2 21140427ccaSGordon Tetlow>0 regex/4 P2[\040\t\f\r\n] 212a5d223e6SXin LI>>0 use netpbm 21348c779cdSXin LI>>0 string x \b, greymap 21448c779cdSXin LI!:strength + 65 21543a5ec4eSXin LI# american spelling gray 21643a5ec4eSXin LI!:mime image/x-portable-graymap 21743a5ec4eSXin LI!:ext pgm 2185f0216bdSXin LI 219b6cee71dSXin LI0 search/1 P3 22040427ccaSGordon Tetlow>0 regex/4 P3[\040\t\f\r\n] 221a5d223e6SXin LI>>0 use netpbm 22248c779cdSXin LI>>0 string x \b, pixmap 22348c779cdSXin LI!:strength + 65 224b6cee71dSXin LI!:mime image/x-portable-pixmap 22543a5ec4eSXin LI!:ext ppm 2265f0216bdSXin LI 227b6cee71dSXin LI0 string P4 22840427ccaSGordon Tetlow>0 regex/4 P4[\040\t\f\r\n] 229a5d223e6SXin LI>>0 use netpbm 23048c779cdSXin LI>>0 string x \b, rawbits, bitmap 23148c779cdSXin LI!:strength + 65 232b6cee71dSXin LI!:mime image/x-portable-bitmap 23343a5ec4eSXin LI!:ext pbm 2345f0216bdSXin LI 235b6cee71dSXin LI0 string P5 23640427ccaSGordon Tetlow>0 regex/4 P5[\040\t\f\r\n] 237a5d223e6SXin LI>>0 use netpbm 23848c779cdSXin LI>>0 string x \b, rawbits, greymap 23948c779cdSXin LI!:strength + 65 240b6cee71dSXin LI!:mime image/x-portable-greymap 24143a5ec4eSXin LI!:ext pgm 2425f0216bdSXin LI 243b6cee71dSXin LI0 string P6 24440427ccaSGordon Tetlow>0 regex/4 P6[\040\t\f\r\n] 245a5d223e6SXin LI>>0 use netpbm 24648c779cdSXin LI>>0 string x \b, rawbits, pixmap 24748c779cdSXin LI!:strength + 65 248b6cee71dSXin LI!:mime image/x-portable-pixmap 24943a5ec4eSXin LI!:ext ppm/pnm 2505f0216bdSXin LI 25143a5ec4eSXin LI# URL: https://en.wikipedia.org/wiki/Netpbm#PAM_graphics_format 25243a5ec4eSXin LI# Reference: http://fileformats.archiveteam.org/wiki/Portable_Arbitrary_Map 25343a5ec4eSXin LI# Update: Joerg Jenderek 25443a5ec4eSXin LI0 string P7 25543a5ec4eSXin LI# skip DROID fmt-405-signature-id-589.pam by looking for character like New Line 25643a5ec4eSXin LI>2 ubyte !0xAB 25743a5ec4eSXin LI#>2 ubyte =0x0A 25843a5ec4eSXin LI>>3 search/256/b WIDTH Netpbm PAM image file, size = 25943a5ec4eSXin LI!:mime image/x-portable-arbitrarymap 26043a5ec4eSXin LI!:ext pam 26143a5ec4eSXin LI!:strength + 65 26243a5ec4eSXin LI>>>&1 string x %s 26343a5ec4eSXin LI>>>3 search/256/b HEIGHT x 26443a5ec4eSXin LI>>>>&1 string x %s 26543a5ec4eSXin LI# at offset 2 a New Line character (0xA) should appear 26643a5ec4eSXin LI>>>2 ubyte !0x0A \b, %#x at offset 2 instead new line 267b6cee71dSXin LI 268b6cee71dSXin LI# From: bryanh@giraffe-data.com (Bryan Henderson) 269b6cee71dSXin LI0 string \117\072 Solitaire Image Recorder format 270b6cee71dSXin LI>4 string \013 MGI Type 11 271b6cee71dSXin LI>4 string \021 MGI Type 17 272b6cee71dSXin LI0 string .MDA MicroDesign data 273a4d6d3b8SXin LI>21 ubyte 48 version 2 274a4d6d3b8SXin LI>21 ubyte 51 version 3 275b6cee71dSXin LI0 string .MDP MicroDesign page data 276a4d6d3b8SXin LI>21 ubyte 48 version 2 277a4d6d3b8SXin LI>21 ubyte 51 version 3 278b6cee71dSXin LI 279b6cee71dSXin LI# NIFF (Navy Interchange File Format, a modification of TIFF) images 280b6cee71dSXin LI# [GRR: this *must* go before TIFF] 281b6cee71dSXin LI0 string IIN1 NIFF image data 282b6cee71dSXin LI!:mime image/x-niff 283b6cee71dSXin LI 284b6cee71dSXin LI# Canon RAW version 1 (CRW) files are a type of Canon Image File Format 285b6cee71dSXin LI# (CIFF) file. These are apparently all little-endian. 286b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 28748c779cdSXin LI# URL: https://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html 288b6cee71dSXin LI0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data 289b6cee71dSXin LI!:mime image/x-canon-crw 290a4d6d3b8SXin LI>16 uleshort x \b, version %d. 291a4d6d3b8SXin LI>14 uleshort x \b%d 292b6cee71dSXin LI 293b6cee71dSXin LI# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic 294b6cee71dSXin LI# number. Put this above the TIFF test to make sure we detect them. 295b6cee71dSXin LI# These are apparently all little-endian. 296b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 29748c779cdSXin LI# URL: https://libopenraw.freedesktop.org/wiki/Canon_CR2 298b6cee71dSXin LI0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data 299b6cee71dSXin LI!:mime image/x-canon-cr2 30048c779cdSXin LI!:strength +80 301a4d6d3b8SXin LI>10 ubyte x \b, version %d. 302a4d6d3b8SXin LI>11 ubyte x \b%d 303b6cee71dSXin LI 30443a5ec4eSXin LI# Fujifilm RAF RAW image files with embedded JPEG data and compressed 30543a5ec4eSXin LI# or uncompressed CFA RAW data. Byte order: Big Endian. 30643a5ec4eSXin LI# URL: https://libopenraw.freedesktop.org/formats/raf/ 30743a5ec4eSXin LI# Useful info from http://fileformats.archiveteam.org/wiki/Fujifilm_RAF. 30843a5ec4eSXin LI# File extension: RAF 30943a5ec4eSXin LI# Works for both the FinePix S2 Pro and the X-T3. Anybody have some more Fuji 31043a5ec4eSXin LI# raw samples available? 31143a5ec4eSXin LI# -- David Dyer-Bennet <dd-b@dd-b.net> 9-Sep-2021 31243a5ec4eSXin LI0 string FUJIFILMCCD-RAW Fujifilm RAF raw image data 31343a5ec4eSXin LI!:mime image/x-fuji-raf 31443a5ec4eSXin LI!:ext raf 31543a5ec4eSXin LI>0x10 string x \b, format version %4.4s 31643a5ec4eSXin LI>0x1C string x \b, camera %s 31743a5ec4eSXin LI 318b6cee71dSXin LI# Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) 319b6cee71dSXin LI# The second word of TIFF files is the TIFF version number, 42, which has 320b6cee71dSXin LI# never changed. The TIFF specification recommends testing for it. 321b6cee71dSXin LI0 string MM\x00\x2a TIFF image data, big-endian 3222dc4dbb9SEitan Adler!:strength +70 323b6cee71dSXin LI!:mime image/tiff 324898496eeSXin LI!:ext tif/tiff 3254460e5b0SXin LI>(4.L) use \^tiff_ifd 326b6cee71dSXin LI0 string II\x2a\x00 TIFF image data, little-endian 327b6cee71dSXin LI!:mime image/tiff 3282dc4dbb9SEitan Adler!:strength +70 329898496eeSXin LI!:ext tif/tiff 330c2931133SXin LI>(4.l) use tiff_ifd 331c2931133SXin LI 332c2931133SXin LI0 name tiff_ifd 333a4d6d3b8SXin LI>0 uleshort x \b, direntries=%d 334c2931133SXin LI>2 use tiff_entry 335c2931133SXin LI 336c2931133SXin LI0 name tiff_entry 3374460e5b0SXin LI# NewSubFileType 338a4d6d3b8SXin LI>0 uleshort 0xfe 3394460e5b0SXin LI>>12 use tiff_entry 340*ae316d1dSXin LI# Width 341a4d6d3b8SXin LI>0 uleshort 0x100 342a4d6d3b8SXin LI>>4 ulelong 1 343a4d6d3b8SXin LI>>>8 uleshort x \b, width=%d 344*ae316d1dSXin LI>>>12 use tiff_entry 345*ae316d1dSXin LI# Height 346a4d6d3b8SXin LI>0 uleshort 0x101 347a4d6d3b8SXin LI>>4 ulelong 1 348a4d6d3b8SXin LI>>>8 uleshort x \b, height=%d 349c2931133SXin LI>>>12 use tiff_entry 350*ae316d1dSXin LI# BPS 351a4d6d3b8SXin LI>0 uleshort 0x102 352a4d6d3b8SXin LI>>8 uleshort x \b, bps=%d 353c2931133SXin LI>>12 use tiff_entry 354*ae316d1dSXin LI# Compression 355a4d6d3b8SXin LI>0 uleshort 0x103 356a4d6d3b8SXin LI>>4 ulelong 1 \b, compression= 357a4d6d3b8SXin LI>>>8 uleshort 1 \bnone 358a4d6d3b8SXin LI>>>8 uleshort 2 \bhuffman 359a4d6d3b8SXin LI>>>8 uleshort 3 \bbi-level group 3 360a4d6d3b8SXin LI>>>8 uleshort 4 \bbi-level group 4 361a4d6d3b8SXin LI>>>8 uleshort 5 \bLZW 362a4d6d3b8SXin LI>>>8 uleshort 6 \bJPEG (old) 363a4d6d3b8SXin LI>>>8 uleshort 7 \bJPEG 364a4d6d3b8SXin LI>>>8 uleshort 8 \bdeflate 365a4d6d3b8SXin LI>>>8 uleshort 9 \bJBIG, ITU-T T.85 366a4d6d3b8SXin LI>>>8 uleshort 0xa \bJBIG, ITU-T T.43 367a4d6d3b8SXin LI>>>8 uleshort 0x7ffe \bNeXT RLE 2-bit 368a4d6d3b8SXin LI>>>8 uleshort 0x8005 \bPackBits (Macintosh RLE) 369a4d6d3b8SXin LI>>>8 uleshort 0x8029 \bThunderscan RLE 370a4d6d3b8SXin LI>>>8 uleshort 0x807f \bRasterPadding (CT or MP) 371a4d6d3b8SXin LI>>>8 uleshort 0x8080 \bRLE (Line Work) 372a4d6d3b8SXin LI>>>8 uleshort 0x8081 \bRLE (High-Res Cont-Tone) 373a4d6d3b8SXin LI>>>8 uleshort 0x8082 \bRLE (Binary Line Work) 374a4d6d3b8SXin LI>>>8 uleshort 0x80b2 \bDeflate (PKZIP) 375a4d6d3b8SXin LI>>>8 uleshort 0x80b3 \bKodak DCS 376a4d6d3b8SXin LI>>>8 uleshort 0x8765 \bJBIG 377a4d6d3b8SXin LI>>>8 uleshort 0x8798 \bJPEG2000 378a4d6d3b8SXin LI>>>8 uleshort 0x8799 \bNikon NEF Compressed 379c2931133SXin LI>>>8 default x 380a4d6d3b8SXin LI>>>>8 uleshort x \b(unknown %#x) 381c2931133SXin LI>>>12 use tiff_entry 382*ae316d1dSXin LI# Photometric Interpretation 383a2dfb722SXin LI>0 uleshort 0x106 \b, PhotometricInterpretation= 3845f0216bdSXin LI>>8 clear x 385a4d6d3b8SXin LI>>8 uleshort 0 \bWhiteIsZero 386a4d6d3b8SXin LI>>8 uleshort 1 \bBlackIsZero 387a4d6d3b8SXin LI>>8 uleshort 2 \bRGB 388a4d6d3b8SXin LI>>8 uleshort 3 \bRGB Palette 389a4d6d3b8SXin LI>>8 uleshort 4 \bTransparency Mask 390a4d6d3b8SXin LI>>8 uleshort 5 \bCMYK 391a4d6d3b8SXin LI>>8 uleshort 6 \bYCbCr 392a4d6d3b8SXin LI>>8 uleshort 8 \bCIELab 3935f0216bdSXin LI>>8 default x 394a4d6d3b8SXin LI>>>8 uleshort x \b(unknown=%#x) 395c2931133SXin LI>>12 use tiff_entry 396c2931133SXin LI# FillOrder 397a4d6d3b8SXin LI>0 uleshort 0x10a 398a4d6d3b8SXin LI>>4 ulelong 1 399c2931133SXin LI>>>12 use tiff_entry 400c2931133SXin LI# DocumentName 401a4d6d3b8SXin LI>0 uleshort 0x10d 402c2931133SXin LI>>(8.l) string x \b, name=%s 403c2931133SXin LI>>>12 use tiff_entry 404c2931133SXin LI# ImageDescription 405a4d6d3b8SXin LI>0 uleshort 0x10e 406c2931133SXin LI>>(8.l) string x \b, description=%s 407c2931133SXin LI>>>12 use tiff_entry 4084460e5b0SXin LI# Make 409a4d6d3b8SXin LI>0 uleshort 0x10f 4104460e5b0SXin LI>>(8.l) string x \b, manufacturer=%s 4114460e5b0SXin LI>>>12 use tiff_entry 4124460e5b0SXin LI# Model 413a4d6d3b8SXin LI>0 uleshort 0x110 4144460e5b0SXin LI>>(8.l) string x \b, model=%s 4154460e5b0SXin LI>>>12 use tiff_entry 416c2931133SXin LI# StripOffsets 417a4d6d3b8SXin LI>0 uleshort 0x111 418c2931133SXin LI>>12 use tiff_entry 4194460e5b0SXin LI# Orientation 420a4d6d3b8SXin LI>0 uleshort 0x112 \b, orientation= 421a4d6d3b8SXin LI>>8 uleshort 1 \bupper-left 422a4d6d3b8SXin LI>>8 uleshort 3 \blower-right 423a4d6d3b8SXin LI>>8 uleshort 6 \bupper-right 424a4d6d3b8SXin LI>>8 uleshort 8 \blower-left 425a4d6d3b8SXin LI>>8 uleshort 9 \bundefined 4264460e5b0SXin LI>>8 default x 427a4d6d3b8SXin LI>>>8 uleshort x \b[*%d*] 4284460e5b0SXin LI>>12 use tiff_entry 4294460e5b0SXin LI# XResolution 430a4d6d3b8SXin LI>0 uleshort 0x11a 431a4d6d3b8SXin LI>>8 ulelong x \b, xresolution=%d 4324460e5b0SXin LI>>12 use tiff_entry 4334460e5b0SXin LI# YResolution 434a4d6d3b8SXin LI>0 uleshort 0x11b 435a4d6d3b8SXin LI>>8 ulelong x \b, yresolution=%d 4364460e5b0SXin LI>>12 use tiff_entry 4374460e5b0SXin LI# ResolutionUnit 438a4d6d3b8SXin LI>0 uleshort 0x128 439a4d6d3b8SXin LI>>8 uleshort x \b, resolutionunit=%d 4404460e5b0SXin LI>>12 use tiff_entry 4414460e5b0SXin LI# Software 442a4d6d3b8SXin LI>0 uleshort 0x131 4434460e5b0SXin LI>>(8.l) string x \b, software=%s 444c2931133SXin LI>>12 use tiff_entry 445c2931133SXin LI# Datetime 446a4d6d3b8SXin LI>0 uleshort 0x132 447c2931133SXin LI>>(8.l) string x \b, datetime=%s 4484460e5b0SXin LI>>12 use tiff_entry 449c2931133SXin LI# HostComputer 450a4d6d3b8SXin LI>0 uleshort 0x13c 451c2931133SXin LI>>(8.l) string x \b, hostcomputer=%s 4524460e5b0SXin LI>>12 use tiff_entry 4534460e5b0SXin LI# WhitePoint 454a4d6d3b8SXin LI>0 uleshort 0x13e 4554460e5b0SXin LI>>12 use tiff_entry 4564460e5b0SXin LI# PrimaryChromaticities 457a4d6d3b8SXin LI>0 uleshort 0x13f 4584460e5b0SXin LI>>12 use tiff_entry 4594460e5b0SXin LI# YCbCrCoefficients 460a4d6d3b8SXin LI>0 uleshort 0x211 4614460e5b0SXin LI>>12 use tiff_entry 4624460e5b0SXin LI# YCbCrPositioning 463a4d6d3b8SXin LI>0 uleshort 0x213 4644460e5b0SXin LI>>12 use tiff_entry 4654460e5b0SXin LI# ReferenceBlackWhite 466a4d6d3b8SXin LI>0 uleshort 0x214 4674460e5b0SXin LI>>12 use tiff_entry 4684460e5b0SXin LI# Copyright 469a4d6d3b8SXin LI>0 uleshort 0x8298 4704460e5b0SXin LI>>(8.l) string x \b, copyright=%s 4714460e5b0SXin LI>>12 use tiff_entry 4724460e5b0SXin LI# ExifOffset 473a4d6d3b8SXin LI>0 uleshort 0x8769 4744460e5b0SXin LI>>12 use tiff_entry 4754460e5b0SXin LI# GPS IFD 476a4d6d3b8SXin LI>0 uleshort 0x8825 \b, GPS-Data 4774460e5b0SXin LI>>12 use tiff_entry 478a4d6d3b8SXin LI#>0 uleshort x \b, unknown=%#x 4794460e5b0SXin LI#>>12 use tiff_entry 480b6cee71dSXin LI0 string MM\x00\x2b Big TIFF image data, big-endian 481b6cee71dSXin LI!:mime image/tiff 482b6cee71dSXin LI0 string II\x2b\x00 Big TIFF image data, little-endian 483b6cee71dSXin LI!:mime image/tiff 484b6cee71dSXin LI 485b6cee71dSXin LI# PNG [Portable Network Graphics, or "PNG's Not GIF"] images 486b6cee71dSXin LI# (Greg Roelofs, newt@uchicago.edu) 487b6cee71dSXin LI# (Albert Cahalan, acahalan@cs.uml.edu) 488b6cee71dSXin LI# 48940427ccaSGordon Tetlow# 137 P N G \r \n ^Z \n [4-byte length] I H D R [HEAD data] [HEAD crc] ... 490b6cee71dSXin LI# 49140427ccaSGordon Tetlow 49240427ccaSGordon Tetlow# IHDR parser 49340427ccaSGordon Tetlow0 name png-ihdr 494a4d6d3b8SXin LI>0 ubelong x \b, %d x 495a4d6d3b8SXin LI>4 ubelong x %d, 496a4d6d3b8SXin LI>8 ubyte x %d-bit 497a4d6d3b8SXin LI>9 ubyte 0 grayscale, 498a4d6d3b8SXin LI>9 ubyte 2 \b/color RGB, 499a4d6d3b8SXin LI>9 ubyte 3 colormap, 500a4d6d3b8SXin LI>9 ubyte 4 gray+alpha, 501a4d6d3b8SXin LI>9 ubyte 6 \b/color RGBA, 502a4d6d3b8SXin LI#>10 ubyte 0 deflate/32K, 503a4d6d3b8SXin LI>12 ubyte 0 non-interlaced 504a4d6d3b8SXin LI>12 ubyte 1 interlaced 50540427ccaSGordon Tetlow 50640427ccaSGordon Tetlow# Standard PNG image. 50740427ccaSGordon Tetlow0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0DIHDR PNG image data 508b6cee71dSXin LI!:mime image/png 50948c779cdSXin LI!:ext png 51040427ccaSGordon Tetlow!:strength +10 51140427ccaSGordon Tetlow>16 use png-ihdr 512*ae316d1dSXin LI>33 string \x00\x00\x00\x08acTL \b, animated 513*ae316d1dSXin LI>>41 ubelong 1 (%d frame 514*ae316d1dSXin LI>>41 ubelong >1 (%d frames 515*ae316d1dSXin LI>>45 ubelong 0 \b, infinite repetitions) 516*ae316d1dSXin LI>>45 ubelong 1 \b, %d repetition) 517*ae316d1dSXin LI>>45 ubelong >1 \b, %d repetitions) 51840427ccaSGordon Tetlow 51940427ccaSGordon Tetlow# Apple CgBI PNG image. 52040427ccaSGordon Tetlow0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x04CgBI 52140427ccaSGordon Tetlow>24 string \x00\x00\x00\x0DIHDR PNG image data (CgBI) 52240427ccaSGordon Tetlow!:mime image/png 52348c779cdSXin LI!:ext png 52440427ccaSGordon Tetlow!:strength +10 52540427ccaSGordon Tetlow>>32 use png-ihdr 526b6cee71dSXin LI 527b6cee71dSXin LI# possible GIF replacements; none yet released! 528b6cee71dSXin LI# (Greg Roelofs, newt@uchicago.edu) 529b6cee71dSXin LI# 530b6cee71dSXin LI# GRR 950115: this was mine ("Zip GIF"): 531b6cee71dSXin LI0 string GIF94z ZIF image (GIF+deflate alpha) 532b6cee71dSXin LI!:mime image/x-unknown 533b6cee71dSXin LI# 534b6cee71dSXin LI# GRR 950115: this is Jeremy Wohl's Free Graphics Format (better): 535b6cee71dSXin LI# 536b6cee71dSXin LI0 string FGF95a FGF image (GIF+deflate beta) 537b6cee71dSXin LI!:mime image/x-unknown 538b6cee71dSXin LI# 539b6cee71dSXin LI# GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal 540b6cee71dSXin LI# (best; not yet implemented): 541b6cee71dSXin LI# 542b6cee71dSXin LI0 string PBF PBF image (deflate compression) 543b6cee71dSXin LI!:mime image/x-unknown 544b6cee71dSXin LI 545b6cee71dSXin LI# GIF 5462dc4dbb9SEitan Adler# Strength set up to beat 0x55AA DOS/MBR signature word lookups (+65) 547b6cee71dSXin LI0 string GIF8 GIF image data 5482dc4dbb9SEitan Adler!:strength +80 549b6cee71dSXin LI!:mime image/gif 550b6cee71dSXin LI!:apple 8BIMGIFf 55143a5ec4eSXin LI!:ext gif 552b6cee71dSXin LI>4 string 7a \b, version 8%s, 553b6cee71dSXin LI>4 string 9a \b, version 8%s, 554a4d6d3b8SXin LI>6 uleshort >0 %d x 555a4d6d3b8SXin LI>8 uleshort >0 %d 556a4d6d3b8SXin LI#>10 ubyte &0x80 color mapped, 557a4d6d3b8SXin LI#>10 ubyte&0x07 =0x00 2 colors 558a4d6d3b8SXin LI#>10 ubyte&0x07 =0x01 4 colors 559a4d6d3b8SXin LI#>10 ubyte&0x07 =0x02 8 colors 560a4d6d3b8SXin LI#>10 ubyte&0x07 =0x03 16 colors 561a4d6d3b8SXin LI#>10 ubyte&0x07 =0x04 32 colors 562a4d6d3b8SXin LI#>10 ubyte&0x07 =0x05 64 colors 563a4d6d3b8SXin LI#>10 ubyte&0x07 =0x06 128 colors 564a4d6d3b8SXin LI#>10 ubyte&0x07 =0x07 256 colors 565b6cee71dSXin LI 566*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/Jeff%27s_Image_Format 567*ae316d1dSXin LI# http://web.archive.org/web/20010603113404/http://jeff.cafe.net/jif 568*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jif.trid.xml 569*ae316d1dSXin LI# https://www.nationalarchives.gov.uk/PRONOM/fmt/994 570*ae316d1dSXin LI# From: Joerg Jenderek 571*ae316d1dSXin LI# Note: nearly identical to GIF, except that it uses zlib compression instead of LZW 572*ae316d1dSXin LI# called by TrID "Jeff's Image Format bitmap" and "Jeffs Image Format" by DROID via fmt/994 573*ae316d1dSXin LI# verfied by XnView `nconvert -fullinfo *.jif` as "Jeff's Image Format" 574*ae316d1dSXin LI0 string JIF99a Jeffs Image Format data 575*ae316d1dSXin LI!:mime image/x-jif 576*ae316d1dSXin LI# http://extension.nirsoft.net/jif 577*ae316d1dSXin LI#!:mime image/jif 578*ae316d1dSXin LI!:apple ????JIFf 579*ae316d1dSXin LI!:ext jif 580*ae316d1dSXin LI>6 uleshort x %u x 581*ae316d1dSXin LI>8 uleshort x %u 582*ae316d1dSXin LI 583b6cee71dSXin LI# ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster, 584b6cee71dSXin LI# 1 plane, no encoding. 585b6cee71dSXin LI0 string \361\0\100\273 CMU window manager raster image data 586a4d6d3b8SXin LI>4 ulelong >0 %d x 587a4d6d3b8SXin LI>8 ulelong >0 %d, 588a4d6d3b8SXin LI>12 ulelong >0 %d-bit 589b6cee71dSXin LI 590b6cee71dSXin LI# Magick Image File Format 591d38c30c0SXin LI# URL: https://imagemagick.org/script/miff.php 592d38c30c0SXin LI# Reference: http://fileformats.archiveteam.org/wiki/MIFF 593d38c30c0SXin LI# Update: Joerg Jenderek 594d38c30c0SXin LI# http://www.nationalarchives.gov.uk/pronom/fmt/930 595d38c30c0SXin LI0 search/256/bc id=imagemagick 596d38c30c0SXin LI# skip bad ASCII text by following new line~0x0A or space~0x20 character 59743a5ec4eSXin LI#>&0 ubyte x \b, next character %#x 598d38c30c0SXin LI# called by TriD ImageMagick Machine independent File Format bitmap 599d38c30c0SXin LI>&0 ubyte&0xD5 0 MIFF image data 600d38c30c0SXin LI# https://reposcope.com/mimetype/image/miff 601d38c30c0SXin LI#!:mime image/miff 602d38c30c0SXin LI!:mime image/x-miff 603d38c30c0SXin LI!:ext miff/mif 604d38c30c0SXin LI# examples with standard file(1) magic 605d38c30c0SXin LI#>>0 string =id=ImageMagick with standard magic 606d38c30c0SXin LI# examples with unusual file(1) magic like 607d38c30c0SXin LI>>0 string !id=ImageMagick starting with 608d38c30c0SXin LI# start with comment (brace) like http://samples.fileformat.info/.../AQUARIUM.MIF 609d38c30c0SXin LI>>>0 ubyte =0x7b comment 610d38c30c0SXin LI# skip second character which is often a newline and show comment 611d38c30c0SXin LI>>>>2 string x "%s" 612d38c30c0SXin LI# does not start with comment, probably letters with other case like Id=ImageMagick 613d38c30c0SXin LI# ImageMagick-7.0.9-2/Magick++/demo/smile_anim.miff 614d38c30c0SXin LI>>>0 ubyte !0x7b 615d38c30c0SXin LI>>>>0 string >\0 '%-.14s' 6162726a701SXin LI# URL: https://imagemagick.org/ 6172726a701SXin LI# Reference: https://imagemagick.org/script/magick-vector-graphics.php 6182726a701SXin LI# From: Joerg Jenderek 6192726a701SXin LI# Note: all white-spaces between commands are ignored 6202726a701SXin LI0 string push 6212726a701SXin LI# skip some white spaces 6222726a701SXin LI>5 search/3 graphic-context ImageMagick Vector Graphic 6232726a701SXin LI# TODO: look for dangerous commands like CVE-2016-3715 6242726a701SXin LI#!:mime text/plain 6252726a701SXin LI!:mime image/x-mvg 6262726a701SXin LI!:ext mvg 627b6cee71dSXin LI 628b6cee71dSXin LI# Artisan 629b6cee71dSXin LI0 long 1123028772 Artisan image data 630b6cee71dSXin LI>4 long 1 \b, rectangular 24-bit 631b6cee71dSXin LI>4 long 2 \b, rectangular 8-bit with colormap 632b6cee71dSXin LI>4 long 3 \b, rectangular 32-bit (24-bit with matte) 633b6cee71dSXin LI 634b6cee71dSXin LI# FIG (Facility for Interactive Generation of figures), an object-based format 635a4d6d3b8SXin LI# URL: http://fileformats.archiveteam.org/wiki/Fig 636a4d6d3b8SXin LI# https://en.wikipedia.org/wiki/Xfig 637a4d6d3b8SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fig.trid.xml 638a4d6d3b8SXin LI# https://web.archive.org/web/20070920204655/http://epb.lbl.gov/xfig/fig-format.html 639a4d6d3b8SXin LI# Update: Joerg Jenderek 640a4d6d3b8SXin LI# Note: called "FIG vector drawing" by TrID, 641a4d6d3b8SXin LI# 4 byte magic is assumed to be always at offset 0 and 642a4d6d3b8SXin LI# verified by `fig2mpdf -v bootloader.fig && file bootloader.pdf` 643a4d6d3b8SXin LI#0 search/1/tb #FIG FIG image text 644a4d6d3b8SXin LI# GRR: with --keep-going option the line above gives duplicate messages 645a4d6d3b8SXin LI0 search/1/ts #FIG 646a4d6d3b8SXin LI>&0 use image-xfig 647a4d6d3b8SXin LI# binary data variant with non ASCII text characters like Control-A or �C in thermostat.fig 648a4d6d3b8SXin LI0 search/1/bs #FIG 649a4d6d3b8SXin LI>&0 use image-xfig 650a4d6d3b8SXin LI# display XFIG image describing text, mime type, file name extension and version 651a4d6d3b8SXin LI0 name image-xfig 652a4d6d3b8SXin LI>8 ubyte x FIG image text 653a4d6d3b8SXin LI#!:mime text/plain 654a4d6d3b8SXin LI# https://reposcope.com/mimetype/image/x-xfig 655a4d6d3b8SXin LI!:mime image/x-xfig 656a4d6d3b8SXin LI!:ext fig 657a4d6d3b8SXin LI# version string like: 1.4 2.1 3.1 3.2 658b6cee71dSXin LI>5 string x \b, version %.3s 659a4d6d3b8SXin LI# some times after version text like: "Produced by xfig version 3.2.5-alpha5" 660a4d6d3b8SXin LI>8 ubyte >0x0D 661a4d6d3b8SXin LI>>8 string x "%s" 662a4d6d3b8SXin LI# should be point character (2Eh) of version string according to TrID 663a4d6d3b8SXin LI#>6 ubyte !0x2E \b, at 6 %#x 664898496eeSXin LI# caret character (23h) at the beginning in most or probably all examples 665a4d6d3b8SXin LI#>0 ubyte !0x23 \b, starting with character %#x 666a4d6d3b8SXin LI# URL: http://fileformats.archiveteam.org/wiki/DeskMate_Draw 667a4d6d3b8SXin LI# http://en.wikipedia.org/wiki/Deskmate 668a4d6d3b8SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/dm-fig.trid.xml 669a4d6d3b8SXin LI# From: Joerg Jenderek 670a4d6d3b8SXin LI# Note: called "DeskMate Draw drawing" by TrID 671a4d6d3b8SXin LI0 string \x14FIG DeskMate Drawing 672a4d6d3b8SXin LI#!:mime application/octet-stream 673a4d6d3b8SXin LI!:mime image/x-deskmate-fig 674a4d6d3b8SXin LI!:ext fig 675a4d6d3b8SXin LI# TODO: 676a4d6d3b8SXin LI# "Cabri 3D Figure" by TrID fig-cabri.trid.xml 677a4d6d3b8SXin LI# "Playmation Figure" by TrID fig-playmation.trid.xml 678b6cee71dSXin LI 679b6cee71dSXin LI# PHIGS 680b6cee71dSXin LI0 string ARF_BEGARF PHIGS clear text archive 681b6cee71dSXin LI0 string @(#)SunPHIGS SunPHIGS 682b6cee71dSXin LI# version number follows, in the form m.n 683b6cee71dSXin LI>40 string SunBin binary 684b6cee71dSXin LI>32 string archive archive 685b6cee71dSXin LI 686b6cee71dSXin LI# GKS (Graphics Kernel System) 687b6cee71dSXin LI0 string GKSM GKS Metafile 688b6cee71dSXin LI>24 string SunGKS \b, SunGKS 689b6cee71dSXin LI 690b6cee71dSXin LI# CGM image files 691898496eeSXin LI# Update: Joerg Jenderek 692898496eeSXin LI# URL: http://fileformats.archiveteam.org/wiki/CGM 693898496eeSXin LI# https://en.wikipedia.org/wiki/Computer_Graphics_Metafile 694898496eeSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cgm-ct.trid.xml 695898496eeSXin LI# http://standards.iso.org/ittf/PubliclyAvailableStandards/c032381_ISO_IEC_8632-4_1999(E).zip 696898496eeSXin LI# Note: called "Computer Graphics Metafile (Clear Text)" by TrID and 697898496eeSXin LI# "Computer Graphics Metafile ASCII" by DROID or CGM by XnView 698898496eeSXin LI# verified by LibreOffice and partly by XnView `nconvert -info *.CGM` 699898496eeSXin LI# According to TrID only letter B and M are always upcased and by DROID often only B is upcased for command BEGIN METAFILE 700898496eeSXin LI0 string/c begmf 701898496eeSXin LI# skip SOME DROID fmt-301-signature-id-359.cgm fmt-301-signature-id-361.cgm fmt-302-signature-id-364.cgm 702898496eeSXin LI# fmt-302-signature-id-365.cgm x-fmt-142-signature-id-350.cgm x-fmt-142-signature-id-351.cgm 703898496eeSXin LI>5 short !0 704898496eeSXin LI# skip other versions of DROID fmt-301-signature-id-359.cgm fmt-301-signature-id-361.cgm fmt-302-signature-id-364.cgm 705898496eeSXin LI# fmt-302-signature-id-365.cgm x-fmt-142-signature-id-350.cgm x-fmt-142-signature-id-351.cgm 706898496eeSXin LI>>5 short !0xABab clear text Computer Graphics Metafile 707898496eeSXin LI# https://reposcope.com/mimetype/image/cgm 708898496eeSXin LI!:mime image/cgm 709898496eeSXin LI!:ext cgm 710898496eeSXin LI# SF:NAME like: 'metafile example'; 711898496eeSXin LI>>>5 string x %s 712898496eeSXin LI# look for command METAFILE VERSION (MFVERSION <SOFTSEP> <I:VERSION>) 713898496eeSXin LI>>>2 search/128/c mfversion 714898496eeSXin LI#>>>>&0 ubyte x SOFTSEP=%#x 715898496eeSXin LI# version like: 1 3 4 716898496eeSXin LI>>>>&1 ubyte >0x31 \b, version %c 717898496eeSXin LI# Summary: Computer Graphics Metafile (binary) 718898496eeSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cgm-bin.trid.xml 719898496eeSXin LI# https://standards.iso.org/ittf/PubliclyAvailableStandards/c032380_ISO_IEC_8632-3_1999(E).zip 720898496eeSXin LI# Note: called "Computer Graphics Metafile (binary)" by TrID and DROID or CGM by XnView 721898496eeSXin LI# verified by LibreOffice and partly by XnView `nconvert -info *.CGM` 722898496eeSXin LI# look for BEGIN METAFILE (element Class 0 and ID 1 and "random" Parameter) that is binary C C C C 0 0 0 0 0 0 1 P P P P P 723898496eeSXin LI0 ubeshort&0xFFe0 0x0020 724898496eeSXin LI# skip SOME DROID fmt-303-signature-id-368.cgm fmt-304-signature-id-369.cgm fmt-305-signature-id-370.cgm fmt-306-signature-id-371.cgm 725898496eeSXin LI# with containing only 28 bytes 726898496eeSXin LI>28 ubyte x 727898496eeSXin LI# look for METAFILE VERSION (element class 1 and id 1 and parameter P1 with length 2) that is binary 0 0 0 1 i i i i i i 1 P P P 1 P 728898496eeSXin LI# with "low" version; 2nd worst case argentin.cgm with parameter length 56 729898496eeSXin LI# worst MS.CGM 730898496eeSXin LI#>>2 search/73/b \x10\x22\0 binary Computer Graphics Metafile 731898496eeSXin LI>>2 search/128/b \x10\x22\0 binary Computer Graphics Metafile 732898496eeSXin LI!:mime image/cgm 733898496eeSXin LI!:ext cgm 734898496eeSXin LI# metafile 2 byte version number like: 1 (most) 2 3 4 735898496eeSXin LI>>>&-1 ubeshort >1 \b, version %u 736898496eeSXin LI# length number of 1st parameter octets in range 0 to 30 implies short command 737898496eeSXin LI>>>0 ubeshort&0x001F <31 \b, parameter length %u 738898496eeSXin LI# length of string like: 8 9 10 11 12 29 739898496eeSXin LI#>>>>2 ubyte x \b, %u BYTES (SHORT) 740898496eeSXin LI# string like: 'HiJaak 2' 'Example 1' 'sahara.cgm' 'MASTERCLIPS--Art Of Business ' 741898496eeSXin LI>>>>2 pstring >\0 '%s' 742898496eeSXin LI# after 1st short command with even parameter length comes 2nd command like: 1022h 0010h (EAF00010.CGM 'HiJaak 2' FLOPPY2.CGM TIGER.CGM 'B:\TIGER.CGM') 743898496eeSXin LI>>>>0 ubeshort&0x0001 =0 744898496eeSXin LI>>>>>(2.b+3) ubeshort !0x1022 \b, 2nd command %#4.4x (short even) 745898496eeSXin LI# after 1st short command with odd parameter length comes nil padding byte followed 2nd command like: 1022h 746898496eeSXin LI>>>>0 ubeshort&0x0001 =1 747898496eeSXin LI#>>>>>(2.b+3) ubyte !0 \b, PADDING %#x 748898496eeSXin LI>>>>>(2.b+4) ubeshort !0x1022 \b, 2nd command %#4.4x (short odd) 749898496eeSXin LI# 11111 binary (decimal 31) in the parameter field indicates that the command is in long-form 750898496eeSXin LI>>>0 ubeshort&0x001F =0x1F 751898496eeSXin LI# bit 15 is partition flag with 1 for 'not-last' partition and 0 for 'last' partition 752898496eeSXin LI>>>>2 ubeshort&0x8000 !0 \b, partition flag %#4.4x 753898496eeSXin LI# bits 0 to 14 is parameter list length; the number of following parameter octets; range 0 to 32767 754898496eeSXin LI# length of 1st long command parameter like: 53 755898496eeSXin LI>>>>2 ubeshort&0x7Fff x \b, parameter length %u (long) 756898496eeSXin LI# The two header words are then followed by lenghth of 1st string like: 52 757898496eeSXin LI#>>>>4 ubyte x \b, %u BYTES 758898496eeSXin LI# string like: 'K:\PROJECTS\GRAPHICS\DWKS3.5\CLIPART\FLAGS\Italy.cgm' 759898496eeSXin LI>>>>4 pstring/B x '%s' 760898496eeSXin LI# odd long parameter length implies single null padding octet to start command on word boundary 761898496eeSXin LI>>>>2 ubeshort&0x0001 =1 762898496eeSXin LI# after 1st long command with odd parameter length comes nil padding byte followed by 2nd command like: 1022h 763898496eeSXin LI#>>>>>(4.b+5) ubyte !0 \b, PADDING %#x 764898496eeSXin LI>>>>>(4.b+6) ubeshort !0x1022 \b, 2nd command %#4.4x (long odd) 765898496eeSXin LI# even long parameter length implies next command directly is following 766898496eeSXin LI>>>>2 ubeshort&0x0001 =0 767898496eeSXin LI# after 1st long command with even parameter length comes 2nd command like: 1022h 0x1054 (MS.CGM) 768898496eeSXin LI>>>>>(4.b+5) ubeshort !0x1022 \b, 2nd command %#4.4x (long even) 769898496eeSXin LI# look for END METAFILE (element class 0 and id 2 and 0 parameter) that is binary 0 0 0 0 i i i i i 1 i P P P P P 770898496eeSXin LI>>>-2 ubeshort !0x0040 \b, NOT_FOUND_END_METAFILE 771b6cee71dSXin LI 772b6cee71dSXin LI# MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de) 773b6cee71dSXin LI0 string yz MGR bitmap, modern format, 8-bit aligned 774b6cee71dSXin LI0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned 775b6cee71dSXin LI0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned 776b6cee71dSXin LI0 string yx MGR bitmap, modern format, squeezed 777b6cee71dSXin LI 778b6cee71dSXin LI# Fuzzy Bitmap (FBM) images 779b6cee71dSXin LI0 string %bitmap\0 FBM image data 780b6cee71dSXin LI>30 long 0x31 \b, mono 781b6cee71dSXin LI>30 long 0x33 \b, color 782b6cee71dSXin LI 783b6cee71dSXin LI# facsimile data 784b6cee71dSXin LI1 string PC\ Research,\ Inc group 3 fax data 785a4d6d3b8SXin LI>29 ubyte 0 \b, normal resolution (204x98 DPI) 786a4d6d3b8SXin LI>29 ubyte 1 \b, fine resolution (204x196 DPI) 787b6cee71dSXin LI# From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at> 788b6cee71dSXin LI0 string Sfff structured fax file 789b6cee71dSXin LI 790b6cee71dSXin LI# From: Joerg Jenderek <joerg.jen.der.ek@gmx.net> 79143a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/Award_BIOS_logo 79243a5ec4eSXin LI# Note: verified by XnView command `nconvert -fullinfo *.EPA` 793b6cee71dSXin LI0 string \x11\x06 Award BIOS Logo, 136 x 84 794b6cee71dSXin LI!:mime image/x-award-bioslogo 79543a5ec4eSXin LI!:ext epa 796b6cee71dSXin LI0 string \x11\x09 Award BIOS Logo, 136 x 126 797b6cee71dSXin LI!:mime image/x-award-bioslogo 79843a5ec4eSXin LI!:ext epa 79943a5ec4eSXin LI# https://telparia.com/fileFormatSamples/image/epa/IO.EPA 80043a5ec4eSXin LI# Note: by bitmap-awbm-v1x1009.trid.xml called "Award BIOS logo bitmap (128x126) (v1)" 80143a5ec4eSXin LI# verified by RECOIL `recoil2png -o tmp.png IO.EPA; file tmp.png` 80243a5ec4eSXin LI0 string \x10\x09 Award BIOS Logo, 128 x 126 80343a5ec4eSXin LI!:mime image/x-award-bioslogo 80443a5ec4eSXin LI!:ext epa 805b6cee71dSXin LI#0 string \x07\x1f BIOS Logo corrupted? 806b6cee71dSXin LI# http://www.blackfiveservices.co.uk/awbmtools.shtml 807b6cee71dSXin LI# http://biosgfx.narod.ru/v3/ 808b6cee71dSXin LI# http://biosgfx.narod.ru/abr-2/ 809b6cee71dSXin LI0 string AWBM 81043a5ec4eSXin LI# Note: by bitmap-awbm.trid.xml called "Award BIOS logo bitmap (v2)" 811a4d6d3b8SXin LI>4 uleshort <1981 Award BIOS Logo, version 2 812a4d6d3b8SXin LI#>4 uleshort <1981 Award BIOS bitmap 81343a5ec4eSXin LI!:mime image/x-award-bioslogo2 81443a5ec4eSXin LI#!:mime image/x-award-bmp 81543a5ec4eSXin LI!:ext epa/bmp 816b6cee71dSXin LI# image width is a multiple of 4 817a4d6d3b8SXin LI>>4 uleshort&0x0003 0 818a4d6d3b8SXin LI>>>4 uleshort x \b, %d 819a4d6d3b8SXin LI>>>6 uleshort x x %d 820a4d6d3b8SXin LI>>4 uleshort&0x0003 >0 \b, 821a4d6d3b8SXin LI>>>4 uleshort&0x0003 =1 822a4d6d3b8SXin LI>>>>4 uleshort x %d+3 823a4d6d3b8SXin LI>>>4 uleshort&0x0003 =2 824a4d6d3b8SXin LI>>>>4 uleshort x %d+2 825a4d6d3b8SXin LI>>>4 uleshort&0x0003 =3 826a4d6d3b8SXin LI>>>>4 uleshort x %d+1 827a4d6d3b8SXin LI>>>6 uleshort x x %d 828b6cee71dSXin LI# at offset 8 starts imagedata followed by "RGB " marker 829b6cee71dSXin LI 830b6cee71dSXin LI# PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu) 83148c779cdSXin LI# https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\ 832b6cee71dSXin LI# 28bitmap_information_header.29 833d38c30c0SXin LI# Note: variant starting direct with DIB header see 834d38c30c0SXin LI# http://fileformats.archiveteam.org/wiki/BMP 835d38c30c0SXin LI# verified by ImageMagick version 6.8.9-8 command `identify *.dib` 836a4d6d3b8SXin LI0 uleshort 40 837d38c30c0SXin LI# skip bad samples like GAME by looking for valid number of color planes 838d38c30c0SXin LI>12 uleshort 1 Device independent bitmap graphic 83943a5ec4eSXin LI!:mime image/x-ms-bmp 840d38c30c0SXin LI!:apple ????BMPp 841d38c30c0SXin LI!:ext dib 842a4d6d3b8SXin LI>>4 ulelong x \b, %d x 843a4d6d3b8SXin LI>>8 ulelong x %d x 844a4d6d3b8SXin LI>>14 uleshort x %d 845d38c30c0SXin LI# number of color planes (must be 1) 846d38c30c0SXin LI#>>12 uleshort >1 \b, %u color planes 847d38c30c0SXin LI# compression method: 0~no 1~RLE 8-bit/pixel 3~Huffman 1D 848d38c30c0SXin LI#>>16 ulelong 3 \b, Huffman 1D compression 849d38c30c0SXin LI>>16 ulelong >0 \b, %u compression 850d38c30c0SXin LI# image size is the size of raw bitmap; a dummy 0 can be given for BI_RGB bitmaps 851d38c30c0SXin LI>>20 ulelong x \b, image size %u 852d38c30c0SXin LI# horizontal and vertical resolution of the image (pixel per metre, signed integer) 853a4d6d3b8SXin LI>>24 ulelong >0 \b, resolution %d x 854a4d6d3b8SXin LI>>>28 ulelong x %d px/m 855d38c30c0SXin LI# number of colors in palette, or 0 to default to 2**n 856d38c30c0SXin LI#>>32 ulelong >0 \b, %u colors 857d38c30c0SXin LI# number of important colors used, or 0 when every color is important 858d38c30c0SXin LI>>36 ulelong >0 \b, %u important colors 85943a5ec4eSXin LI# From: Joerg Jenderek 86043a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/VBM_(VDC_BitMap) 86143a5ec4eSXin LI# Reference: http://csbruce.com/cbm/postings/csc19950906-1.txt 86243a5ec4eSXin LI# http://mark0.net/download/triddefs_xml.7z 86343a5ec4eSXin LI# defs/b/bitmap-vbm.trid.xml 86443a5ec4eSXin LI# defs/b/bitmap-vbm-v3.trid.xml 86543a5ec4eSXin LI# Note: called "VDC BitMap" by TrID 86643a5ec4eSXin LI# verified by RECOIL `recoil2png -o tmp.png coke_can.vbm; file tmp.png` 86743a5ec4eSXin LI# begin with a signature of 'B' 'M' 0xCB, followed by a version byte 2 or 3 86843a5ec4eSXin LI# Similar to the unrelated Windows BMP format 86943a5ec4eSXin LI# check for VDC bitmap and then display image dimension and version 87043a5ec4eSXin LI0 name bitmap-vbm 87143a5ec4eSXin LI>2 ubyte 0xCB VDC bitmap 87243a5ec4eSXin LI!:mime image/x-commodore-vbm 87343a5ec4eSXin LI# http://recoil.sourceforge.net/formats.html 87443a5ec4eSXin LI!:ext bm/vbm 87543a5ec4eSXin LI# the VBM format version number: 2 or 3 87643a5ec4eSXin LI>>3 ubyte x \b, version %u 87743a5ec4eSXin LI# width of the image in Hi/Lo format 87843a5ec4eSXin LI>>4 ubeshort x \b, %u 87943a5ec4eSXin LI# height of the image 88043a5ec4eSXin LI>>6 ubeshort x x %u 88143a5ec4eSXin LI# version 3 images have the following additional header information 88243a5ec4eSXin LI>>3 ubyte =3 88343a5ec4eSXin LI# data-encoding type: 0~uncompressed 1~RLE-compressed 88443a5ec4eSXin LI>>>8 ubyte 0 \b, uncompressed 88543a5ec4eSXin LI>>>8 ubyte 1 \b, RLE-compressed 88643a5ec4eSXin LI# byte code for general RLE repetitions 88743a5ec4eSXin LI#>>>9 ubyte x \b, RLE repetition code 0x%x 88843a5ec4eSXin LI# reserved := 0 88943a5ec4eSXin LI#>>>14 short >0 \b, reserved 0x%x 89043a5ec4eSXin LI# length of comment text; 0~no comment text 89143a5ec4eSXin LI#>>>16 ubeshort >0 \b, comment length %u 89243a5ec4eSXin LI>>>16 pstring/H >0 \b, comment "%s" 89343a5ec4eSXin LI# 894b6cee71dSXin LI0 string BM 89543a5ec4eSXin LI# check for magic and version 2 of VDC bitmap or BMP with cbSize=715=CB02 896a4d6d3b8SXin LI>2 ubeshort 0xCB02 89743a5ec4eSXin LI>>6 short =0 89843a5ec4eSXin LI>>>0 use bitmap-bmp 89943a5ec4eSXin LI# VDC bitmap height or maybe a few OS/2 BMP with nonzero "hotspot coordinates" 90043a5ec4eSXin LI>>6 short !0 90143a5ec4eSXin LI>>>0 use bitmap-vbm 90243a5ec4eSXin LI# check for magic and version 3 of VDC bitmap or BMP with cbSize=971=CB03 903a4d6d3b8SXin LI>2 ubeshort 0xCB03 90443a5ec4eSXin LI# check for reserved value (=0) of VDC bitmap 90543a5ec4eSXin LI>>14 short =0 90643a5ec4eSXin LI>>>0 use bitmap-vbm 90743a5ec4eSXin LI# BMP with cbSize=????03CBh and dib header size != 0 90843a5ec4eSXin LI>>14 short !0 90943a5ec4eSXin LI>>>0 use bitmap-bmp 91043a5ec4eSXin LI# cbSize is size of header or file size of Windows BMP bitmap 91143a5ec4eSXin LI>2 default x 91243a5ec4eSXin LI>>0 use bitmap-bmp 91343a5ec4eSXin LI0 name bitmap-bmp 914a4d6d3b8SXin LI>14 ulelong 12 PC bitmap, OS/2 1.x format 91543a5ec4eSXin LI!:mime image/bmp 91643a5ec4eSXin LI!:ext bmp 917a4d6d3b8SXin LI>>18 uleshort x \b, %d x 918a4d6d3b8SXin LI>>20 uleshort x %d 91943a5ec4eSXin LI# number of color planes (must be 1) 920a4d6d3b8SXin LI#>>22 uleshort !1 \b, %u color planes 92143a5ec4eSXin LI# number of bits per pixel (color depth); found 4 8 922a4d6d3b8SXin LI>>24 uleshort x x %d 92343a5ec4eSXin LI# x, y coordinates of the hotspot 92443a5ec4eSXin LI>>6 uleshort >0 \b, hotspot %ux 92543a5ec4eSXin LI>>>8 uleshort x \b%u 92643a5ec4eSXin LI# cbSize; size of file or header like 1Ah 228C8h 92743a5ec4eSXin LI>>2 ulelong x \b, cbSize %u 92843a5ec4eSXin LI#>>2 ulelong x \b, cbSize 0x%8.8x 92943a5ec4eSXin LI# offBits; offset to bitmap data like: 93043a5ec4eSXin LI>>10 ulelong x \b, bits offset %u 93143a5ec4eSXin LI# http://fileformats.archiveteam.org/wiki/BMP#OS.2F2_BMP_2.0 no examples found 93243a5ec4eSXin LI>14 ulelong 48 PC bitmap, OS/2 2.x format (DIB header size=48) 93343a5ec4eSXin LI>14 ulelong 24 PC bitmap, OS/2 2.x format (DIB header size=24) 93443a5ec4eSXin LI# http://entropymine.com/jason/bmpsuite/bmpsuite/q/pal8os2v2-16.bmp 93543a5ec4eSXin LI# Note: by bitmap-bmp-v2o.trid.xml called "Windows Bitmap (v2o)" 93643a5ec4eSXin LI>14 ulelong 16 PC bitmap, OS/2 2.x format (DIB header size=16) 93743a5ec4eSXin LI!:mime image/bmp 93843a5ec4eSXin LI!:apple ????BMPp 93943a5ec4eSXin LI!:ext bmp 94043a5ec4eSXin LI# image width and height fields are unsigned integers for OS/2 94143a5ec4eSXin LI>>18 ulelong x \b, %u x 94243a5ec4eSXin LI>>22 ulelong x %u 94343a5ec4eSXin LI# number of bits per pixel (color depth); found 8 94443a5ec4eSXin LI>>28 uleshort >1 x %u 94543a5ec4eSXin LI# x, y coordinates of the hotspot 94643a5ec4eSXin LI>>6 uleshort >0 \b, hotspot %ux 94743a5ec4eSXin LI>>>8 uleshort x \b%u 94843a5ec4eSXin LI# number of color planes (must be 1) 94943a5ec4eSXin LI#>>26 uleshort >1 \b, %u color planes 95043a5ec4eSXin LI# cbSize; size of file like: 241E 95143a5ec4eSXin LI>>2 ulelong x \b, cbSize %u 95243a5ec4eSXin LI#>>2 ulelong x \b, cbSize 0x%x 95343a5ec4eSXin LI# offBits; offset to bitmap data like: 41E 95443a5ec4eSXin LI>>10 ulelong x \b, bits offset %u 95543a5ec4eSXin LI#>>10 ulelong x \b, bits offset 0x%x 956a4d6d3b8SXin LI>14 ulelong 64 PC bitmap, OS/2 2.x format 957d38c30c0SXin LI!:mime image/bmp 958d38c30c0SXin LI!:apple ????BMPp 959d38c30c0SXin LI!:ext bmp 960d38c30c0SXin LI# image width and height fields are unsigned integers for OS/2 961d38c30c0SXin LI>>18 ulelong x \b, %u x 962d38c30c0SXin LI>>22 ulelong x %u 963d38c30c0SXin LI# number of bits per pixel (color depth); found 1 4 8 964d38c30c0SXin LI>>28 uleshort >1 x %u 965d38c30c0SXin LI# x, y coordinates of the hotspot 966d38c30c0SXin LI>>6 uleshort >0 \b, hotspot %ux 967d38c30c0SXin LI>>>8 uleshort x \b%u 968d38c30c0SXin LI>>26 uleshort >1 \b, %u color planes 969d38c30c0SXin LI# cbSize; size of file or headers 970d38c30c0SXin LI>>2 ulelong x \b, cbSize %u 97143a5ec4eSXin LI# BMP with cbSize 000002CBh=715 or 000003CBh=971 maybe misinterpreted as VDC bitmap 97243a5ec4eSXin LI#>>2 ulelong x \b, cbSize %#x 973d38c30c0SXin LI# offBits; offset to bitmap data like 56h 5Eh 8Eh 43Eh 974d38c30c0SXin LI>>10 ulelong x \b, bits offset %u 97543a5ec4eSXin LI#>>10 ulelong x \b, bits offset %#x 97643a5ec4eSXin LI#>>(10.l) ubequad !0 \b, bits %#16.16llx 977d38c30c0SXin LI# BITMAPV2INFOHEADER adds RGB bit masks 978a4d6d3b8SXin LI>14 ulelong 52 PC bitmap, Adobe Photoshop 979d38c30c0SXin LI!:mime image/bmp 980d38c30c0SXin LI!:apple ????BMPp 981d38c30c0SXin LI!:ext bmp 982a4d6d3b8SXin LI>>18 ulelong x \b, %d x 983a4d6d3b8SXin LI>>22 ulelong x %d x 98443a5ec4eSXin LI# number of bits per pixel (color depth); found 16 32 985a4d6d3b8SXin LI>>28 uleshort x %d 98643a5ec4eSXin LI# x, y coordinates of the hotspot; should be zero for Windows variant 98743a5ec4eSXin LI>>6 uleshort >0 \b, hotspot %ux 98843a5ec4eSXin LI>>>8 uleshort x \b%u 98943a5ec4eSXin LI# cbSize; size of file like: 14A 7F42 99043a5ec4eSXin LI>>2 ulelong x \b, cbSize %u 99143a5ec4eSXin LI#>>2 ulelong x \b, cbSize 0x%x 99243a5ec4eSXin LI# offBits; offset to bitmap data like: 42h 99343a5ec4eSXin LI>>10 ulelong x \b, bits offset %u 99443a5ec4eSXin LI#>>10 ulelong x \b, bits offset 0x%x 995d38c30c0SXin LI# BITMAPV3INFOHEADER adds alpha channel bit mask 996a4d6d3b8SXin LI>14 ulelong 56 PC bitmap, Adobe Photoshop with alpha channel mask 997d38c30c0SXin LI!:mime image/bmp 998d38c30c0SXin LI!:apple ????BMPp 999d38c30c0SXin LI!:ext bmp 1000a4d6d3b8SXin LI>>18 ulelong x \b, %d x 1001a4d6d3b8SXin LI>>22 ulelong x %d x 100243a5ec4eSXin LI# number of bits per pixel (color depth); found 16 32 1003a4d6d3b8SXin LI>>28 uleshort x %d 100443a5ec4eSXin LI# x, y coordinates of the hotspot; should be zero for Windows variant 100543a5ec4eSXin LI>>6 uleshort >0 \b, hotspot %ux 100643a5ec4eSXin LI>>>8 uleshort x \b%u 100743a5ec4eSXin LI# cbSize; size of file like: 4E 7F46 131DE 14046h 100843a5ec4eSXin LI>>2 ulelong x \b, cbSize %u 100943a5ec4eSXin LI#>>2 ulelong x \b, cbSize 0x%x 101043a5ec4eSXin LI# offBits; offset to bitmap data like: 46h 101143a5ec4eSXin LI>>10 ulelong x \b, bits offset %u 101243a5ec4eSXin LI#>>10 ulelong x \b, bits offset 0x%x 1013a4d6d3b8SXin LI>14 ulelong 40 1014d38c30c0SXin LI# jump 4 bytes before end of file/header to skip fmt-116-signature-id-118.dib 101543a5ec4eSXin LI# broken for large bitmaps 101643a5ec4eSXin LI#>>(2.l-4) ulong x PC bitmap, Windows 3.x format 1017a4d6d3b8SXin LI>>14 ulelong 40 PC bitmap, Windows 3.x format 1018d38c30c0SXin LI!:mime image/bmp 1019d38c30c0SXin LI!:apple ????BMPp 1020a4d6d3b8SXin LI>>>18 ulelong x \b, %d x 1021a4d6d3b8SXin LI>>>22 ulelong x %d 1022d38c30c0SXin LI# 320 x 400 https://en.wikipedia.org/wiki/LOGO.SYS 1023d38c30c0SXin LI>>>18 ulequad =0x0000019000000140 x 1024d38c30c0SXin LI!:ext bmp/sys 1025d38c30c0SXin LI>>>18 ulequad !0x0000019000000140 1026d38c30c0SXin LI# compression method 2~RLE 4-bit/pixel implies also extension rle 1027d38c30c0SXin LI>>>>30 ulelong 2 x 1028d38c30c0SXin LI!:ext bmp/rle 102943a5ec4eSXin LI# not RLE compressed and not 320x400 dimension 103043a5ec4eSXin LI>>>>30 default x 103143a5ec4eSXin LI# "small" dimensions like: 14x15 15x16 16x14 16x16 32x32 103243a5ec4eSXin LI# https://en.wikipedia.org/wiki/Favicon 103343a5ec4eSXin LI>>>>>18 ulequad&0xffFFffC0ffFFffC0 =0 x 103443a5ec4eSXin LI# https://www.politi-kdigital.de/favicon.ico 103543a5ec4eSXin LI# http://forum.rpc1.org/favicon.ico 103643a5ec4eSXin LI!:ext bmp/ico 103743a5ec4eSXin LI# "big" dimensions > 63 103843a5ec4eSXin LI>>>>>18 default x x 1039d38c30c0SXin LI!:ext bmp 1040d38c30c0SXin LI# number of bits per pixel (color depth); found 1 2 4 8 16 24 32 1041a4d6d3b8SXin LI>>>28 uleshort x %d 1042d38c30c0SXin LI# x, y coordinates of the hotspot; there is no hotspot in bitmaps, so values 0 1043d38c30c0SXin LI#>>>6 uleshort >0 \b, hotspot %ux 1044d38c30c0SXin LI#>>>>8 uleshort x \b%u 1045d38c30c0SXin LI# number of color planes (must be 1), except badplanes.bmp for testing 1046d38c30c0SXin LI#>>>26 uleshort >1 \b, %u color planes 1047d38c30c0SXin LI# compression method: 0~no 1~RLE 8-bit/pixel 2~RLE 4-bit/pixel 3~Huffman 1D 6~RGBA bit field masks 1048d38c30c0SXin LI#>>>30 ulelong 3 \b, Huffman 1D compression 1049d38c30c0SXin LI>>>30 ulelong >0 \b, %u compression 1050d38c30c0SXin LI# image size is the size of raw bitmap; a dummy 0 can be given for BI_RGB bitmaps 1051d38c30c0SXin LI>>>34 ulelong >0 \b, image size %u 1052d38c30c0SXin LI# horizontal and vertical resolution of the image (pixel per metre, signed integer) 1053a4d6d3b8SXin LI>>>38 ulelong >0 \b, resolution %d x 1054a4d6d3b8SXin LI>>>>42 ulelong x %d px/m 1055d38c30c0SXin LI# number of colors in palette 16 256, or 0 to default to 2**n 1056d38c30c0SXin LI#>>>46 ulelong >0 \b, %u colors 1057d38c30c0SXin LI# number of important colors used, or 0 when every color is important 1058d38c30c0SXin LI>>>50 ulelong >0 \b, %u important colors 1059d38c30c0SXin LI# cbSize; often size of file 1060d38c30c0SXin LI>>>2 ulelong x \b, cbSize %u 106143a5ec4eSXin LI#>>>2 ulelong x \b, cbSize %#x 1062d38c30c0SXin LI# offBits; offset to bitmap data like 36h 76h BEh 236h 406h 436h 4E6h 1063d38c30c0SXin LI>>>10 ulelong x \b, bits offset %u 106443a5ec4eSXin LI#>>>10 ulelong x \b, bits offset %#x 106543a5ec4eSXin LI#>>>(10.l) ubequad !0 \b, bits %#16.16llxd 1066a4d6d3b8SXin LI>14 ulelong 124 PC bitmap, Windows 98/2000 and newer format 106743a5ec4eSXin LI!:mime image/bmp 106843a5ec4eSXin LI!:ext bmp 1069a4d6d3b8SXin LI>>18 ulelong x \b, %d x 1070a4d6d3b8SXin LI>>22 ulelong x %d x 107143a5ec4eSXin LI# color planes; must be 1 107243a5ec4eSXin LI#>>>26 uleshort >1 \b, %u color planes 107343a5ec4eSXin LI# number of bits per pixel (color depth); found 4 8 16 24 32 1 (fmt-119-signature-id-121.bmp) 0 (rgb24jpeg.bmp rgb24png.bmp) 1074a4d6d3b8SXin LI>>28 uleshort x %d 107543a5ec4eSXin LI# x, y coordinates of the hotspot; should be zero for Windows variant 1076a4d6d3b8SXin LI>>6 uleshort >0 \b, hotspot %ux 1077a4d6d3b8SXin LI>>>8 uleshort x \b%u 107843a5ec4eSXin LI# cbSize; size of file like: 8E AA 48A 999 247A 4F02 7F8A 3F88E B216E 1D4C8A 100008A 107943a5ec4eSXin LI>>2 ulelong x \b, cbSize %u 108043a5ec4eSXin LI#>>2 ulelong x \b, cbSize 0x%x 108143a5ec4eSXin LI# offBits; offset to bitmap data like: 8A 47A ABABABAB (fmt-119-signature-id-121.bmp) 108243a5ec4eSXin LI>>10 ulelong x \b, bits offset %u 108343a5ec4eSXin LI#>>10 ulelong x \b, bits offset 0x%x 1084a4d6d3b8SXin LI>14 ulelong 108 PC bitmap, Windows 95/NT4 and newer format 108543a5ec4eSXin LI!:mime image/bmp 108643a5ec4eSXin LI!:ext bmp 1087a4d6d3b8SXin LI>>18 ulelong x \b, %d x 1088a4d6d3b8SXin LI>>22 ulelong x %d x 108943a5ec4eSXin LI# number of bits per pixel (color depth); found 8 24 32 1090a4d6d3b8SXin LI>>28 uleshort x %d 109143a5ec4eSXin LI# x, y coordinates of the hotspot; should be zero for Windows variant 1092a4d6d3b8SXin LI>>6 uleshort >0 \b, hotspot %ux 1093a4d6d3b8SXin LI>>>8 uleshort x \b%u 109443a5ec4eSXin LI# cbSize; size of file like: 82 8A 9A 9F86 1E07A 3007A 88B7A C007A 109543a5ec4eSXin LI>>2 ulelong x \b, cbSize %u 109643a5ec4eSXin LI#>>2 ulelong x \b, cbSize 0x%x 109743a5ec4eSXin LI# offBits; offset to bitmap data like: 7A 7E 46A 109843a5ec4eSXin LI>>10 ulelong x \b, bits offset %u 109943a5ec4eSXin LI#>>10 ulelong x \b, bits offset 0x%x 1100d38c30c0SXin LI# Update: Joerg Jenderek 1101d38c30c0SXin LI# URL: http://fileformats.archiveteam.org/wiki/OS/2_Icon 1102d38c30c0SXin LI# Reference: http://www.fileformat.info 1103d38c30c0SXin LI# /format/os2bmp/spec/902d5c253f2a43ada39c2b81034f27fd/view.htm 1104d38c30c0SXin LI# Note: verified by command like `deark -l -d3 OS2MEMU.ICO` 1105d38c30c0SXin LI0 string IC 1106d38c30c0SXin LI# skip Lotus smart icon *.smi by looking for valid hotspot coordinates 1107d38c30c0SXin LI>6 ulelong&0xFF00FF00 =0 OS/2 icon 1108d38c30c0SXin LI# jump 4 bytes before end of header/file and test for accessibility 1109d38c30c0SXin LI#>>(2.l-4) ubelong x End of header is OK! 1110d38c30c0SXin LI!:mime image/x-os2-ico 1111d38c30c0SXin LI!:ext ico 1112d38c30c0SXin LI# cbSize; size of header or file in bytes like 1ah 120h 420h 1113d38c30c0SXin LI>>2 ulelong x \b, cbSize %u 1114d38c30c0SXin LI# xHotspot, yHotspot; coordinates of the hotspot for icons like 16 32 1115d38c30c0SXin LI>>6 uleshort x \b, hotspot %ux 1116d38c30c0SXin LI>>8 uleshort x \b%u 1117d38c30c0SXin LI# offBits; offset in bytes to the beginning of the bit-map pel data like 20h 1118d38c30c0SXin LI>>10 ulelong x \b, bits offset %u 111943a5ec4eSXin LI#>>(10.l) ubequad x \b, bits %#16.16llx 1120b6cee71dSXin LI#0 string PI PC pointer image data 1121b6cee71dSXin LI#0 string CI PC color icon data 1122d38c30c0SXin LI0 string CI 1123d38c30c0SXin LI# test also for valid dib header sizes 12 or 64 1124d38c30c0SXin LI>14 ulelong <65 OS/2 1125d38c30c0SXin LI# test also for valid hotspot coordinates 1126d38c30c0SXin LI#>>6 ulelong&0xFE00FE00 =0 OS/2 1127d38c30c0SXin LI!:mime image/x-os2-ico 1128d38c30c0SXin LI!:ext ico 1129d38c30c0SXin LI>>14 ulelong 12 1.x color icon 1130d38c30c0SXin LI# image width and height fields are unsigned integers for OS/2 1131d38c30c0SXin LI>>>18 uleshort x %u x 1132d38c30c0SXin LI# stored height = 2 * real height 1133d38c30c0SXin LI>>>20 uleshort/2 x %u 1134d38c30c0SXin LI# number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found 1135d38c30c0SXin LI>>>24 uleshort >1 x %u 1136d38c30c0SXin LI# color planes; must be 1 1137d38c30c0SXin LI#>>>22 uleshort >1 \b, %u color planes 1138d38c30c0SXin LI>>14 ulelong 64 2.x color icon 1139d38c30c0SXin LI# image width and height 1140d38c30c0SXin LI>>>18 ulelong x %u x 1141d38c30c0SXin LI# stored height = 2 * real height 1142d38c30c0SXin LI>>>22 ulelong/2 x %u 1143d38c30c0SXin LI# number of bits per pixel (color depth). only 1 found 1144d38c30c0SXin LI>>>28 uleshort >1 x %u 1145d38c30c0SXin LI#>>>26 uleshort >1 \b, %u color planes 1146d38c30c0SXin LI# compression method: 0~no 3~Huffman 1D 1147d38c30c0SXin LI>>>30 ulelong 3 \b, Huffman 1D compression 1148d38c30c0SXin LI#>>>30 ulelong >0 \b, %u compression 1149d38c30c0SXin LI# xHotspot, yHotspot; coordinates of the hotspot like 0 1 16 20 32 33 63 64 1150d38c30c0SXin LI>>6 uleshort x \b, hotspot %ux 1151d38c30c0SXin LI>>8 uleshort x \b%u 1152d38c30c0SXin LI# cbSize; size of header or maybe file in bytes like 1Ah 4Eh 84Eh 1153d38c30c0SXin LI>>2 ulelong x \b, cbSize %u 1154d38c30c0SXin LI#>>2 ulelong x \b, cbSize %x 1155d38c30c0SXin LI# offBits; offset to bitmap data (pixel array) like E4h 3Ah 66h 6Ah 33Ah 4A4h 1156d38c30c0SXin LI>>10 ulelong x \b, bits offset %u 115743a5ec4eSXin LI#>>10 ulelong x \b, bits offset %#x 115843a5ec4eSXin LI#>>(10.l) ubequad !0 \b, bits %#16.16llx 1159d38c30c0SXin LI# dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x 1160d38c30c0SXin LI#>>14 ulelong x \b, dib header size %u 1161b6cee71dSXin LI#0 string CP PC color pointer image data 1162d38c30c0SXin LI# URL: http://fileformats.archiveteam.org/wiki/OS/2_Pointer 1163d38c30c0SXin LI# Reference: http://www.fileformat.info/format/os2bmp/egff.htm 1164d38c30c0SXin LI0 string CP 116543a5ec4eSXin LI# skip many Corel Photo-Paint image "CPT9FILE" by checking for positive bits offset 116643a5ec4eSXin LI>10 ulelong >0 1167d38c30c0SXin LI# skip CPU-Z Report by checking for valid dib header sizes 12 or 64 116843a5ec4eSXin LI>>14 ulelong =12 116943a5ec4eSXin LI>>>0 use os2-ptr 117043a5ec4eSXin LI>>14 ulelong =64 117143a5ec4eSXin LI>>>0 use os2-ptr 117243a5ec4eSXin LI# display information of OS/2 pointer bitmaps 117343a5ec4eSXin LI0 name os2-ptr 117443a5ec4eSXin LI>14 ulelong x OS/2 1175d38c30c0SXin LI# http://extension.nirsoft.net/PTR 1176d38c30c0SXin LI!:mime image/x-ibm-pointer 1177d38c30c0SXin LI!:ext ptr 1178d38c30c0SXin LI>>14 ulelong 12 1.x color pointer 1179d38c30c0SXin LI# image width and height fields are unsigned integers for OS/2 1180d38c30c0SXin LI>>>18 uleshort x %u x 1181d38c30c0SXin LI# stored height = 2 * real height 1182d38c30c0SXin LI>>>20 uleshort/2 x %u 1183d38c30c0SXin LI# number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found 1184d38c30c0SXin LI>>>24 uleshort >1 x %u 1185d38c30c0SXin LI# color planes; must be 1 1186d38c30c0SXin LI#>>>22 uleshort >1 \b, %u color planes 1187d38c30c0SXin LI>>14 ulelong 64 2.x color pointer 1188d38c30c0SXin LI# image width and height 1189d38c30c0SXin LI>>>18 ulelong x %u x 1190d38c30c0SXin LI# stored height = 2 * real height 1191d38c30c0SXin LI>>>22 ulelong/2 x %u 1192d38c30c0SXin LI# number of bits per pixel (color depth). only 1 found 1193d38c30c0SXin LI>>>28 uleshort >1 x %u 1194d38c30c0SXin LI#>>>26 uleshort >1 \b, %u color planes 1195d38c30c0SXin LI# compression method: 0~no 3~Huffman 1D 1196d38c30c0SXin LI>>>30 ulelong 3 \b, Huffman 1D compression 1197d38c30c0SXin LI#>>>30 ulelong >0 \b, %u compression 1198d38c30c0SXin LI# xHotspot, yHotspot; coordinates of the hotspot like 0 3 4 8 15 16 23 27 31 1199d38c30c0SXin LI>>6 uleshort x \b, hotspot %ux 1200d38c30c0SXin LI>>8 uleshort x \b%u 1201d38c30c0SXin LI# cbSize; size of header or maybe file in bytes like 1Ah 4Eh 1202d38c30c0SXin LI>>2 ulelong x \b, cbSize %u 1203d38c30c0SXin LI#>>2 ulelong x \b, cbSize %x 1204d38c30c0SXin LI# offBits; offset to bitmap data (pixel array) like 6Ah A4h E4h 4A4h 1205d38c30c0SXin LI>>10 ulelong x \b, bits offset %u 120643a5ec4eSXin LI#>>10 ulelong x \b, bits offset %#x 120743a5ec4eSXin LI#>>(10.l) ubequad !0 \b, bits %#16.16llx 1208d38c30c0SXin LI# dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x 1209d38c30c0SXin LI#>>14 ulelong x \b, dib header size %u 1210*ae316d1dSXin LI# Type: Vision Research Phantom CINE Format 1211*ae316d1dSXin LI# URL: https://www.phantomhighspeed.com/ 1212*ae316d1dSXin LI# URL2: http://phantomhighspeed.force.com/vriknowledge/servlet/fileField?id=0BEU0000000Cfyk 1213*ae316d1dSXin LI# From: Harry Mallon <hjmallon at gmail.com> 1214*ae316d1dSXin LI# 1215*ae316d1dSXin LI# This has a short "CI" code but the 44 is the size of the struct which is 1216*ae316d1dSXin LI# stable 1217*ae316d1dSXin LI>2 uleshort 44 Vision Research CINE Video, 1218*ae316d1dSXin LI>>4 uleshort 0 Grayscale, 1219*ae316d1dSXin LI>>4 uleshort 1 JPEG Compressed, 1220*ae316d1dSXin LI>>4 uleshort 2 RAW, 1221*ae316d1dSXin LI>>6 uleshort x version %d, 1222*ae316d1dSXin LI>>20 ulelong x %d frames, 1223*ae316d1dSXin LI>>48 ulelong x %dx 1224*ae316d1dSXin LI>>52 ulelong x \b%d 1225*ae316d1dSXin LI 1226b6cee71dSXin LI# Conflicts with other entries [BABYL] 1227d38c30c0SXin LI# URL: http://fileformats.archiveteam.org/wiki/BMP#OS.2F2_Bitmap_Array 1228d38c30c0SXin LI# Note: container for OS/2 icon "IC", color icon "CI", color pointer "CP" or bitmap "BM" 1229b6cee71dSXin LI#0 string BA PC bitmap array data 1230d38c30c0SXin LI0 string BA 1231d38c30c0SXin LI# skip old Emacs RMAIL BABYL ./mail.news by checking for low header size 1232d38c30c0SXin LI>2 ulelong <0x004c5942 OS/2 graphic array 1233d38c30c0SXin LI!:mime image/x-os2-graphics 1234d38c30c0SXin LI#!:apple ????BMPf 1235d38c30c0SXin LI# cbSize; size of header like 28h 5Ch 1236d38c30c0SXin LI>>2 ulelong x \b, cbSize %u 123743a5ec4eSXin LI#>>2 ulelong x \b, cbSize %#x 1238d38c30c0SXin LI# offNext; offset to data like 0 48h F2h 4Eh 64h C6h D2h D6h DAh E6h EAh 348h 1239d38c30c0SXin LI>>6 ulelong >0 \b, data offset %u 124043a5ec4eSXin LI#>>6 ulelong >0 \b, data offset %#x 124143a5ec4eSXin LI#>>(6.l) ubequad !0 \b, data %#16.16llx 1242d38c30c0SXin LI# dimensions of the intended device like 640 x 480 for VGA or 1024 x 768 1243d38c30c0SXin LI>>10 uleshort >0 \b, display %u 1244d38c30c0SXin LI>>>12 uleshort >0 x %u 1245d38c30c0SXin LI# usType of first array element 1246d38c30c0SXin LI#>>14 string x \b, usType %2.2s 1247d38c30c0SXin LI# 1 space char after "1st" 1248d38c30c0SXin LI# no *.bga examples found https://www.openwith.org/file-extensions/bga/1342 1249d38c30c0SXin LI>>14 string BM \b; 1st 1250d38c30c0SXin LI!:ext bmp/bga 1251d38c30c0SXin LI>>14 string CI \b; 1st 1252d38c30c0SXin LI!:ext ico 1253d38c30c0SXin LI>>14 string CP \b; 1st 1254d38c30c0SXin LI!:ext ico 1255d38c30c0SXin LI>>14 string IC \b; 1st 1256d38c30c0SXin LI!:ext ico 1257d38c30c0SXin LI# no white-black pointer found 1258d38c30c0SXin LI#>>14 string PT \b; 1st 1259d38c30c0SXin LI#!:ext 1260d38c30c0SXin LI>>14 indirect x 1261b6cee71dSXin LI 1262b6cee71dSXin LI# XPM icons (Greg Roelofs, newt@uchicago.edu) 1263a4d6d3b8SXin LI# Update: Joerg Jenderek 1264a4d6d3b8SXin LI# URL: http://fileformats.archiveteam.org/wiki/XPM 1265a4d6d3b8SXin LI# Reference: http://www.x.org/docs/XPM/xpm.pdf 1266a4d6d3b8SXin LI# http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-xpm.trid.xml 1267a4d6d3b8SXin LI# Note: called "X PixMap bitmap" by TrID and "X-Windows Pixmap Image" by DROID via PUID x-fmt/208 1268a4d6d3b8SXin LI# starting with c comment like: logo.xpm 1269a4d6d3b8SXin LI0 string /*\040 1270a4d6d3b8SXin LI# 9 byte c-comment "/* XPM */" not at the beginning like: mozicon16.xpm mozicon50.xpm (thunderbird) 1271a4d6d3b8SXin LI>0 search/0xCE /*\ XPM\ */ 1272898496eeSXin LI# skip DROID x-fmt-208-signature-id-620.xpm by looking for char array without explict length 1273a4d6d3b8SXin LI# and match mh-logo.xpm (emacs) 1274a4d6d3b8SXin LI>>&0 search/1249 [] 1275a4d6d3b8SXin LI>>>0 use xpm-image 1276a4d6d3b8SXin LI# non standard because no 9 byte c-comment "/* XPM */" like: logo.xpm in qemu package 1277a4d6d3b8SXin LI>0 default x 1278a4d6d3b8SXin LI# words are separated by a white space which can be composed of space and tabulation characters 1279a4d6d3b8SXin LI>>0 search/0x52 static\040char\040 1280898496eeSXin LI# skip debug.c testmlc.c by looking for char array without explict length 1281a4d6d3b8SXin LI# https://www.clamav.net/downloads/production/clamav-0.104.2.tar.gz 1282a4d6d3b8SXin LI# clamav-0.104.2\libclammspack\mspack\debug.c 1283a4d6d3b8SXin LI>>>&0 search/64 [] 1284a4d6d3b8SXin LI>>>>0 use xpm-image 1285a4d6d3b8SXin LI# display X pixmap image information 1286a4d6d3b8SXin LI0 name xpm-image 1287a4d6d3b8SXin LI>0 string x X pixmap image text 1288a4d6d3b8SXin LI#!:mime text/plain 1289a4d6d3b8SXin LI# https://reposcope.com/mimetype/image/x-xpixmap 1290a4d6d3b8SXin LI# alias 1291a4d6d3b8SXin LI#!:mime image/x-xpm 1292a4d6d3b8SXin LI!:mime image/x-xpixmap 1293a4d6d3b8SXin LI!:ext xpm 1294a4d6d3b8SXin LI# NO pm example found! 1295a4d6d3b8SXin LI#!:ext xpm/pm 1296a4d6d3b8SXin LI# look for start of character array at beginning of a line like: psetupl.xpm (OpenOffice 4.1.7) 1297a4d6d3b8SXin LI>0 search/0x406 \n" 1298a4d6d3b8SXin LI# DEBUG VALUES string 1299a4d6d3b8SXin LI#>>&0 string x '%s' 1300a4d6d3b8SXin LI# width with optional white space before like: 16 24 32 48 1280 1301a4d6d3b8SXin LI>>&0 regex/8 [0-9]{1,5} \b, %s 1302a4d6d3b8SXin LI# height with white space like: 15 16 17 24 32 48 1024 1303a4d6d3b8SXin LI>>>&0 regex/8 [0-9]{1,5} x %s 1304a4d6d3b8SXin LI# number of colors with white space like: 1 2 3 4 5 8 11 14 162 255 but unrelistic 4294967295 by hardcopy tool 1305a4d6d3b8SXin LI>>>>&0 regex/12 [0-9]{1,9} x %s 1306a4d6d3b8SXin LI# chars_per_pixel with white space like: 1 2 1307a4d6d3b8SXin LI>>>>>&0 regex/14 [0-9]{1,2} \b, %s chars/pixel 1308a4d6d3b8SXin LI# non standard because not starting with 9 byte c-comment "/* XPM */" 1309a4d6d3b8SXin LI>0 string !/*\ XPM\ */ 1310a4d6d3b8SXin LI>>0 string x \b, 1st line "%s" 1311b6cee71dSXin LI 1312b6cee71dSXin LI# Utah Raster Toolkit RLE images (janl@ifi.uio.no) 1313a4d6d3b8SXin LI0 uleshort 0xcc52 RLE image data, 1314a4d6d3b8SXin LI>6 uleshort x %d x 1315a4d6d3b8SXin LI>8 uleshort x %d 1316a4d6d3b8SXin LI>2 uleshort >0 \b, lower left corner: %d 1317a4d6d3b8SXin LI>4 uleshort >0 \b, lower right corner: %d 1318a4d6d3b8SXin LI>10 ubyte&0x1 =0x1 \b, clear first 1319a4d6d3b8SXin LI>10 ubyte&0x2 =0x2 \b, no background 1320a4d6d3b8SXin LI>10 ubyte&0x4 =0x4 \b, alpha channel 1321a4d6d3b8SXin LI>10 ubyte&0x8 =0x8 \b, comment 1322a4d6d3b8SXin LI>11 ubyte >0 \b, %d color channels 1323a4d6d3b8SXin LI>12 ubyte >0 \b, %d bits per pixel 1324a4d6d3b8SXin LI>13 ubyte >0 \b, %d color map channels 1325b6cee71dSXin LI 1326b6cee71dSXin LI# image file format (Robert Potter, potter@cs.rochester.edu) 1327b6cee71dSXin LI0 string Imagefile\ version- iff image data 1328b6cee71dSXin LI# this adds the whole header (inc. version number), informative but longish 1329b6cee71dSXin LI>10 string >\0 %s 1330b6cee71dSXin LI 1331b6cee71dSXin LI# Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com) 1332a4d6d3b8SXin LI0 ubelong 0x59a66a95 Sun raster image data 1333a4d6d3b8SXin LI>4 ubelong >0 \b, %d x 1334a4d6d3b8SXin LI>8 ubelong >0 %d, 1335a4d6d3b8SXin LI>12 ubelong >0 %d-bit, 1336a4d6d3b8SXin LI#>16 ubelong >0 %d bytes long, 1337a4d6d3b8SXin LI>20 ubelong 0 old format, 1338a4d6d3b8SXin LI#>20 ubelong 1 standard, 1339a4d6d3b8SXin LI>20 ubelong 2 compressed, 1340a4d6d3b8SXin LI>20 ubelong 3 RGB, 1341a4d6d3b8SXin LI>20 ubelong 4 TIFF, 1342a4d6d3b8SXin LI>20 ubelong 5 IFF, 1343a4d6d3b8SXin LI>20 ubelong 0xffff reserved for testing, 1344a4d6d3b8SXin LI>24 ubelong 0 no colormap 1345a4d6d3b8SXin LI>24 ubelong 1 RGB colormap 1346a4d6d3b8SXin LI>24 ubelong 2 raw colormap 1347a4d6d3b8SXin LI#>28 ubelong >0 colormap is %d bytes long 1348b6cee71dSXin LI 1349b6cee71dSXin LI# SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com) 1350b6cee71dSXin LI# 1351*ae316d1dSXin LI# Update: Joerg Jenderek 1352*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/SGI_(image_file_format) 1353*ae316d1dSXin LI# https://en.wikipedia.org/wiki/Silicon_Graphics_Image 1354*ae316d1dSXin LI# Reference: https://paulbourke.net/dataformats/sgirgb/sgiversion.html 1355*ae316d1dSXin LI# http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-sgi.trid.xml 1356*ae316d1dSXin LI# Note: called "Silicon Graphics bitmap (generic)" by TrID, 1357*ae316d1dSXin LI# "Silicon Graphics Image" by DROID via PUID x-fmt/140 and shared MIME-info database from freedesktop.org, 1358*ae316d1dSXin LI# verfied by ImageMagick `identify -verbose *.sgi` as SGI (Irix RGB image) and 1359*ae316d1dSXin LI# verfied by XnView `nconvert -in sgi -info *.sgi` as SGI RGB 1360*ae316d1dSXin LI# look for magic number (integer 474=0x01DA) + storage format (0 or 1) + number of bytes per pixel channel (1 or 2) 1361*ae316d1dSXin LI# to skip few TeX font metric data (like pxmi.tfm pxmi1.tfm eksfi8a.tfm ./tex) with invalid "high" bytes/pixel (11 12) 1362*ae316d1dSXin LI0 ubelong&0xFFffFEfc 0x01da0000 1363*ae316d1dSXin LI# skip DROID x-fmt-140-signature-id-623.bw with invalid "low" dimensions "0 x 0" 1364*ae316d1dSXin LI>6 long !0 SGI image data 1365*ae316d1dSXin LI#!:mime image/sgi 1366*ae316d1dSXin LI!:mime image/x-sgi 1367*ae316d1dSXin LI!:apple ????.SGI 1368*ae316d1dSXin LI# STORAGE format; allowed values 0~VERBATIM 1~RLE 1369*ae316d1dSXin LI#>>2 ubyte 0 \b, verbatim 1370*ae316d1dSXin LI>>2 ubyte 1 \b, RLE 1371*ae316d1dSXin LI#>>2 ubyte >1 STORAGE=%#x 1372*ae316d1dSXin LI# BPC; number of bytes per pixel component; allowed values 1 2 1373*ae316d1dSXin LI#>>3 ubyte 1 \b, normal precision 1374*ae316d1dSXin LI>>3 ubyte 2 \b, high precision 1375*ae316d1dSXin LI#>>3 ubyte x BPC=%#x 1376*ae316d1dSXin LI# DIMENSION; allowed values are 1~scanline 2~XSIZExYSIZE 3~XSIZExYSIZExZSIZE 1377*ae316d1dSXin LI>>4 ubeshort x \b, %d-D 1378*ae316d1dSXin LI# XSIZE; width of image in pixels 1379*ae316d1dSXin LI>>6 ubeshort x \b, %d x 1380*ae316d1dSXin LI# YSIZE; height of image in pixels 1381*ae316d1dSXin LI>>8 ubeshort x %d 1382*ae316d1dSXin LI# ZSIZE; number of channels in image; 1~B/W (greyscale) 3~RGB 4~RGB+ALPHA channel 1383*ae316d1dSXin LI>>10 ubeshort x \b, %d 1384*ae316d1dSXin LI# GRR: avoid 1385*ae316d1dSXin LI# Magdir\images, 1347: Warning: Current entry does not yet have a description for adding a EXTENSION type 1386*ae316d1dSXin LI>>>10 ubeshort 1 channel 1387*ae316d1dSXin LI# GRR: exception https://sembiance.com/fileFormatSamples/image/sgi/greytest.rgb 1388*ae316d1dSXin LI!:ext bw 1389*ae316d1dSXin LI# no examples found with .int suffix 1390*ae316d1dSXin LI#!:ext bw/int 1391*ae316d1dSXin LI# no examples found with .inta suffix for black/white+ALPHA channel 1392*ae316d1dSXin LI# no examples found with 2 channels 1393*ae316d1dSXin LI#>>>10 ubeshort 2 channels 1394*ae316d1dSXin LI#!:ext sgi 1395*ae316d1dSXin LI>>>10 ubeshort 3 channels 1396*ae316d1dSXin LI!:ext rgb/sgi 1397*ae316d1dSXin LI>>>10 ubeshort 4 channels 1398*ae316d1dSXin LI!:ext rgba/sgi 1399*ae316d1dSXin LI>>>10 default x channels 1400*ae316d1dSXin LI# no examples found with 5 and more channels 1401*ae316d1dSXin LI!:ext sgi 1402*ae316d1dSXin LI# IMAGENAME; null terminated ascii string of up to 79 characters 1403*ae316d1dSXin LI>>24 string >\0 \b, "%0.80s" 1404*ae316d1dSXin LI# PINMIN; minimum pixel value in the image; often 0 1405*ae316d1dSXin LI>>12 ubelong !0 \b, %u PINMIN 1406*ae316d1dSXin LI# PINMAX; maximum pixel value in the image; often 255 1407*ae316d1dSXin LI>>16 ubelong !255 \b, %u PINMAX 1408*ae316d1dSXin LI# DUMMY; 4 bytes of data should be set to 0 1409*ae316d1dSXin LI>>20 ubelong !0 \b, at 20 %#x 1410*ae316d1dSXin LI# COLORMAP; 0~normal 1~DITHEREDobsolete 2~SCREENobsolete 3~COLORMAP 1411*ae316d1dSXin LI>>104 ubelong !0 \b, %u COLORMAP 1412*ae316d1dSXin LI# DUMMY; 404 bytes should be set to 0 but not always true; makes header exactly 512 bytes 1413*ae316d1dSXin LI>>111 ubyte !0 \b, at 111 %#x 1414*ae316d1dSXin LI>>113 ubyte !0 \b, at 113 %#x 1415*ae316d1dSXin LI>>118 ubeshort !0 \b, at 118 %#4.4x 1416*ae316d1dSXin LI>>121 ubyte !0 \b, at 121 %#x 1417*ae316d1dSXin LI>>132 ubelong !0 \b, at 132 %#8.8x 1418*ae316d1dSXin LI>>135 ubyte !0 \b, at 135 %#x 1419*ae316d1dSXin LI>>137 ubequad !0 \b, at 137 %#16.16llx 1420b6cee71dSXin LI 1421b6cee71dSXin LI0 string IT01 FIT image data 1422a4d6d3b8SXin LI>4 ubelong x \b, %d x 1423a4d6d3b8SXin LI>8 ubelong x %d x 1424a4d6d3b8SXin LI>12 ubelong x %d 1425b6cee71dSXin LI# 1426b6cee71dSXin LI0 string IT02 FIT image data 1427a4d6d3b8SXin LI>4 ubelong x \b, %d x 1428a4d6d3b8SXin LI>8 ubelong x %d x 1429a4d6d3b8SXin LI>12 ubelong x %d 1430b6cee71dSXin LI# 1431b6cee71dSXin LI2048 string PCD_IPI Kodak Photo CD image pack file 1432a4d6d3b8SXin LI>0xe02 ubyte&0x03 0x00 , landscape mode 1433a4d6d3b8SXin LI>0xe02 ubyte&0x03 0x01 , portrait mode 1434a4d6d3b8SXin LI>0xe02 ubyte&0x03 0x02 , landscape mode 1435a4d6d3b8SXin LI>0xe02 ubyte&0x03 0x03 , portrait mode 1436b6cee71dSXin LI0 string PCD_OPA Kodak Photo CD overview pack file 1437b6cee71dSXin LI 1438b6cee71dSXin LI# FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu> 1439*ae316d1dSXin LI# Update: Joerg Jenderek 1440*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/Flexible_Image_Transport_System 1441*ae316d1dSXin LI# https://en.wikipedia.org/wiki/FITS 1442*ae316d1dSXin LI# Reference: https://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-fts.trid.xml 1443*ae316d1dSXin LI# Note: called "Flexible Image Transport System bitmap" by TrID, GIMP and DROID via PUID x-fmt/383 1444*ae316d1dSXin LI# "FITS document" with expanded acronym "Flexible Image Transport System" by shared MIME-info database from freedesktop.org 1445*ae316d1dSXin LI# verified as "Flexible Image Transport System" by XnView `nconvert -fullinfo M57.FIT MOON.FTS` , 1446*ae316d1dSXin LI# as "FTS (Flexible Image Transport System)" by ImageMagick command `identify MOON.FTS` , 1447*ae316d1dSXin LI# by NetPBM `fitstopnm M57.FIT | file` , 1448*ae316d1dSXin LI# falsified by `fitsverify M57.FIT MOON.FTS` 1449b6cee71dSXin LI# FITS is the Flexible Image Transport System, the de facto standard for 1450b6cee71dSXin LI# data and image transfer, storage, etc., for the astronomical community. 1451b6cee71dSXin LI# (FITS floating point formats are big-endian.) 1452*ae316d1dSXin LI# keyword is a 1- to 8-character, left-justified ASCII string; columns that do not contain data are filled with spaces 1453*ae316d1dSXin LI# The assignment indicator (=) always occupies columns nine and ten in the card 1454*ae316d1dSXin LI0 string SIMPLE\ \ = 1455*ae316d1dSXin LI# skip DROID x-fmt-383-signature-id-57.fits by check for left padding spaces of 2nd card value 1456*ae316d1dSXin LI>89 ubeshort =0x2020 FITS image 1457*ae316d1dSXin LI# URL: https://heasarc.gsfc.nasa.gov/fitsio/fpack/ 1458*ae316d1dSXin LI# Reference: https://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-fz.trid.xml 1459*ae316d1dSXin LI# https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/docs/fpackguide.pdf 1460*ae316d1dSXin LI# Note: called "Flexible Image Transport System bitmap (compressed)" by TrID 1461*ae316d1dSXin LI>>240 search/0x4790/b ZCMPTYPE= data, compression type 1462*ae316d1dSXin LI# fz suffix for compressed fits 1463*ae316d1dSXin LI!:ext fz 1464*ae316d1dSXin LI# Flexible Image Transport System compression value (followed by optional FITS comment) like: NOCOMPRESS GZIP_1 GZIP_2 HCOMPRESS_1 PLIO_1 RICE_1 1465*ae316d1dSXin LI#>>>&0 string x COMPRESSION=%0.13s 1466*ae316d1dSXin LI>>>&0 regex [A-Z_1-2]{4,11} %s 1467*ae316d1dSXin LI# not compressed Flexible Image Transport System with other filename suffix 1468*ae316d1dSXin LI>>240 default x data 1469*ae316d1dSXin LI!:ext fits/fit/fts 1470*ae316d1dSXin LI# five keywords that are required in every FITS file: SIMPLE, BITPIX, NAXIS, NAXISn, and END. EXTEND is also a required keyword if extensions are present in the file 1471*ae316d1dSXin LI# required keyword in standard on 3rd card contains integer number of bits used to represent each data value but in 2nd card for M57.FIT 1472*ae316d1dSXin LI>>80 search/81/b BITPIX\040\040= 1473*ae316d1dSXin LI#>>>&11 string x BIT=%-0.18s 1474*ae316d1dSXin LI# this is the number of bits per pixel for image data 1475*ae316d1dSXin LI>>>&20 string 8 \b, 8-bit, character or unsigned binary integer 1476*ae316d1dSXin LI# few samples with more right positioned values like: M57.FIT 1477*ae316d1dSXin LI# GRR: avoid warning: Magdir\images, 1380: Warning: description `, 8-bit, character or unsigned binary integer (too right positioned)' truncated 1478*ae316d1dSXin LI>>>&28 string 8 \b, 8-bit, character or unsigned binary integer 1479*ae316d1dSXin LI>>>>0 string x (too right positioned) 1480*ae316d1dSXin LI# few samples not right justified positioned like: MOON.FTS 1481*ae316d1dSXin LI>>>&11 string 8 \b, 8-bit, character or unsigned binary integer 1482*ae316d1dSXin LI>>>>0 string x (too left positioned) 1483*ae316d1dSXin LI# according to DROID but no examples found 1484*ae316d1dSXin LI#>>>&19 string 08 \b, 8-bit, character or unsigned binary integer 1485*ae316d1dSXin LI#>>>&19 string +8 \b, 8-bit, character or unsigned binary integer 1486*ae316d1dSXin LI>>>&19 string 16 \b, 16-bit, two's complement binary integer 1487*ae316d1dSXin LI>>>&18 string \04032 \b, 32-bit, two's complement binary integer 1488*ae316d1dSXin LI>>>&18 string -32 \b, 32-bit, floating point, single precision 1489*ae316d1dSXin LI>>>&18 string -64 \b, 64-bit, floating point, double precision 1490*ae316d1dSXin LI# second 64-bit variant like: blank.fits 1491*ae316d1dSXin LI>>>&18 string \04064 \b, 64-bit, two's complement binary integer 1492*ae316d1dSXin LI# in standard number of dimensions by keyword NAXIS on 3rd card image but in few cases on 2nd card like: M57.FIT 1493*ae316d1dSXin LI>>80 search/81/b NAXIS\040\040\040= \b, 1494*ae316d1dSXin LI# before optional comment 31 ASCII charactes left padded with spaces for integer (0-999) of data axis like: 0 (extension no data) 1 (spectrum) 2 (conventional bitmap) 3 (animated bitmap example.fit test.fits) 6 (DDTSUVDATA.fits) 1495*ae316d1dSXin LI#>>>>&0 string x NAXIS=%-0.31s 1496*ae316d1dSXin LI# single digit 0 implies no data or similar 1497*ae316d1dSXin LI>>>&0 search/31/b \0400\040 0 axes 1498*ae316d1dSXin LI!:mime application/fits 1499*ae316d1dSXin LI# single digit 1 implies one-dimensional entity such as a spectrum or a time series (no example found) 1500*ae316d1dSXin LI>>>&-1 search/31/b \0401\040 1 axis 1501*ae316d1dSXin LI!:mime application/fits 1502*ae316d1dSXin LI#!:mime image/fits 1503*ae316d1dSXin LI# single digit 2 implies conventional bitmap 1504*ae316d1dSXin LI>>>&0 search/31/b \0402\040 2 axes 15052dc4dbb9SEitan Adler!:mime image/fits 1506*ae316d1dSXin LI# single digit 3 implies data cubes of three dimensions (animated bitmap or similar) 1507*ae316d1dSXin LI>>>&0 search/31/b \0403\040 3 axes 1508*ae316d1dSXin LI!:mime image/fits 1509*ae316d1dSXin LI# data cubes more dimensions like: 5 (group.fits) 6 (DDTSUVDATA.fits) 1510*ae316d1dSXin LI>>>&0 default x 1511*ae316d1dSXin LI>>>>&0 regex/31/s =[0-9]{1,3} %s axis 1512*ae316d1dSXin LI!:mime application/fits 1513*ae316d1dSXin LI# often NAXIS1 as 4th card but sometimes at higher offset like: 29400 (IUElwp25637mxlo.fits) 20400 (NICMOSn4hk12010_mos.fits) 1514*ae316d1dSXin LI>>240 search/29400/bs NAXIS1\040\040= \b, 1515*ae316d1dSXin LI# before optional comment 31 ASCII charactes left padded with spaces for first axis like: 192 512 1024 1200 2000 2064 3600 ... 1516*ae316d1dSXin LI>>>&9 regex =[0-9]{1,31} %s 1517*ae316d1dSXin LI# often NAXIS2 as 5th card but sometimes not existent or at higher offset like: 29120 (IUElwp25637mxlo.fits) 20480 (NICMOSn4hk12010_mos.fits) 1518*ae316d1dSXin LI>>>320 search/29120/bs NAXIS2\040\040= x 1519*ae316d1dSXin LI# before optional comment 31 ASCII charactes left padded with spaces for second axis like: 2 4 165 512 800 1024 3600 ... 1520*ae316d1dSXin LI>>>>&9 regex =[0-9]{1,31} %s 1521*ae316d1dSXin LI# not standard cards 1522*ae316d1dSXin LI>>80 string !BITPIX\040\040= \b, at 80 1523*ae316d1dSXin LI# in M57.FIT like: "NAXIS =" 1524*ae316d1dSXin LI>>>80 string x "%-0.9s" 1525*ae316d1dSXin LI>>160 string !NAXIS\040\040\040= \b, at 160 1526*ae316d1dSXin LI# in M57.FIT like: "BITPIX =" 1527*ae316d1dSXin LI>>>160 string x "%-0.9s" 1528b6cee71dSXin LI 1529b6cee71dSXin LI# other images 1530b6cee71dSXin LI0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file 1531b6cee71dSXin LI 1532b6cee71dSXin LI# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image 1533b6cee71dSXin LI# stuff. 1534b6cee71dSXin LI# 1535a4d6d3b8SXin LI0 ubeshort 0x1010 PEX Binary Archive 1536b6cee71dSXin LI 1537b6cee71dSXin LI# DICOM medical imaging data 15383e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/DICOM#Data_format 15393e41d09dSXin LI# Note: "dcm" is the official file name extension 15403e41d09dSXin LI# XnView mention also "dc3" and "acr" as file name extension 1541b6cee71dSXin LI128 string DICM DICOM medical imaging data 1542b6cee71dSXin LI!:mime application/dicom 15433e41d09dSXin LI!:ext dcm/dicom/dic 1544b6cee71dSXin LI 1545b6cee71dSXin LI# XWD - X Window Dump file. 1546a4d6d3b8SXin LI# URL: http://fileformats.archiveteam.org/wiki/XWD 1547a4d6d3b8SXin LI# Reference: https://wiki.multimedia.cx/index.php?title=XWD 1548a4d6d3b8SXin LI# http://mark0.net/download/triddefs_xml.7z/defs/x/xdm-x11.trid.xml 1549a4d6d3b8SXin LI# Note: called "X-Windows Screen Dump (X11)" by TrID and 1550a4d6d3b8SXin LI# "X-Windows Screen Dump" version X11 by DROID via PUID fmt/483 1551a4d6d3b8SXin LI# verfied by XnView `nconvert -in xwd -info *` 1552a4d6d3b8SXin LI# and ImageMagick 6.9.11 `identify -verbose *` as XWD X Windows system window dump 1553a4d6d3b8SXin LI# and `xwud -in fig41.wxd -dumpheader` 1554b6cee71dSXin LI# As described in /usr/X11R6/include/X11/XWDFile.h 1555b6cee71dSXin LI# used by the xwd program. 1556b6cee71dSXin LI# Bradford Castalia, idaeim, 1/01 1557a4d6d3b8SXin LI# updated by Adam Buchbinder, 2/09 and Joerg Jenderek, May 2022 1558b6cee71dSXin LI# The following assumes version 7 of the format; the first long is the length 1559b6cee71dSXin LI# of the header, which is at least 25 4-byte longs, and the one at offset 8 1560b6cee71dSXin LI# is a constant which is always either 1 or 2. Offset 12 is the pixmap depth, 1561b6cee71dSXin LI# which is a maximum of 32. 1562a4d6d3b8SXin LI# Size of the entire file header (bytes) like: 100 104 105 106 107 109 110 113 114 115 118 172 1563a4d6d3b8SXin LI0 ubelong >99 1564a4d6d3b8SXin LI# pixmap_format; Pixmap format; 0~1-bit (XYBitmap) format 1~single-plane (XYPixmap) 2~bitmap with two or more planes (ZPixmap) 1565a4d6d3b8SXin LI>8 ubelong <3 1566a4d6d3b8SXin LI# pixmap_depth; Pixmap depth; value 1 - 32 1567a4d6d3b8SXin LI>>12 ubelong <33 1568a4d6d3b8SXin LI# file_version; XWD_FILE_VERSION=7 1569a4d6d3b8SXin LI>>>4 ubelong 7 1570a4d6d3b8SXin LI# skip DROID fmt-401-signature-id-618.xwd by test for existing border field 1571a4d6d3b8SXin LI>>>>96 ubelong x X-Window screen dump image data, version X11 1572a4d6d3b8SXin LI# ./images (version 1.205) labeled the above entry as "XWD X Window Dump image data" 1573a4d6d3b8SXin LI# https://reposcope.com/mimetype/image/x-xwindowdump 1574b6cee71dSXin LI!:mime image/x-xwindowdump 1575a4d6d3b8SXin LI#!:ext xwd 1576a4d6d3b8SXin LI!:ext xwd/dmp 1577a4d6d3b8SXin LI# https://www.xnview.com/en/image_formats/ NO example with x11 suffix FOUND! 1578a4d6d3b8SXin LI#!:ext xwd/dmp/x11 1579a4d6d3b8SXin LI# https://www.nationalarchives.gov.uk/PRONOM/fmt/401 NO example with xdm suffix FOUND! 1580a4d6d3b8SXin LI#!:ext xwd/dmp/x11/xmd 1581a4d6d3b8SXin LI# file comment if header > 100; so not in MARBLES.XWD and hardcopy-x-window-v11.xwd 1582a4d6d3b8SXin LI>>>>>0 ubelong >100 1583a4d6d3b8SXin LI# comment or windows name 1584a4d6d3b8SXin LI>>>>>>100 string >\0 \b, "%s" 1585a4d6d3b8SXin LI# pixmap_width; pixmap width like: 576 800 1014 1280 1419 NOT -1414812757=abABabABh 1586a4d6d3b8SXin LI>>>>>16 ubelong x \b, %dx 1587a4d6d3b8SXin LI# pixmap_height; pixmap height like: 449 454 600 704 720 1001 1024 NOT -1414812757=abABabABh 1588a4d6d3b8SXin LI>>>>>20 ubelong x \b%dx 1589a4d6d3b8SXin LI# pixmap_depth; pixmap depth 1590a4d6d3b8SXin LI>>>>>12 ubelong x \b%d 1591a4d6d3b8SXin LI# XOffset; Bitmap X offset; pixel numbers to ignore at the beginning of each scan-line 1592a4d6d3b8SXin LI#>>>>>24 ubelong x \b, %u ignore 1593a4d6d3b8SXin LI# ByteOrder; byte order of image data: 0~least significant byte first 1~most significant byte first 1594a4d6d3b8SXin LI>>>>>28 ubelong >0 \b, order %u 1595a4d6d3b8SXin LI# BitmapUnit; bitmap base data size unit in each scan line like: 8 16 32 1596a4d6d3b8SXin LI#>>>>>32 ubelong x \b, unit %u 1597a4d6d3b8SXin LI# BitmapBitOrder; bit-order of image data; apparently same as ByteOrder 1598a4d6d3b8SXin LI#>>>>>36 ubelong x \b, bit order %u 1599a4d6d3b8SXin LI# BitmapPad; number of padding bits added to each scan line like: 8 16 32 1600a4d6d3b8SXin LI#>>>>>40 ubelong x \b, pad %u 1601a4d6d3b8SXin LI# BitsPerPixel; Bits per pixel: 1~StaticGray and GrayScale 2-15~StaticColor and PseudoColor 16,24,32~TrueColor and DirectColor 1602a4d6d3b8SXin LI#>>>>>44 ubelong x \b, %u bits/pixel 1603a4d6d3b8SXin LI# BytesPerLine; size of each scan line in bytes 1604a4d6d3b8SXin LI#>>>>>48 ubelong x \b, %u bytes/line 1605a4d6d3b8SXin LI# VisualClass; class of the image: 0~StaticGray 1~GrayScale 2~StaticColor 3~PseudoColor 4~TrueColor 5~DirectColor 1606a4d6d3b8SXin LI#>>>>>52 ubelong x \b, %u Class 1607a4d6d3b8SXin LI# RedMask; red RGB mask values used by ZPixmaps like: 0 0xff0000 1608a4d6d3b8SXin LI#>>>>>56 ubelong !0 \b, %#x red 1609a4d6d3b8SXin LI# GreenMask; green mask like: 0 1610a4d6d3b8SXin LI#>>>>>60 ubelong !0 \b, %#x green 1611a4d6d3b8SXin LI# BlueMask; blue mask like: 0 0xff 1612a4d6d3b8SXin LI#>>>>>64 ubelong !0 \b, %#x blue 1613a4d6d3b8SXin LI# BitsPerRgb; Size of each color mask in bits like: 0 1 8 24 1614a4d6d3b8SXin LI#>>>>>68 ubelong x \b, %u bits/RGB 1615a4d6d3b8SXin LI# NumberOfColors; number of colors in image like: 256 4 2 0 (WHAT DOES THIS MEAN?) 1616a4d6d3b8SXin LI>>>>>72 ubelong x \b, %u colors 1617a4d6d3b8SXin LI# ColorMapEntries; number of entries in color map like: 256 16 2 0~no color map 1618a4d6d3b8SXin LI>>>>>76 ubelong x %u entries 1619a4d6d3b8SXin LI# WindowWidth; window width 1620a4d6d3b8SXin LI#>>>>>80 ubelong x \b, %u width 1621a4d6d3b8SXin LI# WindowHeight; window height 1622a4d6d3b8SXin LI#>>>>>84 ubelong x \b, %u height 1623a4d6d3b8SXin LI# WindowX; Window upper left X coordinate like: 0 24 32 80 237 290 422 466 568 (lenna.dmp) 1624a4d6d3b8SXin LI>>>>>88 ubelong !0 \b, x=%d 1625a4d6d3b8SXin LI# WindowY; Window upper left Y coordinate like: 0 8 18 26 60 73 107 (fig41.xwd) 128 1626a4d6d3b8SXin LI>>>>>92 ubelong !0 \b, y=%d 1627a4d6d3b8SXin LI# WindowBorderWidth; Window border width; apparently pixmap_width=WindowWidth+2*WindowBorderWidth 1628a4d6d3b8SXin LI# like: 1 (fig41.xwd) 2 (maze.dmp) 3 (lenna.dmp mandrill.dmp) 1629a4d6d3b8SXin LI>>>>>96 ubelong >0 \b, %u border 1630a4d6d3b8SXin LI# From: Joerg Jenderek 1631a4d6d3b8SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/x/xdm-x10.trid.xml 1632a4d6d3b8SXin LI# Note: called "X-Windows Screen Dump (X10)" by TrID and 1633a4d6d3b8SXin LI# "X-Windows Screen Dump" version X10 by DROID via PUID x-fmt/300 1634a4d6d3b8SXin LI# verfied by XnView `nconvert -in xwd -info *` 1635a4d6d3b8SXin LI# HeaderSize is the size of the header in bytes; always 40 for X10 variant 1636a4d6d3b8SXin LI0 ubelong =0x000000028 1637a4d6d3b8SXin LI# FileVersion; always 6 for X10 variant 1638a4d6d3b8SXin LI>4 ubelong =6 1639a4d6d3b8SXin LI# skip DROID x-fmt-300-signature-id-619.xdm by test existing border field 1640a4d6d3b8SXin LI>>36 ubeshort x X-Window screen dump image data, version X10 1641a4d6d3b8SXin LI!:mime image/x-xwindowdump 1642a4d6d3b8SXin LI!:ext xwd 1643a4d6d3b8SXin LI# http://www.nationalarchives.gov.uk/pronom/fmt/401 NO example with xdm suffix FOUND! 1644a4d6d3b8SXin LI#!:ext xwd/xdm 1645a4d6d3b8SXin LI# PixmapWidth; pixmap width like: 127 1280 1646a4d6d3b8SXin LI>>>20 ubelong x \b, %d 1647a4d6d3b8SXin LI# PixmapHeight; pixmap height like: 64 1024 1648a4d6d3b8SXin LI>>>24 ubelong x \bx%d 1649a4d6d3b8SXin LI# DisplayPlanes; number of display planes like: 1 4 8 1650a4d6d3b8SXin LI>>>12 ubelong x \bx%u 1651a4d6d3b8SXin LI# DisplayType; display type like: 1 3 1652a4d6d3b8SXin LI#>>>8 ubelong x \b, type %u 1653a4d6d3b8SXin LI# PixmapFormat; pixmap format like: 1~bitmap with two or more planes (ZPixmap) 0~single-plane bitmap (XYBitmap) 1654a4d6d3b8SXin LI#>>>16 ubelong x \b, %u format 1655a4d6d3b8SXin LI# WindowWidth; window width; probably PixmapWidth=WindowWidth+2*WindowBorderWidth 1656a4d6d3b8SXin LI#>>>28 ubeshort x \b, width %u 1657a4d6d3b8SXin LI# WindowHeight; window height; probably PixmapWidth=PixmapHeight+2*WindowBorderWidth 1658a4d6d3b8SXin LI#>>>30 ubeshort x \b, height %u 1659a4d6d3b8SXin LI# WindowX; window upper left X coordinate like: 0 1660a4d6d3b8SXin LI>>>32 ubeshort !0 \b, x=%d 1661a4d6d3b8SXin LI# WindowY; window upper left Y coordinate like: 0 1662a4d6d3b8SXin LI>>>34 ubeshort !0 \b, y=%d 1663a4d6d3b8SXin LI# WindowBorderWidth; window border width like: 0 1664a4d6d3b8SXin LI>>>36 ubeshort !0 \b, %u border 1665a4d6d3b8SXin LI# WindowNumColors; Number of color entries in window like: 2 16 256 1666a4d6d3b8SXin LI#>>>38 ubeshort x \b, %u colors 1667a4d6d3b8SXin LI# if the image is a PseudoColor image, a color map immediately follows the header. X10COLORMAP[WindowNumColors]; 1668a4d6d3b8SXin LI# EntryNumber; number of the color-map entry like: 0 1669a4d6d3b8SXin LI#>>>40 ubeshort x \b, colors #%u 1670a4d6d3b8SXin LI# Red; red-channel value 1671a4d6d3b8SXin LI#>>>42 ubeshort !0 \b, red %#x 1672a4d6d3b8SXin LI# Green; green-channel value 1673a4d6d3b8SXin LI#>>>44 ubeshort !0 \b, green %#x 1674a4d6d3b8SXin LI# Blue; blue-channel value 1675a4d6d3b8SXin LI#>>>46 ubeshort !0 \b, blue %#x 1676a4d6d3b8SXin LI# 2ND Entry like: 2 1677a4d6d3b8SXin LI#>>>48 ubeshort x \b, colors #%u 1678b6cee71dSXin LI 1679b6cee71dSXin LI# PDS - Planetary Data System 1680b6cee71dSXin LI# These files use Parameter Value Language in the header section. 1681b6cee71dSXin LI# Unfortunately, there is no certain magic, but the following 1682b6cee71dSXin LI# strings have been found to be most likely. 1683b6cee71dSXin LI0 string NJPL1I00 PDS (JPL) image data 1684b6cee71dSXin LI2 string NJPL1I PDS (JPL) image data 1685b6cee71dSXin LI0 string CCSD3ZF PDS (CCSD) image data 1686b6cee71dSXin LI2 string CCSD3Z PDS (CCSD) image data 1687b6cee71dSXin LI0 string PDS_ PDS image data 1688b6cee71dSXin LI0 string LBLSIZE= PDS (VICAR) image data 1689b6cee71dSXin LI 1690b6cee71dSXin LI# pM8x: ATARI STAD compressed bitmap format 1691b6cee71dSXin LI# 1692b6cee71dSXin LI# from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001 1693b6cee71dSXin LI# p M 8 5/6 xx yy zz data... 1694b6cee71dSXin LI# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed. 1695b6cee71dSXin LI# bytes either run horizontally (pM85) or vertically (pM86). yy is the 1696b6cee71dSXin LI# most frequent byte, xx and zz are runlength escape codes, where xx is 1697b6cee71dSXin LI# used for runs of yy. 1698b6cee71dSXin LI# 1699b6cee71dSXin LI0 string pM85 Atari ST STAD bitmap image data (hor) 1700a4d6d3b8SXin LI>5 ubyte 0x00 (white background) 1701a4d6d3b8SXin LI>5 ubyte 0xFF (black background) 1702b6cee71dSXin LI0 string pM86 Atari ST STAD bitmap image data (vert) 1703a4d6d3b8SXin LI>5 ubyte 0x00 (white background) 1704a4d6d3b8SXin LI>5 ubyte 0xFF (black background) 1705b6cee71dSXin LI 170658a0f0d0SEitan Adler# From: Alex Myczko <alex@aiei.ch> 170748c779cdSXin LI# https://www.atarimax.com/jindroush.atari.org/afmtatr.html 1708a4d6d3b8SXin LI0 uleshort 0x0296 Atari ATR image 1709a4d6d3b8SXin LI 1710a4d6d3b8SXin LI# URL: http://fileformats.archiveteam.org/wiki/DEGAS_image 1711a4d6d3b8SXin LI# Reference: https://wiki.multimedia.cx/index.php?title=Degas 1712a4d6d3b8SXin LI# From: Joerg Jenderek 1713a4d6d3b8SXin LI# http://mark0.net/download/triddefs_xml.7z/defs/b 1714a4d6d3b8SXin LI# bitmap-pi2-degas.trid.xml bitmap-pi3-degas.trid.xml 1715a4d6d3b8SXin LI# bitmap-pc1-degas.trid.xml bitmap-pc2-degas.trid.xml bitmap-pc3-degas.trid.xml 1716a4d6d3b8SXin LI# Note: verified by NetPBM `pi3topbm sigirl1.pi3 | file` 1717a4d6d3b8SXin LI# `deark -m degas -l -d2 ataribak.pi1` 1718a4d6d3b8SXin LI# XnView `nconvert -fullinfo *.p??` 1719a4d6d3b8SXin LI# DEGAS low-res uncompressed bitmap *.pi1 1720a4d6d3b8SXin LI0 beshort 0x0000 1721a4d6d3b8SXin LI# skip some ISO 9660 CD-ROM filesystems like plpbt.iso by test for 4 non black colors in palette entries 1722a4d6d3b8SXin LI>2 quad !0 1723a4d6d3b8SXin LI# skip g3test.g3 by test for unused bits of 2nd color entry 1724a4d6d3b8SXin LI>>4 ubeshort&0xF000 0 1725a2dfb722SXin LI#>>>0 beshort x 1ST_VALUE=%x 1726898496eeSXin LI#>>>-0 offset x FILE_SIZE=%lld 1727a2dfb722SXin LI# standard DEGAS low-res uncompressed bitmap *.pi1 with file size 32034 1728898496eeSXin LI>>>-0 offset =32034 1729a2dfb722SXin LI#>>>>0 beshort x 1st_VALUE=%x 1730a2dfb722SXin LI# like: 8ball.pi1 teddy.pi1 sonic01.pi1 1731a2dfb722SXin LI>>>>0 use degas-bitmap 1732a2dfb722SXin LI# about 61 DEGAS Elite low-res uncompressed bitmap *.pi1 with file size 32066 1733898496eeSXin LI>>>-0 offset =32066 1734a2dfb722SXin LI# like: spider.pi1 pinkgirl.pi1 frog3.pi1 1735a2dfb722SXin LI>>>>0 use degas-bitmap 1736a2dfb722SXin LI# about 55 DEGAS Elite low-res uncompressed bitmap *.pi1 with file size 32128 1737898496eeSXin LI>>>-0 offset =32128 1738a2dfb722SXin LI# like: mountain.pi1 bigspid.pi1 alf33.pi1 1739a2dfb722SXin LI>>>>0 use degas-bitmap 1740a2dfb722SXin LI# 1 DEGAS Elite low-res uncompressed bitmap *.pi1 with file size 44834 1741898496eeSXin LI>>>-0 offset =44834 1742a2dfb722SXin LI# like: kenshin.pi1 1743a2dfb722SXin LI>>>>0 use degas-bitmap 1744a4d6d3b8SXin LI# DEGAS mid-res uncompressed bitmap *.pi2 (strength=50) after GEM Images like: 1745a4d6d3b8SXin LI# BEETHVEN.IMG CHURCH.IMG GAMEOVR4.IMG TURKEY.IMG clinton.img 1746a4d6d3b8SXin LI0 beshort 0x0001 1747a4d6d3b8SXin LI#!:strength +0 1748a4d6d3b8SXin LI# skip many control files like gnucash-4.8.setup.exe.aria2 by test for non black in 4 palette entries 1749a4d6d3b8SXin LI>2 quad !0 1750898496eeSXin LI# skip control file load-v0001.aria2 and many GEM Image data like 1751898496eeSXin LI# GAMEOVR4.IMG BEETHVEN.IMG CHURCH.IMG TURKEY.IMG clinton.img 1752898496eeSXin LI# by test for valid file sizes 1753898496eeSXin LI# standard DEGAS mid-res uncompressed bitmap *.pi2 with file size 32034 1754898496eeSXin LI>>-0 offset =32034 1755898496eeSXin LI# (39/41) like: GEMINI03.PI2 ST_TOOLS.PI2 TBX_DEMO.PI2 1756898496eeSXin LI>>>0 use degas-bitmap 1757898496eeSXin LI# few DEGAS Elite mid-res uncompressed bitmap *.pi2 with file size 32066 1758898496eeSXin LI>>-0 offset =32066 1759898496eeSXin LI# (2/41) like: medres.pi2 1760898496eeSXin LI>>>0 use degas-bitmap 1761*ae316d1dSXin LI# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) 1762*ae316d1dSXin LI# Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de> 1763*ae316d1dSXin LI# Update: Joerg Jenderek 1764*ae316d1dSXin LI# See http://fileformats.archiveteam.org/wiki/GEM_Raster 1765*ae316d1dSXin LI# For variations, also see: 1766*ae316d1dSXin LI# https://www.seasip.info/Gem/ff_img.html (Ventura) 1767*ae316d1dSXin LI# http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT) 1768*ae316d1dSXin LI# http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT) 1769*ae316d1dSXin LI# http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG) 1770*ae316d1dSXin LI# header_size 1771*ae316d1dSXin LI>2 beshort 0x0008 1772*ae316d1dSXin LI>>0 use gem_info 1773*ae316d1dSXin LI>2 beshort 0x0009 1774*ae316d1dSXin LI>>0 use gem_info 1775*ae316d1dSXin LI# no example for NOSIG 1776*ae316d1dSXin LI>2 beshort 24 1777*ae316d1dSXin LI>>0 use gem_info 1778*ae316d1dSXin LI# no example for HYPERPAINT 1779*ae316d1dSXin LI>2 beshort 25 1780*ae316d1dSXin LI>>0 use gem_info 1781*ae316d1dSXin LI16 string XIMG\0 1782*ae316d1dSXin LI>0 use gem_info 1783*ae316d1dSXin LI# no example 1784*ae316d1dSXin LI16 string STTT\0\x10 1785*ae316d1dSXin LI>0 use gem_info 1786*ae316d1dSXin LI# no example or description 1787*ae316d1dSXin LI16 string TIMG\0 1788*ae316d1dSXin LI>0 use gem_info 1789*ae316d1dSXin LI 1790a4d6d3b8SXin LI# DEGAS high-res uncompressed bitmap *.pi3 1791a4d6d3b8SXin LI0 beshort 0x0002 1792a4d6d3b8SXin LI# skip Intel ia64 COFF msvcrt.lib by test for unused bits of 1st atari color palette entry 1793a4d6d3b8SXin LI>2 ubeshort&0xF000 0 1794a4d6d3b8SXin LI# skip few Adobe PhotoShop Brushes like Faux-Spitzen.abr by check 1795a4d6d3b8SXin LI# for invalid Adobe PhotoShop Brush UTF16-LE string length 1796a4d6d3b8SXin LI>>19 ubyte =0 1797a4d6d3b8SXin LI# many like: 4th_ofj2.pi3 GEMINI03.PI3 PEOPLE18.PI3 POWERFIX.PI3 abydos.pi3 highres.pi3 sigirl1.pi3 vanna5.pi3 1798a4d6d3b8SXin LI>>>0 use degas-bitmap 1799a4d6d3b8SXin LI# Adobe PhotoShop Brush UTF16-LE string length 15 "Gitter - klein " 8 "Kreis 1 " 1800a4d6d3b8SXin LI>>19 ubyte !0 1801a4d6d3b8SXin LI#>>19 ubyte !0 \b, NOTE LENGTH %u 1802a4d6d3b8SXin LI#>>>21 lestring16 x \b, BRUSH NOTE "%s" 1803a4d6d3b8SXin LI>>>(19.b*2) ubequad x 1804a4d6d3b8SXin LI# maybe last character of Adobe PhotoShop Brush UTF16-LE string and terminating nul char like 1805a4d6d3b8SXin LI# 006e0000 for n in "Faux-Spitzen.abr" 00310000 for 1 in "Verschiedene Spitzen.abr" 1806a4d6d3b8SXin LI# 00000000 "LEREDACT.PI3" 03730773 "TBX_DEMO.PI3" 1807a4d6d3b8SXin LI#>>>>&8 ubelong x \b, LAST CHAR+NIL %8.8x 1808a4d6d3b8SXin LI>>>>&8 ubelong&0xff00ffFF !0 1809898496eeSXin LI# skip many Adobe Photoshop Color swatch (ANPA-Farben.aco TOYO-Farbsystem.aco) with invalid 3rd color entry (1319 2201 2206 21f5 2480 24db 25fd) 1810898496eeSXin LI>>>>>6 ubeshort&0xF000 0 1811898496eeSXin LI# skip few Adobe Photoshop Color swatch (FOCOLTONE-Farben.aco "PANTONE process coated.aco") with invalid 4th color entry (ffff) 1812898496eeSXin LI>>>>>>8 ubeshort&0xF000 0 1813a4d6d3b8SXin LI# many DEGAS bitmap like: ARABDEMO.PI3 ELMRSESN.PI3 GEMVIEW.PI3 LEREDACT.PI3 PICCOLO.PI3 REPRO_JR.PI3 ST_TOOLS.PI3 TBX_DEMO.PI3 evgem7.pi3 1814898496eeSXin LI>>>>>>>0 use degas-bitmap 1815a4d6d3b8SXin LI# test for last character of Adobe PhotoShop Brush UTF16-LE string and terminating nul char 1816a4d6d3b8SXin LI>>>>&8 ubelong&0xff00ffFF =0 1817a4d6d3b8SXin LI# select last DEGAS bitmaps by invalid last char of brush note like BASICNES.PI3 DB_HELP.PI3 DB_WRITR.PI3 LEREDACT.PI3 1818a4d6d3b8SXin LI>>>>>&-4 ubelong&0x00FF0000 <0x00200000 1819a4d6d3b8SXin LI>>>>>>0 use degas-bitmap 1820a4d6d3b8SXin LI# last character of Adobe PhotoShop Brush UTF16-LE note 1821a4d6d3b8SXin LI#>>>>>&-4 ubelong&0x00FF0000 >0x001F0000 \b, THAT IS ABR 1822a4d6d3b8SXin LI# DEGAS low-res compressed bitmap *.pc1 like: BATTLSHP.PC1 GNUCHESS.PC1 MEDUSABL.PC1 MOONLORD.PC1 WILDROSE.PC1 1823a4d6d3b8SXin LI0 beshort 0x8000 1824a4d6d3b8SXin LI# skip lif files handled via ./lif by test for unused bits of 1st palette entry 1825a4d6d3b8SXin LI>2 ubeshort&0xF000 0 1826898496eeSXin LI# skip CRI ADX ADPCM audio (R04HT.adx R03T-15552.adx) with 44100 Hz misinterpreted as 5th color entry value AC44h 1827898496eeSXin LI>>10 ubeshort&0xF000 0 1828898496eeSXin LI# skip few (fmt-840-signature-id-1195.adx fmt-840-signature-id-1199.adx) by test for 4 first non black colors in palette entries 1829898496eeSXin LI>>>2 quad !0 1830898496eeSXin LI>>>>0 use degas-bitmap 1831a4d6d3b8SXin LI# DEGAS mid-res compressed bitmap *.pc2 like: abydos.pc2 ARTIS3.PC2 SMTHDRAW.PC2 STAR_2K.PC2 TX2_DEMO.PC2 1832a4d6d3b8SXin LI0 beshort 0x8001 1833898496eeSXin LI# skip many (1274/1369) PostScript Type 1 font (DarkGardenMK.pfb coupbi.pfb MONOBOLD.PFB) with invalid 1st atari color palette entry 5506 5b06 6906 7906 7e06 fb15 1834898496eeSXin LI>2 ubeshort&0xF000 0 1835898496eeSXin LI# skip some (95/1369) PostScript Type 1 font (fmt-525-signature-id-816.pfb LUXEMBRG.PFB) with invalid 3rd atari color palette entry 2521 1836898496eeSXin LI>>6 ubeshort&0xF000 0 1837898496eeSXin LI>>>0 use degas-bitmap 1838a4d6d3b8SXin LI# DEGAS high-res compressed bitmap *.pc3 like: abydos.pc3 COYOTE.PC3 ELEPHANT.PC3 TX2_DEMO.PC3 SMTHDRAW.PC3 1839a4d6d3b8SXin LI0 beshort 0x8002 1840898496eeSXin LI# skip some (36/212) Python Pickle (factor_cache.pickle environment.pickle) with invalid 1st atari color entry (2863 6363 7d71) 1841898496eeSXin LI>2 ubeshort&0xF000 0 1842898496eeSXin LI>>0 use degas-bitmap 1843a4d6d3b8SXin LI# display information of Atari DEGAS and DEGAS Elite bitmap images 1844a4d6d3b8SXin LI0 name degas-bitmap 1845a4d6d3b8SXin LI>0 ubyte x Atari DEGAS 1846a4d6d3b8SXin LI#!:mime application/octet-stream 1847a4d6d3b8SXin LI!:mime image/x-atari-degas 1848a4d6d3b8SXin LI# compressed 1849a4d6d3b8SXin LI>0 ubyte =0x80 Elite compressed 1850a4d6d3b8SXin LI# uncompressed 1851a4d6d3b8SXin LI#>0 ubyte =0x00 uncompressed 1852a4d6d3b8SXin LI#>0 ubyte =0x00 un. 1853a4d6d3b8SXin LI>0 ubyte =0x00 1854a4d6d3b8SXin LI# check for existence of footer for DEGAS Elite images 1855a4d6d3b8SXin LI>>32042 ubequad x Elite 1856a4d6d3b8SXin LI>0 beshort 0x0000 bitmap 1857a4d6d3b8SXin LI!:ext pi1 1858a4d6d3b8SXin LI>0 beshort 0x0001 bitmap 1859a4d6d3b8SXin LI!:ext pi2 1860a4d6d3b8SXin LI>0 beshort 0x0002 bitmap 1861a4d6d3b8SXin LI# no example with SUH extension found 1862a4d6d3b8SXin LI#!:ext pi3/suh 1863a4d6d3b8SXin LI!:ext pi3 1864a4d6d3b8SXin LI>0 beshort 0x8000 bitmap 1865a4d6d3b8SXin LI!:ext pc1 1866a4d6d3b8SXin LI>0 beshort 0x8001 bitmap 1867a4d6d3b8SXin LI!:ext pc2 1868a4d6d3b8SXin LI>0 beshort 0x8002 bitmap 1869a4d6d3b8SXin LI!:ext pc3 1870a4d6d3b8SXin LI# low resolution; 320x200, 16 colors 1871a4d6d3b8SXin LI>1 ubyte =0 320 x 200 x 16 1872a4d6d3b8SXin LI# medium resolution; 640x200, 4 colors 1873a4d6d3b8SXin LI>1 ubyte =1 640 x 200 x 4 1874a4d6d3b8SXin LI# high resolution; 640x400, 2 colors 1875a4d6d3b8SXin LI>1 ubyte =2 640 x 400 x 2 1876a4d6d3b8SXin LI# http://fileformats.archiveteam.org/wiki/Atari_ST_color_palette 1877a4d6d3b8SXin LI# hardware_palette[16]; 9 bit ?????RRR?GGG?BBB; 12 bit ????RRRRGGGGBBBB for Atari STE 1878a4d6d3b8SXin LI# for Atari DEGAS apparently no Spectrum 512 Enhanced 15 bit palette RGB?RRRRGGGGBBBB 1879a4d6d3b8SXin LI# Red Green Blue unused bit ? often 0 but not bilboule.pi1; color_value (examples or numbers) 1880a4d6d3b8SXin LI# 1st color palette entry like: 0777 (61) 0fff (LEREDACT.PI3) 0fcf (devgem7.pi3) 0001 (9) 1881a4d6d3b8SXin LI>2 ubeshort x \b, color palette %4.4x 1882a4d6d3b8SXin LI# 2nd palette entry like: 0000 (32) 0700 (38) 0f00 (LEREDACT.PI3 devgem7.pi3) 1883a4d6d3b8SXin LI>4 ubeshort x %4.4x 1884a4d6d3b8SXin LI# 3rd palette entry 1885a4d6d3b8SXin LI>6 ubeshort x %4.4x 1886a4d6d3b8SXin LI# 4th palette entry like: 0000 (72) 1887a4d6d3b8SXin LI>8 ubeshort x %4.4x 1888a4d6d3b8SXin LI# 5th palette entry 1889a4d6d3b8SXin LI>10 ubeshort x %4.4x 1890a4d6d3b8SXin LI>2 ubeshort x ... 1891a4d6d3b8SXin LI# 6th palette entry 1892a4d6d3b8SXin LI#>12 ubeshort x %4.4x 1893a4d6d3b8SXin LI# 7th palette entry like: 0000 (16) 0001 (ELMRSESN.PI3 elmrsesn.pi3) 0070 (51) 00f0 (BASICNES.PI3 LEREDACT.PI3) 00f8 (devgem7.pi3) 1894a4d6d3b8SXin LI#>14 ubeshort x %4.4x 1895a4d6d3b8SXin LI# 8th palette entry 1896a4d6d3b8SXin LI#>16 ubeshort x %4.4x 1897a4d6d3b8SXin LI# 9 palette entry 1898a4d6d3b8SXin LI#>18 ubeshort x %4.4x 1899a4d6d3b8SXin LI# 10 palette entry 1900a4d6d3b8SXin LI#>20 ubeshort x %4.4x 1901a4d6d3b8SXin LI# 11 palette entry 1902a4d6d3b8SXin LI#>22 ubeshort x %4.4x 1903a4d6d3b8SXin LI# 12 palette entry 1904a4d6d3b8SXin LI#>24 ubeshort x %4.4x 1905a4d6d3b8SXin LI# 13 palette entry 1906a4d6d3b8SXin LI#>26 ubeshort x %4.4x 1907a4d6d3b8SXin LI# 14th palette entry 1908a4d6d3b8SXin LI#>28 ubeshort x %4.4x 1909a4d6d3b8SXin LI# 15th palette entry 1910a4d6d3b8SXin LI#>30 ubeshort x %4.4x 1911a4d6d3b8SXin LI# 16th palette entry 1912a4d6d3b8SXin LI#>32 ubeshort x %4.4x 1913a4d6d3b8SXin LI# data[16000] for uncompressed images; pixel data 1914a4d6d3b8SXin LI#>34 ubequad x \b, DATA %#16.16llx... 1915a4d6d3b8SXin LI# footer for Elite variant images 1916a4d6d3b8SXin LI# https://www.fileformat.info/format/atari/egff.htm 1917a4d6d3b8SXin LI# https://pulkomandy.tk/projects/GrafX2/wiki/Develop/FileFormats/Atari 1918a4d6d3b8SXin LI# left_color_animation[4]; like: 0000000000000000 0000000100020003 fffafff000000030 (bigspid.pi1) 1919a4d6d3b8SXin LI#>32034 ubequad !0 \b, color animations %16.16llx (left) 1920a4d6d3b8SXin LI# right_color_animation[4]; like: 0000000000000000 0000000100020003 1921a4d6d3b8SXin LI#>>32042 ubequad !0 %16.16llx (right) 1922a4d6d3b8SXin LI# channel_direction[4]; 0~left 1~none 2~right like: 0001000100010001 0002000000010001 (cycle2.pi1) 1923a4d6d3b8SXin LI# sometimes unexpected like: feaafc0000000000 (bigspid.pi1) 1924a4d6d3b8SXin LI#>32050 ubequad !0 \b, channel directions %16.16llx 1925a4d6d3b8SXin LI# channel_delay[4]; 128 - channel delay, timebase 1/60 s 1926a4d6d3b8SXin LI#>32058 ubequad !0 \b, channel delays %16.16llx 1927b6cee71dSXin LI 192843a5ec4eSXin LI# From: Joerg Jenderek 1929898496eeSXin LI# URL: http://fileformats.archiveteam.org/wiki/GED 1930898496eeSXin LI# https://recoil.sourceforge.net/formats.html#Atari-8-bit 1931898496eeSXin LI# Reference: https://sourceforge.net/projects/recoil/files/recoil/6.3.4/recoil-6.3.4.tar.gz 1932898496eeSXin LI# recoil-6.3.4/recoil.c 1933898496eeSXin LI# http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-ged.trid.xml 1934898496eeSXin LI# Note: called "Atari GED bitmap" by TrID; file size 11302 1935898496eeSXin LI# and verified by RECOIL graphic tool 1936898496eeSXin LI0 string \xFF\xFF0SO\x7F Atari GED bitmap, 160x200 1937898496eeSXin LI#!:mime application/octet-stream 1938898496eeSXin LI!:mime image/x-atari-ged 1939898496eeSXin LI!:ext ged 1940898496eeSXin LI 1941898496eeSXin LI# From: Joerg Jenderek 194243a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/ImageLab/PrintTechnic 194343a5ec4eSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-b_w.trid.xml 194443a5ec4eSXin LI# Note: called "ImageLab bitmap" by TrID 194543a5ec4eSXin LI# verfied by XnView `nconvert -fullinfo "MAEDCHEN.B&W"` 194643a5ec4eSXin LI0 string B&W256 ImageLab bitmap 194743a5ec4eSXin LI!:mime image/x-ilab 194843a5ec4eSXin LI# https://www.xnview.com/de/image_formats/ 194943a5ec4eSXin LI# GRR: add char & inside parse_ext in ../../src/apprentice.c to avoid in file version 5.40 error like: 195043a5ec4eSXin LI# Magdir\images, 1090: Warning: EXTENSION type ` b_w/b&w' has bad char '&' 195143a5ec4eSXin LI!:ext b_w/b&w 195243a5ec4eSXin LI# Width 195343a5ec4eSXin LI>6 ubeshort x \b, %u 195443a5ec4eSXin LI# Height 195543a5ec4eSXin LI>8 ubeshort x x %u 195643a5ec4eSXin LI 1957b6cee71dSXin LI# XXX: 1958b6cee71dSXin LI# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other 1959b6cee71dSXin LI# magic. 1960b6cee71dSXin LI# SGI RICE image file <mpruett@sgi.com> 1961a4d6d3b8SXin LI#0 ubeshort 0x5249 RICE image 1962a4d6d3b8SXin LI#>2 ubeshort x v%d 1963a4d6d3b8SXin LI#>4 ubeshort x (%d x 1964a4d6d3b8SXin LI#>6 ubeshort x %d) 1965a4d6d3b8SXin LI#>8 ubeshort 0 8 bit 1966a4d6d3b8SXin LI#>8 ubeshort 1 10 bit 1967a4d6d3b8SXin LI#>8 ubeshort 2 12 bit 1968a4d6d3b8SXin LI#>8 ubeshort 3 13 bit 1969a4d6d3b8SXin LI#>10 ubeshort 0 4:2:2 1970a4d6d3b8SXin LI#>10 ubeshort 1 4:2:2:4 1971a4d6d3b8SXin LI#>10 ubeshort 2 4:4:4 1972a4d6d3b8SXin LI#>10 ubeshort 3 4:4:4:4 1973a4d6d3b8SXin LI#>12 ubeshort 1 RGB 1974a4d6d3b8SXin LI#>12 ubeshort 2 CCIR601 1975a4d6d3b8SXin LI#>12 ubeshort 3 RP175 1976a4d6d3b8SXin LI#>12 ubeshort 4 YUV 1977b6cee71dSXin LI 1978b6cee71dSXin LI# PCX image files 1979b6cee71dSXin LI# From: Dan Fandrich <dan@coneharvesters.com> 1980*ae316d1dSXin LI# updated by Joerg Jenderek at Feb 2013, Nov 2023 by https://en.wikipedia.org/wiki/PCX 198148c779cdSXin LI# https://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt 1982*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/PCX 1983*ae316d1dSXin LI# Note: called "PCX image" with acronym "PiCture eXchange" by shared MIME-info database from freedesktop.org 1984*ae316d1dSXin LI# verfied partly as pcx "Zsoft Paintbrush" format by XnView `nconvert -in pcx -fullinfo *.pcx` and 1985*ae316d1dSXin LI# by ImageMagick version 7.1.1-21 command `identify *.pcx` 1986b6cee71dSXin LI# GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000 1987b6cee71dSXin LI# test for bytes 0x0a,version byte (0,2,3,4,5),compression byte flag(0,1), bit depth (>0) of PCX or T5.DBT,T6.DBT 1988b6cee71dSXin LI0 ubelong&0xffF8fe00 0x0a000000 1989b6cee71dSXin LI# for PCX bit depth > 0 1990b6cee71dSXin LI>3 ubyte >0 1991b6cee71dSXin LI# test for valid versions 1992b6cee71dSXin LI>>1 ubyte <6 1993*ae316d1dSXin LI>>>1 ubyte !1 1994*ae316d1dSXin LI# skip DROID fmt-89-signature-id-62.pcx fmt-88-signature-id-63.pcx fmt-87-signature-id-64.pcx fmt-86-signature-id-65.pcx with invalid dimensions 1995*ae316d1dSXin LI>>>>8 long !0 PCX 1996*ae316d1dSXin LI!:mime image/vnd.zbrush.pcx 1997*ae316d1dSXin LI# deprecated 1998*ae316d1dSXin LI#!:mime image/x-pcx 1999*ae316d1dSXin LI!:ext pcx/pcc 2000*ae316d1dSXin LI# also examples like: abydos.st E-DIODE.ST MUSIC-13.ST ROSE.ST 2001*ae316d1dSXin LI#!:ext pcx/pcc/st 2002*ae316d1dSXin LI# Note: called as "PCX bitmap (v2.5)" by TrID via bitmap-pcx.trid.xml and "PCX" version 0 by DROID via PUID fmt/86 2003*ae316d1dSXin LI>>>>>1 ubyte 0 ver. 2.5 image data 2004*ae316d1dSXin LI# Note: called as "PCX bitmap (v2.8, palette)" by TrID via bitmap-pcx-v28p.trid.xml and "PCX" version 2 by DROID via PUID fmt/87 2005*ae316d1dSXin LI>>>>>1 ubyte 2 ver. 2.8 image data, with palette 2006*ae316d1dSXin LI# Note: called as "PCX bitmap (v2.8)" by TrID via bitmap-pcx-v28.trid.xml and "PCX" version 3 by DROID via PUID fmt/88 2007*ae316d1dSXin LI>>>>>1 ubyte 3 ver. 2.8 image data, without palette 2008*ae316d1dSXin LI# Note: called as "PCX bitmap (Win)" by TrID via bitmap-pcx-win.trid.xml and "PCX" version 4 by DROID via PUID fmt/89 2009*ae316d1dSXin LI>>>>>1 ubyte 4 for Windows image data 2010*ae316d1dSXin LI# Note: called as "PCX bitmap (v3.0) by TrID via bitmap-pcx-v30.trid.xml and "PCX" version 5 by DROID via PUID fmt/90 2011*ae316d1dSXin LI>>>>>1 ubyte 5 ver. 3.0 image data 2012*ae316d1dSXin LI>>>>>4 uleshort x bounding box [%d, 2013*ae316d1dSXin LI>>>>>6 uleshort x %d] - 2014*ae316d1dSXin LI>>>>>8 uleshort x [%d, 2015*ae316d1dSXin LI>>>>>10 uleshort x %d], 2016*ae316d1dSXin LI>>>>>65 ubyte >1 %d planes each of 2017*ae316d1dSXin LI>>>>>3 ubyte x %d-bit 2018*ae316d1dSXin LI>>>>>68 ubyte 1 colour, 2019*ae316d1dSXin LI>>>>>68 ubyte 2 grayscale, 2020b6cee71dSXin LI# this should not happen 2021*ae316d1dSXin LI>>>>>68 default x image, 2022*ae316d1dSXin LI>>>>>12 uleshort >0 %d x 2023*ae316d1dSXin LI>>>>>>14 uleshort x %d dpi, 2024*ae316d1dSXin LI>>>>>2 ubyte 0 uncompressed 2025*ae316d1dSXin LI>>>>>2 ubyte 1 RLE compressed 2026b6cee71dSXin LI 2027b6cee71dSXin LI# Adobe Photoshop 2028b6cee71dSXin LI# From: Asbjoern Sloth Toennesen <asbjorn@lila.io> 202943a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/PSD 203043a5ec4eSXin LI# Reference: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ 203143a5ec4eSXin LI# Note: verfied by XnView `nconvert -fullinfo *.psd *.psb *.pdd` 203243a5ec4eSXin LI# and ImageMagick `identify -verbose *.pdd` 203343a5ec4eSXin LI0 string 8BPS 203443a5ec4eSXin LI# skip DROID x-fmt-92-signature-id-277.psd by checking valid width 2035a4d6d3b8SXin LI>18 ubelong >0 Adobe Photoshop 2036b6cee71dSXin LI!:mime image/vnd.adobe.photoshop 203743a5ec4eSXin LI!:apple ????8BPS 203843a5ec4eSXin LI# version: always equal to 1, but 2 for PSB 203943a5ec4eSXin LI>>4 beshort 1 204043a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/PhotoDeluxe 204143a5ec4eSXin LI# EXTRAS/PHOTOS/DEMOPIX/ORIGINAL.PDD 204243a5ec4eSXin LI>>>34 search/0xC0d7 PHUT Image (PhotoDeluxe) 204343a5ec4eSXin LI!:ext pdd 204443a5ec4eSXin LI>>>34 default x Image 204543a5ec4eSXin LI!:ext psd 204643a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/PSB 204743a5ec4eSXin LI>>4 beshort 2 Image (PSB) 204843a5ec4eSXin LI!:ext psb 204943a5ec4eSXin LI# width in pixels: 1-30000 1-300000 for PSB 205043a5ec4eSXin LI>>18 belong x \b, %d x 205143a5ec4eSXin LI>>14 belong x %d, 205243a5ec4eSXin LI# The color mode; 0~Bitmap 1~Grayscale 2~Indexed 3~RGB 4~CMYK 7~Multichannel 9~Duotone 9~Lab 205343a5ec4eSXin LI>>24 beshort 0 bitmap 205443a5ec4eSXin LI>>24 beshort 1 grayscale 205543a5ec4eSXin LI# the number of channels; range is 1 to 56 205643a5ec4eSXin LI>>>12 beshort 2 with alpha 205743a5ec4eSXin LI>>24 beshort 2 indexed 205843a5ec4eSXin LI>>24 beshort 3 RGB 205943a5ec4eSXin LI>>>12 beshort 4 \bA 206043a5ec4eSXin LI>>24 beshort 4 CMYK 206143a5ec4eSXin LI>>>12 beshort 5 \bA 206243a5ec4eSXin LI>>24 beshort 7 multichannel 206343a5ec4eSXin LI>>24 beshort 8 duotone 206443a5ec4eSXin LI>>24 beshort 9 lab 206543a5ec4eSXin LI>>12 beshort > 1 206643a5ec4eSXin LI>>>12 beshort x \b, %dx 206743a5ec4eSXin LI>>12 beshort 1 \b, 206843a5ec4eSXin LI>>22 beshort x %d-bit channel 206943a5ec4eSXin LI>>12 beshort > 1 \bs 207043a5ec4eSXin LI# 6 reserved bytes; must be zero, but spaces inside ImageMagick input.psd 207143a5ec4eSXin LI# https://download.imagemagick.org/ImageMagick/download/ImageMagick-7.0.11-11.zip 207243a5ec4eSXin LI# ImageMagick-7.0.11-11\PerlMagick\t\input.psd 207343a5ec4eSXin LI>>6 bequad&0xFFffFFffFFff0000 !0 \b, at offset 6 207443a5ec4eSXin LI>>>6 belong x 0x%8.8x 207543a5ec4eSXin LI>>>6 beshort x \b%4.4x 2076b6cee71dSXin LI 2077898496eeSXin LI# From: Joerg Jenderek 2078898496eeSXin LI# URL: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ 2079898496eeSXin LI# http://fileformats.archiveteam.org/wiki/Photoshop 2080898496eeSXin LI# Reference: http://www.nomodes.com/aco.html 2081898496eeSXin LI# Note: registers as Photoshop.SwatchesFile for Photoshop.exe on Windows 2082898496eeSXin LI# check for valid versions like: 2 (newest) 1 (old) 0 (oldest no examples) 2083898496eeSXin LI0 ubeshort <3 2084898496eeSXin LI# skip few Atari DEGAS med-res bitmap (DIAGRAM1.PI2) and many ISO 9660 CD-ROM by check for invalid low color numbers (0) 2085898496eeSXin LI>2 ubeshort >0 2086898496eeSXin LI# skip few Targa (bmpsuite-15col.tga rgb24_top_left_colormap.tga) by check for invalid high color space ID (F0 1D) 2087898496eeSXin LI>>4 ubeshort <16 2088898496eeSXin LI# skip many (69/327) Targa image *.TGA by check of accessing near the ending of first color space section (size=nc*5*2) 2089898496eeSXin LI>>>(2.S*10) ubelong x 2090898496eeSXin LI# RGB branch for Adobe Photoshop Color swatch 2091898496eeSXin LI>>>>4 ubeshort =0 2092898496eeSXin LI# skip many (220/327) Targa by check of for invalid high RGB color z value (hexadecimal 2 3 2e03 4600 5e04 7502 8002 8b05 c700) 2093898496eeSXin LI>>>>>12 ubeshort =0 2094898496eeSXin LI# RGB branch for Adobe Photoshop Color swatch for older versions 2095898496eeSXin LI>>>>>>0 ubeshort <2 2096898496eeSXin LI>>>>>>>0 use adobe-aco 2097898496eeSXin LI# RGB branch for Adobe Photoshop Color swatch for newer version 2 2098898496eeSXin LI>>>>>>0 ubeshort =2 2099898496eeSXin LI# skip many (74/176) Atari DEGAS hi-res bitmap (*.PI3) by check for invalid low color name length (0) 2100898496eeSXin LI>>>>>>>16 ubeshort >0 2101898496eeSXin LI>>>>>>>>0 use adobe-aco 2102898496eeSXin LI# non RGB branch for Adobe Photoshop Color swatch 2103898496eeSXin LI>>>>4 ubeshort !0 2104898496eeSXin LI# non RGB branch for Adobe Photoshop Color swatch for older versions 2105898496eeSXin LI>>>>>0 ubeshort <2 2106898496eeSXin LI# skip many GEM Image (CHURCH.IMG TIGER.IMG) by check for invalid second high color space ID (55 114 143 157 256 288 450) 2107898496eeSXin LI>>>>>>14 ubeshort <16 2108898496eeSXin LI>>>>>>>0 use adobe-aco 2109898496eeSXin LI# non RGB branch for Adobe Photoshop Color swatch for newer version 2 2110898496eeSXin LI>>>>>0 ubeshort =2 2111898496eeSXin LI# skip few Atari DEGAS hi-res bitmap (pal1wb-blue.pi3) and few ABR by check for invalid "high" nil bytes (7) before color name length 2112898496eeSXin LI>>>>>>14 ubeshort =0 2113898496eeSXin LI>>>>>>>0 use adobe-aco 2114898496eeSXin LI# display Adobe Photoshop Color swatch file information (version, number of colors, color spaces, coordinates, names) 2115898496eeSXin LI0 name adobe-aco 2116898496eeSXin LI>0 ubeshort x Adobe Photoshop Color swatch, version %u 2117898496eeSXin LI#!:mime application/octet-stream 2118898496eeSXin LI!:mime application/x-adobe-aco 2119898496eeSXin LI!:apple ????8BCO 2120898496eeSXin LI!:ext aco 2121898496eeSXin LI>0 ubeshort <2 2122898496eeSXin LI>>(2.S*10) ubelong x 2123898496eeSXin LI# version 2 section after version 1 section 2124898496eeSXin LI>>>&0 ubeshort 2 and 2 2125898496eeSXin LI# nc; number of colors like: 20 50 86 88 126 204 300 1050 1137 1280 2092 3010 4096 2126898496eeSXin LI>2 ubeshort x \b, %u colors 2127898496eeSXin LI# maybe last 4 bytes of first section (probably y z color value) like: 0 0x66660000 0xfe700000 0xffff0000 2128898496eeSXin LI#>(2.S*10) ubelong x 1ST_SECTION_END=%#8.8x 2129898496eeSXin LI>0 ubeshort <2 \b; 1st 2130898496eeSXin LI# first older Adobe Photoshop Color entry 2131898496eeSXin LI>>4 use aco-color 2132898496eeSXin LI>>>2 ubeshort >1 \b; 2nd 2133898496eeSXin LI# second older Adobe Photoshop Color entry 2134898496eeSXin LI>>>>14 use aco-color 2135898496eeSXin LI>0 ubeshort =2 \b; 1st 2136898496eeSXin LI# first new Adobe Photoshop Color entry 2137898496eeSXin LI>>4 use aco-color-v2 2138898496eeSXin LI>>>2 ubeshort >1 \b; 2nd 2139898496eeSXin LI# jump first color name length words 2140898496eeSXin LI>>>>(16.S*2) ubequad x 2141898496eeSXin LI# second new Adobe Photoshop Color entry 2142898496eeSXin LI>>>>>&10 use aco-color-v2 2143898496eeSXin LI# display Adobe Photoshop Color entry (color space, color coordinates) 2144898496eeSXin LI0 name aco-color 2145898496eeSXin LI# each color spec entry occupies five words 2146898496eeSXin LI# color space: 0~RGB 1~HSB 2~CMYK 3~Pantone 4~Focoltone 5~Trumatch 6~Toyo 7~Lab 8~Grayscale 9?~wideCMYK 10~HKS ... 2147898496eeSXin LI#>0 ubeshort x COLOR_ENTRY 2148898496eeSXin LI>0 ubeshort 0 RGB 2149898496eeSXin LI>0 ubeshort 1 HSB 2150898496eeSXin LI>0 ubeshort 2 CMYK 2151898496eeSXin LI>0 ubeshort 3 Pantone 2152898496eeSXin LI>0 ubeshort 4 Focoltone 2153898496eeSXin LI>0 ubeshort 5 Trumatch 2154898496eeSXin LI>0 ubeshort 6 Toyo 2155898496eeSXin LI>0 ubeshort 7 Lab 2156898496eeSXin LI>0 ubeshort 8 Grayscale 2157898496eeSXin LI>0 ubeshort 9 wide CMYK 2158898496eeSXin LI>0 ubeshort 10 HKS 2159898496eeSXin LI# unofficial 2160898496eeSXin LI# >0 ubeshort 12 foo 2161898496eeSXin LI# >0 ubeshort 13 bar 2162898496eeSXin LI# >0 ubeshort 14 FOO 2163898496eeSXin LI# >0 ubeshort 15 BAR 2164898496eeSXin LI>0 ubeshort x space (%u) 2165898496eeSXin LI# color coordinate w 2166898496eeSXin LI>2 ubeshort x \b, w %#x 2167898496eeSXin LI# color coordinate x 2168898496eeSXin LI>4 ubeshort x \b, x %#x 2169898496eeSXin LI# color coordinate y 2170898496eeSXin LI>6 ubeshort x \b, y %#x 2171898496eeSXin LI# color coordinate z; zero for RGB space 2172898496eeSXin LI>8 ubeshort x \b, z %#x 2173898496eeSXin LI# display Adobe Photoshop Color entry version 2 (color space, color coordinates names) 2174898496eeSXin LI0 name aco-color-v2 2175898496eeSXin LI>0 use aco-color 2176898496eeSXin LI#>10 ubeshort x \b, NUL_BYTES %#x 2177898496eeSXin LI# color name length plus one (len+1) like: 7 8 9 13 14 15 16 17 22 26 2178898496eeSXin LI#>>12 ubeshort x \b, LENGTH %u 2179898496eeSXin LI>>12 ubeshort-1 x \b, %u chars 2180898496eeSXin LI# len words; UTF-16 representation of the color name like: "DIC 1s" "PANTONE Process Yellow PC" 2181898496eeSXin LI>>14 bestring16 x "%s" 2182898496eeSXin LI# followed by nil word 2183898496eeSXin LI 2184b6cee71dSXin LI# XV thumbnail indicator (ThMO) 218543a5ec4eSXin LI# URL: https://en.wikipedia.org/wiki/Xv_(software) 218643a5ec4eSXin LI# Reference: http://fileformats.archiveteam.org/wiki/XV_thumbnail 218743a5ec4eSXin LI# Update: Joerg Jenderek 2188b6cee71dSXin LI0 string P7\ 332 XV thumbnail image data 218943a5ec4eSXin LI#0 string P7\ 332 XV "thumbnail file" (icon) data 219043a5ec4eSXin LI!:mime image/x-xv-thumbnail 219143a5ec4eSXin LI# thumbnail .xvpic/foo.bar for graphic foo.bar 219243a5ec4eSXin LI!:ext p7/gif/tif/xpm/jpg 2193b6cee71dSXin LI 2194b6cee71dSXin LI# NITF is defined by United States MIL-STD-2500A 2195b6cee71dSXin LI0 string NITF National Imagery Transmission Format 2196b6cee71dSXin LI>25 string >\0 dated %.14s 2197b6cee71dSXin LI 21985f0216bdSXin LI 21995f0216bdSXin LI0 name gem_info 22003e41d09dSXin LI# version is 2 for some XIMG and 1 for all others 2201a4d6d3b8SXin LI>0 ubeshort <0x0003 GEM 220248c779cdSXin LI# https://www.snowstone.org.uk/riscos/mimeman/mimemap.txt 22033e41d09dSXin LI!:mime image/x-gem 22043e41d09dSXin LI# header_size 24 25 27 59 779 words for colored bitmaps 2205a4d6d3b8SXin LI>>2 ubeshort >9 22063e41d09dSXin LI>>>16 string STTT\0\x10 STTT 22073e41d09dSXin LI>>>16 string TIMG\0 TIMG 22083e41d09dSXin LI# HYPERPAINT or NOSIG variant 22093e41d09dSXin LI>>>16 string \0\x80 2210a4d6d3b8SXin LI>>>>2 ubeshort =24 NOSIG 2211a4d6d3b8SXin LI>>>>2 ubeshort !24 HYPERPAINT 22123e41d09dSXin LI# NOSIG or XIMG variant 22133e41d09dSXin LI>>>16 default x 22143e41d09dSXin LI>>>>16 string !XIMG\0 NOSIG 22153e41d09dSXin LI>>16 string =XIMG\0 XIMG Image data 22163e41d09dSXin LI!:ext img/ximg 22173e41d09dSXin LI# to avoid Warning: Current entry does not yet have a description for adding a EXTENSION type 22183e41d09dSXin LI>>16 string !XIMG\0 Image data 22193e41d09dSXin LI!:ext img 22203e41d09dSXin LI# header_size is 9 for Ventura files and 8 for other GEM Paint files 2221a4d6d3b8SXin LI>>2 ubeshort 9 (Ventura) 2222a4d6d3b8SXin LI#>>2 ubeshort 8 (Paint) 2223a4d6d3b8SXin LI>>12 ubeshort x %d x 2224a4d6d3b8SXin LI>>14 ubeshort x %d, 22253e41d09dSXin LI# 1 4 8 2226a4d6d3b8SXin LI>>4 ubeshort x %d planes, 22273e41d09dSXin LI# in tenths of a millimetre 2228a4d6d3b8SXin LI>>8 ubeshort x %d x 2229a4d6d3b8SXin LI>>10 ubeshort x %d pixelsize 22303e41d09dSXin LI# pattern_size 1-8. 2 for GEM Paint 2231a4d6d3b8SXin LI>>6 ubeshort !2 \b, pattern size %d 2232b6cee71dSXin LI 2233b6cee71dSXin LI# GEM Metafile (Wolfram Kleff) 2234a4d6d3b8SXin LI0 ulelong 0x0018FFFF GEM Metafile data 2235a4d6d3b8SXin LI>4 uleshort x version %d 2236b6cee71dSXin LI 2237b6cee71dSXin LI# 2238b6cee71dSXin LI# SMJPEG. A custom Motion JPEG format used by Loki Entertainment 2239b6cee71dSXin LI# Software Torbjorn Andersson <d91tan@Update.UU.SE>. 2240b6cee71dSXin LI# 2241b6cee71dSXin LI0 string \0\nSMJPEG SMJPEG 2242a4d6d3b8SXin LI>8 ubelong x %d.x data 2243b6cee71dSXin LI# According to the specification you could find any number of _TXT 2244b6cee71dSXin LI# headers here, but I can't think of any way of handling that. None of 2245b6cee71dSXin LI# the SMJPEG files I tried it on used this feature. Even if such a 2246b6cee71dSXin LI# file is encountered the output should still be reasonable. 2247b6cee71dSXin LI>16 string _SND \b, 2248a4d6d3b8SXin LI>>24 ubeshort >0 %d Hz 2249a4d6d3b8SXin LI>>26 ubyte 8 8-bit 2250a4d6d3b8SXin LI>>26 ubyte 16 16-bit 2251b6cee71dSXin LI>>28 string NONE uncompressed 2252b6cee71dSXin LI# >>28 string APCM ADPCM compressed 2253a4d6d3b8SXin LI>>27 ubyte 1 mono 2254a4d6d3b8SXin LI>>28 ubyte 2 stereo 2255b6cee71dSXin LI# Help! Isn't there any way to avoid writing this part twice? 2256a4d6d3b8SXin LI# Yes, use a name/use 2257b6cee71dSXin LI>>32 string _VID \b, 2258b6cee71dSXin LI# >>>48 string JFIF JPEG 2259a4d6d3b8SXin LI>>>40 ubelong >0 %d frames 2260a4d6d3b8SXin LI>>>44 ubeshort >0 (%d x 2261a4d6d3b8SXin LI>>>46 ubeshort >0 %d) 2262b6cee71dSXin LI>16 string _VID \b, 2263b6cee71dSXin LI# >>32 string JFIF JPEG 2264a4d6d3b8SXin LI>>24 ubelong >0 %d frames 2265a4d6d3b8SXin LI>>28 ubeshort >0 (%d x 2266a4d6d3b8SXin LI>>30 ubeshort >0 %d) 2267b6cee71dSXin LI 2268b6cee71dSXin LI0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File 2269b6cee71dSXin LI 2270b6cee71dSXin LI# taken from fkiss: (<yav@mte.biglobe.ne.jp> ?) 2271b6cee71dSXin LI0 string KiSS KISS/GS 2272a4d6d3b8SXin LI>4 ubyte 16 color 2273a4d6d3b8SXin LI>>5 ubyte x %d bit 2274a4d6d3b8SXin LI>>8 uleshort x %d colors 2275a4d6d3b8SXin LI>>10 uleshort x %d groups 2276a4d6d3b8SXin LI>4 ubyte 32 cell 2277a4d6d3b8SXin LI>>5 ubyte x %d bit 2278a4d6d3b8SXin LI>>8 uleshort x %d x 2279a4d6d3b8SXin LI>>10 uleshort x %d 2280a4d6d3b8SXin LI>>12 uleshort x +%d 2281a4d6d3b8SXin LI>>14 uleshort x +%d 2282b6cee71dSXin LI 2283b6cee71dSXin LI# Webshots (www.webshots.com), by John Harrison 2284b6cee71dSXin LI0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file 2285b6cee71dSXin LI 2286b6cee71dSXin LI# Hercules DASD image files 2287a4d6d3b8SXin LI# From Jan Jaeger <jj@septa.nl> and Jay Maynard <jaymaynard@gmail.com> 2288*ae316d1dSXin LI 2289*ae316d1dSXin LI# Common Hercules CKD image files 2290*ae316d1dSXin LI0 name HercCKD 2291*ae316d1dSXin LI>0 lelong x \b, %d heads per cylinder 2292*ae316d1dSXin LI>4 lelong x \b, track size %d bytes 2293*ae316d1dSXin LI>8 ubyte >0x2F 2294*ae316d1dSXin LI>>8 ubyte 0x45 \b, device type 9345 2295*ae316d1dSXin LI>>8 ubyte !0x45 \b, device type 33%2.2X 2296*ae316d1dSXin LI>8 ubyte <0x30 \b, device type 23%2.2X 2297*ae316d1dSXin LI 2298b6cee71dSXin LI0 string CKD_P370 Hercules CKD DASD image file 2299*ae316d1dSXin LI>8 use HercCKD 2300b6cee71dSXin LI 2301b6cee71dSXin LI0 string CKD_C370 Hercules compressed CKD DASD image file 2302*ae316d1dSXin LI>8 use HercCKD 2303a4d6d3b8SXin LI>552 lelong x \b, %d total cylinders 2304a4d6d3b8SXin LI>>557 byte 0 \b, no compression 2305a4d6d3b8SXin LI>>557 byte 1 \b, ZLIB compression 2306a4d6d3b8SXin LI>>557 byte 2 \b, BZ2 compression 2307b6cee71dSXin LI 2308b6cee71dSXin LI0 string CKD_S370 Hercules CKD DASD shadow file 2309*ae316d1dSXin LI>8 use HercCKD 2310a4d6d3b8SXin LI 2311a4d6d3b8SXin LI0 string CKD_P064 Hercules CKD64 DASD image file 2312*ae316d1dSXin LI>8 use HercCKD 2313a4d6d3b8SXin LI 2314a4d6d3b8SXin LI0 string CKD_C064 Hercules compressed CKD64 DASD image file 2315*ae316d1dSXin LI>8 use HercCKD 2316a4d6d3b8SXin LI>524 lelong x \b, %d total cylinders 2317a4d6d3b8SXin LI>>585 byte 0 \b, no compression 2318a4d6d3b8SXin LI>>585 byte 1 \b, ZLIB compression 2319a4d6d3b8SXin LI>>585 byte 2 \b, BZ2 compression 2320a4d6d3b8SXin LI 2321a4d6d3b8SXin LI0 string CKD_S064 Hercules CKD64 DASD shadow file 2322*ae316d1dSXin LI>8 use HercCKD 2323b6cee71dSXin LI 2324b6cee71dSXin LI# Squeak images and programs - etoffi@softhome.net 2325b6cee71dSXin LI0 string \146\031\0\0 Squeak image data 2326b6cee71dSXin LI0 search/1 'From\040Squeak Squeak program text 2327b6cee71dSXin LI 2328b6cee71dSXin LI# partimage: file(1) magic for PartImage files (experimental, incomplete) 2329b6cee71dSXin LI# Author: Hans-Joachim Baader <hjb@pro-linux.de> 2330b6cee71dSXin LI0 string PaRtImAgE-VoLuMe PartImage 2331b6cee71dSXin LI>0x0020 string 0.6.1 file version %s 2332a4d6d3b8SXin LI>>0x0060 ulelong >-1 volume %d 2333b6cee71dSXin LI#>>0x0064 8 byte identifier 2334b6cee71dSXin LI#>>0x007c reserved 2335b6cee71dSXin LI>>0x0200 string >\0 type %s 2336b6cee71dSXin LI>>0x1400 string >\0 device %s, 2337b6cee71dSXin LI>>0x1600 string >\0 original filename %s, 2338b6cee71dSXin LI# Some fields omitted 2339a4d6d3b8SXin LI>>0x2744 ulelong 0 not compressed 2340a4d6d3b8SXin LI>>0x2744 ulelong 1 gzip compressed 2341a4d6d3b8SXin LI>>0x2744 ulelong 2 bzip2 compressed 2342a4d6d3b8SXin LI>>0x2744 ulelong >2 compressed with unknown algorithm 2343b6cee71dSXin LI>0x0020 string >0.6.1 file version %s 2344b6cee71dSXin LI>0x0020 string <0.6.1 file version %s 2345b6cee71dSXin LI 2346b6cee71dSXin LI# DCX is multi-page PCX, using a simple header of up to 1024 2347b6cee71dSXin LI# offsets for the respective PCX components. 2348b6cee71dSXin LI# From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> 234943a5ec4eSXin LI# Update: Joerg Jenderek 235043a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/DCX 2351a4d6d3b8SXin LI0 ulelong 987654321 DCX multi-page 235243a5ec4eSXin LI# http://www.nationalarchives.gov.uk/pronom/x-fmt/348 235343a5ec4eSXin LI!:mime image/x-dcx 235443a5ec4eSXin LI!:ext dcx 235543a5ec4eSXin LI# The first file offset usually starts at file offset 0x1004 235643a5ec4eSXin LI# print 1 space after 0x100? offset and then handles PCX images by ./images 2357a4d6d3b8SXin LI>4 ulelong x \b, at %#x 235843a5ec4eSXin LI>(4.l) indirect x 235943a5ec4eSXin LI# possible 2nd PCX image 2360a4d6d3b8SXin LI#>8 ulelong !0 \b, at %#x 236143a5ec4eSXin LI#>>(8.l) indirect x 236243a5ec4eSXin LI# possible 3rd PCX image 2363a4d6d3b8SXin LI#>12 ulelong !0 \b, at %#x 236443a5ec4eSXin LI#>>(12.l) indirect x 2365b6cee71dSXin LI 2366b6cee71dSXin LI# Simon Walton <simonw@matteworld.com> 2367b6cee71dSXin LI# Kodak Cineon format for scanned negatives 2368b6cee71dSXin LI# http://www.kodak.com/US/en/motion/support/dlad/ 2369a4d6d3b8SXin LI0 ulelong 0xd75f2a80 Cineon image data 2370a4d6d3b8SXin LI>200 ubelong >0 \b, %d x 2371a4d6d3b8SXin LI>204 ubelong >0 %d 2372b6cee71dSXin LI 2373b6cee71dSXin LI 2374b6cee71dSXin LI# Bio-Rad .PIC is an image format used by microscope control systems 2375b6cee71dSXin LI# and related image processing software used by biologists. 2376b6cee71dSXin LI# From: Vebjorn Ljosa <vebjorn@ljosa.com> 2377b6cee71dSXin LI# BOOL values are two-byte integers; use them to rule out false positives. 237848c779cdSXin LI# https://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt 237948c779cdSXin LI# Samples: https://www.loci.wisc.edu/software/sample-data 2380a4d6d3b8SXin LI14 uleshort <2 2381a4d6d3b8SXin LI>62 uleshort <2 2382a4d6d3b8SXin LI>>54 uleshort 12345 Bio-Rad .PIC Image File 2383a4d6d3b8SXin LI>>>0 uleshort >0 %d x 2384a4d6d3b8SXin LI>>>2 uleshort >0 %d, 2385a4d6d3b8SXin LI>>>4 uleshort =1 1 image in file 2386a4d6d3b8SXin LI>>>4 uleshort >1 %d images in file 2387b6cee71dSXin LI 2388b6cee71dSXin LI# From Jan "Yenya" Kasprzak <kas@fi.muni.cz> 2389b6cee71dSXin LI# The description of *.mrw format can be found at 2390b6cee71dSXin LI# http://www.dalibor.cz/minolta/raw_file_format.htm 2391b6cee71dSXin LI0 string \000MRM Minolta Dimage camera raw image data 2392b6cee71dSXin LI 2393b6cee71dSXin LI# Summary: DjVu image / document 2394b6cee71dSXin LI# Extension: .djvu 2395b6cee71dSXin LI# Reference: http://djvu.org/docs/DjVu3Spec.djvu 2396b6cee71dSXin LI# Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr> 2397b6cee71dSXin LI# Modified by (1): Abel Cheung <abelcheung@gmail.com> 2398b6cee71dSXin LI0 string AT&TFORM 2399b6cee71dSXin LI>12 string DJVM DjVu multiple page document 2400b6cee71dSXin LI!:mime image/vnd.djvu 2401b6cee71dSXin LI>12 string DJVU DjVu image or single page document 2402b6cee71dSXin LI!:mime image/vnd.djvu 2403b6cee71dSXin LI>12 string DJVI DjVu shared document 2404b6cee71dSXin LI!:mime image/vnd.djvu 2405b6cee71dSXin LI>12 string THUM DjVu page thumbnails 2406b6cee71dSXin LI!:mime image/vnd.djvu 2407b6cee71dSXin LI 2408b6cee71dSXin LI# Originally by Marc Espie 2409b6cee71dSXin LI# Modified by Robert Minsk <robertminsk at yahoo.com> 241048c779cdSXin LI# https://www.openexr.com/openexrfilelayout.pdf 2411a4d6d3b8SXin LI0 ulelong 20000630 OpenEXR image data, 2412b6cee71dSXin LI!:mime image/x-exr 2413a4d6d3b8SXin LI>4 ulelong&0x000000ff x version %d, 2414a4d6d3b8SXin LI>4 ulelong ^0x00000200 storage: scanline 2415a4d6d3b8SXin LI>4 ulelong &0x00000200 storage: tiled 2416b6cee71dSXin LI>8 search/0x1000 compression\0 \b, compression: 2417a4d6d3b8SXin LI>>&16 ubyte 0 none 2418a4d6d3b8SXin LI>>&16 ubyte 1 rle 2419a4d6d3b8SXin LI>>&16 ubyte 2 zips 2420a4d6d3b8SXin LI>>&16 ubyte 3 zip 2421a4d6d3b8SXin LI>>&16 ubyte 4 piz 2422a4d6d3b8SXin LI>>&16 ubyte 5 pxr24 2423a4d6d3b8SXin LI>>&16 ubyte 6 b44 2424a4d6d3b8SXin LI>>&16 ubyte 7 b44a 2425a4d6d3b8SXin LI>>&16 ubyte 8 dwaa 2426a4d6d3b8SXin LI>>&16 ubyte 9 dwab 2427a4d6d3b8SXin LI>>&16 ubyte >9 unknown 2428b6cee71dSXin LI>8 search/0x1000 dataWindow\0 \b, dataWindow: 2429a4d6d3b8SXin LI>>&10 ulelong x (%d 2430a4d6d3b8SXin LI>>&14 ulelong x %d)- 2431a4d6d3b8SXin LI>>&18 ulelong x \b(%d 2432a4d6d3b8SXin LI>>&22 ulelong x %d) 2433b6cee71dSXin LI>8 search/0x1000 displayWindow\0 \b, displayWindow: 2434a4d6d3b8SXin LI>>&10 ulelong x (%d 2435a4d6d3b8SXin LI>>&14 ulelong x %d)- 2436a4d6d3b8SXin LI>>&18 ulelong x \b(%d 2437a4d6d3b8SXin LI>>&22 ulelong x %d) 2438b6cee71dSXin LI>8 search/0x1000 lineOrder\0 \b, lineOrder: 2439a4d6d3b8SXin LI>>&14 ubyte 0 increasing y 2440a4d6d3b8SXin LI>>&14 ubyte 1 decreasing y 2441a4d6d3b8SXin LI>>&14 ubyte 2 random y 2442a4d6d3b8SXin LI>>&14 ubyte >2 unknown 2443b6cee71dSXin LI 2444b6cee71dSXin LI# SMPTE Digital Picture Exchange Format, SMPTE DPX 2445b6cee71dSXin LI# 2446b6cee71dSXin LI# ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital 2447b6cee71dSXin LI# Moving-Picture Exchange (DPX), v1.0, 18 February 1994 2448b6cee71dSXin LI# Robert Minsk <robertminsk at yahoo.com> 244958a0f0d0SEitan Adler# Modified by Harry Mallon <hjmallon at gmail.com> 2450b6cee71dSXin LI0 string SDPX DPX image data, big-endian, 2451b6cee71dSXin LI!:mime image/x-dpx 245258a0f0d0SEitan Adler>0 use dpx_info 245358a0f0d0SEitan Adler0 string XPDS DPX image data, little-endian, 245458a0f0d0SEitan Adler!:mime image/x-dpx 245558a0f0d0SEitan Adler>0 use \^dpx_info 245658a0f0d0SEitan Adler 245758a0f0d0SEitan Adler0 name dpx_info 2458a4d6d3b8SXin LI>768 ubeshort <4 2459a4d6d3b8SXin LI>>772 ubelong x %dx 2460a4d6d3b8SXin LI>>776 ubelong x \b%d, 2461a4d6d3b8SXin LI>768 ubeshort >3 2462a4d6d3b8SXin LI>>776 ubelong x %dx 2463a4d6d3b8SXin LI>>772 ubelong x \b%d, 2464a4d6d3b8SXin LI>768 ubeshort 0 left to right/top to bottom 2465a4d6d3b8SXin LI>768 ubeshort 1 right to left/top to bottom 2466a4d6d3b8SXin LI>768 ubeshort 2 left to right/bottom to top 2467a4d6d3b8SXin LI>768 ubeshort 3 right to left/bottom to top 2468a4d6d3b8SXin LI>768 ubeshort 4 top to bottom/left to right 2469a4d6d3b8SXin LI>768 ubeshort 5 top to bottom/right to left 2470a4d6d3b8SXin LI>768 ubeshort 6 bottom to top/left to right 2471a4d6d3b8SXin LI>768 ubeshort 7 bottom to top/right to left 2472b6cee71dSXin LI 2473b6cee71dSXin LI# From: Tom Hilinski <tom.hilinski@comcast.net> 2474a4d6d3b8SXin LI# Update: Joerg Jenderek 2475a4d6d3b8SXin LI# URL: https://en.wikipedia.org/wiki/NetCDF 2476a4d6d3b8SXin LI# http://fileformats.archiveteam.org/wiki/NetCDF 2477a4d6d3b8SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/n/netcdf.trid.xml 2478a4d6d3b8SXin LI# https://www.loc.gov/preservation/digital/formats/fdd/fdd000330.shtml 2479a4d6d3b8SXin LI# Note: called "NetCDF Network Common Data Form" by TrID and 2480a4d6d3b8SXin LI# "netCDF-3 Classic" by DROID via PUID fmt/282 2481a4d6d3b8SXin LI# https://www.unidata.ucar.edu/packages/netcdf/ 2482a4d6d3b8SXin LI0 string CDF\001 2483a4d6d3b8SXin LI# skip DROID fmt-282-signature-id-298.nc by test for more content bytes 2484a4d6d3b8SXin LI>3 uleshort >0 NetCDF Data Format data 2485a4d6d3b8SXin LI#!:mime application/netcdf 2486a4d6d3b8SXin LI# https://reposcope.com/mimetype/application/x-netcdf 2487a4d6d3b8SXin LI!:mime application/x-netcdf 2488a4d6d3b8SXin LI!:ext nc 2489a4d6d3b8SXin LI# https://fileinfo.com/extension/cdf 2490a4d6d3b8SXin LI# https://www.file-extensions.org/cdf-file-extension-unidata-network-common-data-form 2491a4d6d3b8SXin LI# in 1994 changed from CDF to NC file extension avoid a clash with other file formats 2492a4d6d3b8SXin LI#!:ext nc/cdf 24932726a701SXin LI# 64-bit offset netcdf Classic https://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications 2494a4d6d3b8SXin LI# Note: called "netCDF-3 64-bit" by DROID via PUID fmt/283 2495a4d6d3b8SXin LI0 string CDF\002 2496a4d6d3b8SXin LI# skip DROID fmt-283-signature-id-299.nc by test for more content bytes 2497a4d6d3b8SXin LI>3 uleshort >0 NetCDF Data Format data (64-bit offset) 2498a4d6d3b8SXin LI#!:mime application/netcdf 2499a4d6d3b8SXin LI!:mime application/x-netcdf 2500a4d6d3b8SXin LI!:ext nc 2501b6cee71dSXin LI 250243a5ec4eSXin LI# From: Michael Liu 250343a5ec4eSXin LI# https://en.wikipedia.org/wiki/Common_Data_Format 2504a4d6d3b8SXin LI0 ubelong 0xCDF30001 Common Data Format (Version 3 or later) data 250543a5ec4eSXin LI!:mime application/x-cdf 250643a5ec4eSXin LI 2507a4d6d3b8SXin LI0 ubelong 0xCDF26002 Common Data Format (Version 2.6 or 2.7) data 250843a5ec4eSXin LI!:mime application/x-cdf 250943a5ec4eSXin LI 2510a4d6d3b8SXin LI0 ubelong 0x0000FFFF Common Data Format (Version 2.5 or earlier) data 251143a5ec4eSXin LI!:mime application/x-cdf 251243a5ec4eSXin LI 2513b6cee71dSXin LI# Hierarchical Data Format, used to facilitate scientific data exchange 2514b6cee71dSXin LI# specifications at http://hdf.ncsa.uiuc.edu/ 251543a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/HDF 251643a5ec4eSXin LI# https://en.wikipedia.org/wiki/Hierarchical_Data_Format 251743a5ec4eSXin LI# Reference: https://portal.hdfgroup.org/download/attachments/52627880/HDF5_File_Format_Specification_Version-3.0.pdf 2518a4d6d3b8SXin LI0 ubelong 0x0e031301 Hierarchical Data Format (version 4) data 2519b6cee71dSXin LI!:mime application/x-hdf 252043a5ec4eSXin LI!:ext hdf/hdf4/h4 2521b6cee71dSXin LI0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data 252243a5ec4eSXin LI#!:mime application/x-hdf 252343a5ec4eSXin LI!:mime application/x-hdf5 252443a5ec4eSXin LI!:ext h5/hdf5/hdf/he5 252543a5ec4eSXin LI512 string \211HDF\r\n\032\n 252643a5ec4eSXin LI# skip Matlab v5 mat-file testhdf5_7.4_GLNX86.mat handled by ./mathematica 252743a5ec4eSXin LI>0 string !MATLAB Hierarchical Data Format (version 5) with 512 bytes user block 252843a5ec4eSXin LI#!:mime application/x-hdf 252943a5ec4eSXin LI!:mime application/x-hdf5 253043a5ec4eSXin LI!:ext h5/hdf5/hdf/he5 2531b6cee71dSXin LI1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block 253243a5ec4eSXin LI#!:mime application/x-hdf 253343a5ec4eSXin LI!:mime application/x-hdf5 253443a5ec4eSXin LI!:ext h5/hdf5/hdf/he5 2535b6cee71dSXin LI2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block 253643a5ec4eSXin LI#!:mime application/x-hdf 253743a5ec4eSXin LI!:mime application/x-hdf5 253843a5ec4eSXin LI!:ext h5/hdf5/hdf/he5 2539b6cee71dSXin LI4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block 254043a5ec4eSXin LI#!:mime application/x-hdf 254143a5ec4eSXin LI!:mime application/x-hdf5 254243a5ec4eSXin LI!:ext h5/hdf5/hdf/he5 2543b6cee71dSXin LI 2544b6cee71dSXin LI# From: Tobias Burnus <burnus@net-b.de> 2545b6cee71dSXin LI# Xara (for a while: Corel Xara) is a graphic package, see 2546b6cee71dSXin LI# http://www.xara.com/ for Windows and as GPL application for Linux 2547b6cee71dSXin LI0 string XARA\243\243 Xara graphics file 2548b6cee71dSXin LI 254943a5ec4eSXin LI# From: Joerg Jenderek 255043a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/Corel_Gallery 255143a5ec4eSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bmf-corel.trid.xml 255243a5ec4eSXin LI# Note: called "Corel Binary Material Format" by TrID and 255343a5ec4eSXin LI# "Corel Flow" by XnView 255443a5ec4eSXin LI0 string @CorelBMF\n\rCorel\040Corporation Corel GALLERY Clipart 255543a5ec4eSXin LI!:mime image/x-corel-bmf 255643a5ec4eSXin LI!:ext bmf 255743a5ec4eSXin LI 255848c779cdSXin LI# https://www.cartesianinc.com/Tech/ 255943a5ec4eSXin LI# Reference: http://fileformats.archiveteam.org/wiki/Cartesian_Perceptual_Compression 2560b6cee71dSXin LI0 string CPC\262 Cartesian Perceptual Compression image 2561b6cee71dSXin LI!:mime image/x-cpi 256243a5ec4eSXin LI!:ext cpi/cpc 2563b6cee71dSXin LI 2564b6cee71dSXin LI# From Albert Cahalan <acahalan@gmail.com> 2565b6cee71dSXin LI# puredigital used it for the CVS disposable camcorder 2566b6cee71dSXin LI#8 lelong 4 ZBM bitmap image data 2567a4d6d3b8SXin LI#>4 uleshort x %u x 2568a4d6d3b8SXin LI#>6 uleshort x %u 2569b6cee71dSXin LI 2570b6cee71dSXin LI# From Albert Cahalan <acahalan@gmail.com> 2571b6cee71dSXin LI# uncompressed 5:6:5 HighColor image for OLPC XO firmware icons 2572b6cee71dSXin LI0 string C565 OLPC firmware icon image data 2573a4d6d3b8SXin LI>4 uleshort x %u x 2574a4d6d3b8SXin LI>6 uleshort x %u 2575b6cee71dSXin LI 2576b6cee71dSXin LI# Applied Images - Image files from Cytovision 2577b6cee71dSXin LI# Gustavo Junior Alves <gjalves@gjalves.com.br> 2578b6cee71dSXin LI0 string \xce\xda\xde\xfa Cytovision Metaphases file 2579b6cee71dSXin LI0 string \xed\xad\xef\xac Cytovision Karyotype file 2580b6cee71dSXin LI0 string \x0b\x00\x03\x00 Cytovision FISH Probe file 2581b6cee71dSXin LI0 string \xed\xfe\xda\xbe Cytovision FLEX file 2582b6cee71dSXin LI0 string \xed\xab\xed\xfe Cytovision FLEX file 2583b6cee71dSXin LI0 string \xad\xfd\xea\xad Cytovision RATS file 2584b6cee71dSXin LI 2585b6cee71dSXin LI# Wavelet Scalar Quantization format used in gray-scale fingerprint images 2586b6cee71dSXin LI# From Tano M Fotang <mfotang@quanteq.com> 2587b6cee71dSXin LI0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data 2588b6cee71dSXin LI 2589b6cee71dSXin LI# Type: PCO B16 image files 2590b6cee71dSXin LI# URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf 2591b6cee71dSXin LI# From: Florian Philipp <florian.philipp@binarywings.net> 2592b6cee71dSXin LI# Extension: .b16 2593b6cee71dSXin LI# Description: Pixel image format produced by PCO Camware, typically used 2594b6cee71dSXin LI# together with PCO cameras. 2595b6cee71dSXin LI# Note: Different versions exist for e.g. 8 bit and 16 bit images. 2596b6cee71dSXin LI# Documentation is incomplete. 2597b6cee71dSXin LI0 string/b PCO- PCO B16 image data 2598a4d6d3b8SXin LI>12 ulelong x \b, %dx 2599a4d6d3b8SXin LI>16 ulelong x \b%d 2600a4d6d3b8SXin LI>20 ulelong 0 \b, short header 2601a4d6d3b8SXin LI>20 ulelong -1 \b, extended header 2602a4d6d3b8SXin LI>>24 ulelong 0 \b, grayscale 2603a4d6d3b8SXin LI>>>36 ulelong 0 linear LUT 2604a4d6d3b8SXin LI>>>36 ulelong 1 logarithmic LUT 2605a4d6d3b8SXin LI>>>28 ulelong x [%d 2606a4d6d3b8SXin LI>>>32 ulelong x \b,%d] 2607a4d6d3b8SXin LI>>24 ulelong 1 \b, color 2608a4d6d3b8SXin LI>>>64 ulelong 0 linear LUT 2609a4d6d3b8SXin LI>>>64 ulelong 1 logarithmic LUT 2610a4d6d3b8SXin LI>>>40 ulelong x r[%d 2611a4d6d3b8SXin LI>>>44 ulelong x \b,%d] 2612a4d6d3b8SXin LI>>>48 ulelong x g[%d 2613a4d6d3b8SXin LI>>>52 ulelong x \b,%d] 2614a4d6d3b8SXin LI>>>56 ulelong x b[%d 2615a4d6d3b8SXin LI>>>60 ulelong x \b,%d] 2616b6cee71dSXin LI 2617b6cee71dSXin LI# Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches 2618b6cee71dSXin LI# From: Markus Heidelberg <markus.heidelberg at web.de> 2619b6cee71dSXin LI0 string/t [BitmapInfo2] Polar Monitor Bitmap text 2620b6cee71dSXin LI!:mime image/x-polar-monitor-bitmap 2621b6cee71dSXin LI 2622b6cee71dSXin LI# From: Rick Richardson <rickrich@gmail.com> 26233e41d09dSXin LI# updated by: Joerg Jenderek 26243e41d09dSXin LI# URL: http://techmods.net/nuvi/ 2625b6cee71dSXin LI0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file 26263e41d09dSXin LI# extension is also used for 26273e41d09dSXin LI# Sony SRF raw image (image/x-sony-srf) 26283e41d09dSXin LI# SRF map 262948c779cdSXin LI# Terragen Surface Map (https://www.planetside.co.uk/terragen) 263048c779cdSXin LI# FileLocator Pro search criteria file (https://www.mythicsoft.com/filelocatorpro) 26313e41d09dSXin LI!:ext srf 26323e41d09dSXin LI#!:mime image/x-garmin-srf 26333e41d09dSXin LI# version 1.00,2.00,2.10,2.40,2.50 26343e41d09dSXin LI>0x2f string >0 \b, version %4.4s 26353e41d09dSXin LI# width (2880,2881,3240) 26363e41d09dSXin LI>0x55 uleshort >0 \b, %dx 26373e41d09dSXin LI# height (80,90) 26383e41d09dSXin LI>>0x53 uleshort x \b%d 2639b6cee71dSXin LI 2640a2dfb722SXin LI# From: Joerg Jenderek 2641a2dfb722SXin LI# URL: http://fileformats.archiveteam.org/wiki/Imageiio/imaginfo_(Ulead) 2642a2dfb722SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe3.trid.xml 2643a2dfb722SXin LI# Note: called "Ulead Imageiio/Imaginfo thumbnail" by TrID 2644a2dfb722SXin LI0 string IIO1$ Ulead Photo Explorer 3 2645a2dfb722SXin LI#!:mime application/octet-stream 2646a2dfb722SXin LI!:mime image/x-ulead-pe3 2647a2dfb722SXin LI# IMAGEIIO.PE3 2648a2dfb722SXin LI!:ext pe3 2649a2dfb722SXin LI# look for DOS/Windows drive letter 2650a2dfb722SXin LI>5 search/192/s :\\ 2651a2dfb722SXin LI# directory or full name of corresponding imaginfo.pe3 like: "T:\SAMPLES\TEXTURES\SKY_SNOW\IIOE371.TMP "S:\PI3\PIMPACT3\PROGRAMS\PATTERNS\imaginfo.pe3" 2652a2dfb722SXin LI>>&-1 string x "%s" 2653a2dfb722SXin LI# look for DOS/Windows network path if no drive letter part 2654a2dfb722SXin LI>5 default x 2655a2dfb722SXin LI>>5 search/192/s \x5c\x5c 2656a2dfb722SXin LI# full name of corresponding imaginfo.pe3 like: "\\Lionking\upi\SAMPLES\IMAGES\ANIMALS\imaginfo.pe3" 2657a2dfb722SXin LI>>>&0 string x "%s" 2658b6cee71dSXin LI# Type: Ulead Photo Explorer5 (.pe5) 2659a2dfb722SXin LI# URL: http://fileformats.archiveteam.org/wiki/Imageiio/imaginfo_(Ulead) 2660a2dfb722SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe4.trid.xml 2661b6cee71dSXin LI# From: Simon Horman <horms@debian.org> 2662a2dfb722SXin LI# Update: Joerg Jenderek 2663a2dfb722SXin LI# Note: some called "Ulead Imageiio/Imaginfo thumbnail" by TrID 2664a2dfb722SXin LI# and used in various Ulead applications 2665a2dfb722SXin LI0 string IIO2H Ulead Photo Explorer 4 or 5 2666a2dfb722SXin LI#!:mime application/octet-stream 2667a2dfb722SXin LI!:mime image/x-ulead-pe4 2668a2dfb722SXin LI# IMAGEIIO.PE4 2669a2dfb722SXin LI!:ext pe4/pe5 2670a2dfb722SXin LI# look in most samples for JPEG signature like: SAMPLES/IMAGES/SCENES/IMAGINFO.PE4 2671a2dfb722SXin LI>0x4c2 search/0xE02/s JFIF with JPEG image data 2672a2dfb722SXin LI>>&-6 use jpeg 2673a2dfb722SXin LI# near the end list of image names like: Img0001.pcd 1116012L.JPG NCARD4.TPL 2674a2dfb722SXin LI# 2675a2dfb722SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe3-imaginfo.trid.xml 2676a2dfb722SXin LI11 string \001\0\0\0\0 2677a2dfb722SXin LI# check for version 3 part 2678a2dfb722SXin LI>19 string \0\001\0\003\0 2679a2dfb722SXin LI>>0 use ulead-imaginfo 2680a2dfb722SXin LI# From: Joerg Jenderek 2681a2dfb722SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe4-imaginfo.trid.xml 2682a2dfb722SXin LI# check for version 4 part 2683a2dfb722SXin LI>19 string \0\0\0\004\0 2684a2dfb722SXin LI>>0 use ulead-imaginfo 2685a2dfb722SXin LI# display information about Ulead Imaginfo thumbnail (version, directory, image extension) 2686a2dfb722SXin LI0 name ulead-imaginfo 2687a2dfb722SXin LI>22 ubyte x Ulead Imaginfo thumbnail 2688a2dfb722SXin LI#!:mime application/octet-stream 2689a2dfb722SXin LI!:mime image/x-ulead-imaginfo 2690a2dfb722SXin LI>22 ubyte =3 \b, version 3 2691a2dfb722SXin LI# IMAGINFO.PE3 2692a2dfb722SXin LI!:ext pe3 2693a2dfb722SXin LI>22 ubyte =4 \b, version 4 2694a2dfb722SXin LI# IMAGINFO.PE4 2695a2dfb722SXin LI!:ext pe4 2696a2dfb722SXin LI# MAYBE ALSO VERSION 5 ? 2697a2dfb722SXin LI#>22 ubyte =5 \b, version 5 2698a2dfb722SXin LI#!:ext pe5 2699a2dfb722SXin LI>22 ubyte x 2700a2dfb722SXin LI# look for DOS/Windows driver letter 2701a2dfb722SXin LI>>4 search/192/s :\x5c 2702a2dfb722SXin LI# skip f:\Programme\iPhoto Plus 4\Template\Business Cards\IMAGINFO.PE4 2703a2dfb722SXin LI# by looking for driver letter in range A-Z 2704a2dfb722SXin LI>>>&-1 ubyte >0x40 2705a2dfb722SXin LI# directory path like: "E:\iPE\CDSample\Images\Scenes" "D:\XmasCard\Samples" "C:\TEMP\PLANTS" 2706a2dfb722SXin LI>>>>&-5 pstring/l >0 \b, "%s" 2707a2dfb722SXin LI# look for DOS/Windows network path if no valid drive letter part 2708a2dfb722SXin LI>>>&-1 default x 2709a2dfb722SXin LI>>>>4 search/192/s \x5c\x5c 2710a2dfb722SXin LI# directory path like: "\\FSX\SYS\OPPS\IPE.ENG\TEMPLATE\BUSINESS" "\\Lionking\upi\SAMPLES\IMAGES\ANIMALS" 2711a2dfb722SXin LI>>>>>&-4 pstring/l >0 \b, "%s" 2712a2dfb722SXin LI# look for DOS/Windows network path if no drive letter part 2713a2dfb722SXin LI>>4 default x 2714a2dfb722SXin LI>>>4 search/192/s \x5c\x5c 2715a2dfb722SXin LI# directory path like: "\\FSX\SYS\opps\ipe.eng\samples" "\\DANIEL\IPE_CD\IPE.ITA" 2716a2dfb722SXin LI>>>>&-4 pstring/l >0 \b, "%s" 2717a2dfb722SXin LI# look for point character inside image names 2718a2dfb722SXin LI>56 search/38/s . 2719a2dfb722SXin LI# image name extension like: bmp jpg pcd tpl 2720a2dfb722SXin LI>>&1 string x with %-.3s images 2721a2dfb722SXin LI# Summary: Ulead Pattern image (Corel Corporation) 2722a2dfb722SXin LI# URL: https://en.wikipedia.org/wiki/Ulead_Systems 2723a2dfb722SXin LI# https://www.file-extensions.org/pst-file-extension-ulead-pattern-image-format 2724a2dfb722SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pst-ulead.trid.xml 2725a2dfb722SXin LI# From: Joerg Jenderek 2726a2dfb722SXin LI# Note: used also by CorelDraw Essentials 3 version 13.0.0.800 2727a2dfb722SXin LI# there seems to exist other versions 2728a2dfb722SXin LI0 ubelong 0xFFFF0100 2729a2dfb722SXin LI>8 search/21 PresetInfo Ulead pattern image 2730a2dfb722SXin LI#!:mime application/octet-stream 2731a2dfb722SXin LI!:mime image/x-ulead-pst 2732a2dfb722SXin LI!:ext pst 2733a2dfb722SXin LI# string length like: 16 18 19 21 24 2734a2dfb722SXin LI#>>4 uleshort x n=%u 2735a2dfb722SXin LI# like: BlendPresetInfo DropShadowPresetInfo FileNewPresetInfo VectorExtrudePresetInfo EnvelopePresetInfo ContourPresetInfo DistortionPresetInfo 2736a2dfb722SXin LI>>4 pstring/h x "%s" 2737b6cee71dSXin LI 2738b6cee71dSXin LI# Type: X11 cursor 2739b6cee71dSXin LI# URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup 2740b6cee71dSXin LI# From: Mathias Brodala <info@noctus.net> 2741b6cee71dSXin LI0 string Xcur X11 cursor 2742b6cee71dSXin LI 2743b6cee71dSXin LI# Type: Olympus ORF raw images. 274448c779cdSXin LI# URL: https://libopenraw.freedesktop.org/wiki/Olympus_ORF 2745b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 2746b6cee71dSXin LI0 string MMOR Olympus ORF raw image data, big-endian 2747b6cee71dSXin LI!:mime image/x-olympus-orf 2748b6cee71dSXin LI0 string IIRO Olympus ORF raw image data, little-endian 2749b6cee71dSXin LI!:mime image/x-olympus-orf 2750b6cee71dSXin LI0 string IIRS Olympus ORF raw image data, little-endian 2751b6cee71dSXin LI!:mime image/x-olympus-orf 2752b6cee71dSXin LI 2753b6cee71dSXin LI# Type: files used in modern AVCHD camcoders to store clip information 2754b6cee71dSXin LI# Extension: .cpi 2755b6cee71dSXin LI# From: Alexander Danilov <alexander.a.danilov@gmail.com> 2756b6cee71dSXin LI0 string HDMV0100 AVCHD Clip Information 2757b6cee71dSXin LI 2758b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 2759b6cee71dSXin LI# URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ 2760b6cee71dSXin LI# Radiance HDR; usually has .pic or .hdr extension. 2761b6cee71dSXin LI0 string #?RADIANCE\n Radiance HDR image data 2762898496eeSXin LI!:mime image/vnd.radiance 2763b6cee71dSXin LI 2764b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 276548c779cdSXin LI# URL: https://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf 2766b6cee71dSXin LI# Used by the pfstools packages. The regex matches for the image size could 2767b6cee71dSXin LI# probably use some work. The MIME type is made up; if there's one in 2768b6cee71dSXin LI# actual common use, it should replace the one below. 2769b6cee71dSXin LI0 string PFS1\x0a PFS HDR image data 2770b6cee71dSXin LI#!mime image/x-pfs 2771b6cee71dSXin LI>1 regex [0-9]*\ \b, %s 2772b6cee71dSXin LI>>1 regex \ [0-9]{4} \bx%s 2773b6cee71dSXin LI 2774b6cee71dSXin LI# Type: Foveon X3F 277548c779cdSXin LI# URL: https://www.photofo.com/downloads/x3f-raw-format.pdf 2776b6cee71dSXin LI# From: Adam Buchbinder <adam.buchbinder@gmail.com> 2777b6cee71dSXin LI# Note that the MIME type isn't defined anywhere that I can find; if 2778b6cee71dSXin LI# there's a canonical type for this format, it should replace this one. 2779b6cee71dSXin LI0 string FOVb Foveon X3F raw image data 2780b6cee71dSXin LI!:mime image/x-x3f 2781a4d6d3b8SXin LI>6 uleshort x \b, version %d. 2782a4d6d3b8SXin LI>4 uleshort x \b%d 2783a4d6d3b8SXin LI>28 ulelong x \b, %dx 2784a4d6d3b8SXin LI>32 ulelong x \b%d 2785b6cee71dSXin LI 2786b6cee71dSXin LI# Paint.NET file 2787b6cee71dSXin LI# From Adam Buchbinder <adam.buchbinder@gmail.com> 2788b6cee71dSXin LI0 string PDN3 Paint.NET image data 2789b6cee71dSXin LI!:mime image/x-paintnet 2790b6cee71dSXin LI 2791b6cee71dSXin LI# Not really an image. 2792b6cee71dSXin LI# From: "Tano M. Fotang" <mfotang@quanteq.com> 2793b6cee71dSXin LI0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR) 2794b6cee71dSXin LI 279548c779cdSXin LI# doc: https://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip 279648c779cdSXin LI# example: https://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip 2797a4d6d3b8SXin LI90 ubequad 0x574D50484F544F00 JPEG-XR Image 2798a4d6d3b8SXin LI>98 ubyte&0x08 =0x08 \b, hard tiling 2799a4d6d3b8SXin LI>99 ubyte&0x80 =0x80 \b, tiling present 2800a4d6d3b8SXin LI>99 ubyte&0x40 =0x40 \b, codestream present 2801a4d6d3b8SXin LI>99 ubyte&0x38 x \b, spatial xform= 2802a4d6d3b8SXin LI>99 ubyte&0x38 0x00 \bTL 2803a4d6d3b8SXin LI>99 ubyte&0x38 0x08 \bBL 2804a4d6d3b8SXin LI>99 ubyte&0x38 0x10 \bTR 2805a4d6d3b8SXin LI>99 ubyte&0x38 0x18 \bBR 2806a4d6d3b8SXin LI>99 ubyte&0x38 0x20 \bBT 2807a4d6d3b8SXin LI>99 ubyte&0x38 0x28 \bRB 2808a4d6d3b8SXin LI>99 ubyte&0x38 0x30 \bLT 2809a4d6d3b8SXin LI>99 ubyte&0x38 0x38 \bLB 2810a4d6d3b8SXin LI>100 ubyte&0x80 =0x80 \b, short header 2811a4d6d3b8SXin LI>>102 ubeshort+1 x \b, %d 2812a4d6d3b8SXin LI>>104 ubeshort+1 x \bx%d 2813a4d6d3b8SXin LI>100 ubyte&0x80 =0x00 \b, long header 2814a4d6d3b8SXin LI>>102 ubelong+1 x \b, %x 2815a4d6d3b8SXin LI>>106 ubelong+1 x \bx%x 2816a4d6d3b8SXin LI>101 ubeshort&0xf x \b, bitdepth= 2817a4d6d3b8SXin LI>>101 ubeshort&0xf 0x0 \b1-WHITE=1 2818a4d6d3b8SXin LI>>101 ubeshort&0xf 0x1 \b8 2819a4d6d3b8SXin LI>>101 ubeshort&0xf 0x2 \b16 2820a4d6d3b8SXin LI>>101 ubeshort&0xf 0x3 \b16-SIGNED 2821a4d6d3b8SXin LI>>101 ubeshort&0xf 0x4 \b16-FLOAT 2822a4d6d3b8SXin LI>>101 ubeshort&0xf 0x5 \b(reserved 5) 2823a4d6d3b8SXin LI>>101 ubeshort&0xf 0x6 \b32-SIGNED 2824a4d6d3b8SXin LI>>101 ubeshort&0xf 0x7 \b32-FLOAT 2825a4d6d3b8SXin LI>>101 ubeshort&0xf 0x8 \b5 2826a4d6d3b8SXin LI>>101 ubeshort&0xf 0x9 \b10 2827a4d6d3b8SXin LI>>101 ubeshort&0xf 0xa \b5-6-5 2828a4d6d3b8SXin LI>>101 ubeshort&0xf 0xb \b(reserved %d) 2829a4d6d3b8SXin LI>>101 ubeshort&0xf 0xc \b(reserved %d) 2830a4d6d3b8SXin LI>>101 ubeshort&0xf 0xd \b(reserved %d) 2831a4d6d3b8SXin LI>>101 ubeshort&0xf 0xe \b(reserved %d) 2832a4d6d3b8SXin LI>>101 ubeshort&0xf 0xf \b1-BLACK=1 2833a4d6d3b8SXin LI>101 ubeshort&0xf0 x \b, colorfmt= 2834a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x00 \bYONLY 2835a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x10 \bYUV240 2836a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x20 \bYWV422 2837a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x30 \bYWV444 2838a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x40 \bCMYK 2839a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x50 \bCMYKDIRECT 2840a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x60 \bNCOMPONENT 2841a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x70 \bRGB 2842a4d6d3b8SXin LI>>101 ubeshort&0xf0 0x80 \bRGBE 2843a4d6d3b8SXin LI>>101 ubeshort&0xf0 >0x80 \b(reserved %#x) 2844c2931133SXin LI 2845c2931133SXin LI# From: Johan van der Knijff <johan.vanderknijff@kb.nl> 2846c2931133SXin LI# 2847c2931133SXin LI# BPG (Better Portable Graphics) format 284848c779cdSXin LI# https://bellard.org/bpg/ 2849c2931133SXin LI# http://fileformats.archiveteam.org/wiki/BPG 2850c2931133SXin LI# 2851c2931133SXin LI0 string \x42\x50\x47\xFB BPG (Better Portable Graphics) 2852c2931133SXin LI!:mime image/bpg 28533e41d09dSXin LI 28543e41d09dSXin LI# From: Joerg Jenderek 28553e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/Apple_Icon_Image_format 28563e41d09dSXin LI0 string icns Mac OS X icon 28573e41d09dSXin LI!:mime image/x-icns 28583e41d09dSXin LI!:apple ????icns 28593e41d09dSXin LI!:ext icns 28603e41d09dSXin LI>4 ubelong >0 28613e41d09dSXin LI# file size 28623e41d09dSXin LI>>4 ubelong x \b, %d bytes 28633e41d09dSXin LI# icon type 28643e41d09dSXin LI>>8 string x \b, "%4.4s" type 28653e41d09dSXin LI 28663e41d09dSXin LI# TIM images 286743a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/TIM_(PlayStation_graphics) 286843a5ec4eSXin LI# Reference: https://mrclick.zophar.net/TilEd/download/timgfx.txt 286943a5ec4eSXin LI# Update: Joerg Jenderek 287043a5ec4eSXin LI# Note: called as "PSX TIM *bpp bitmap" by bitmap-tim-*.trid.xml 287143a5ec4eSXin LI# verified as "TIM PSX" by XnView `nconvert -fullinfo *.tim` and 287243a5ec4eSXin LI# by RECOIL `recoil2png -o TMP.PNG input.tim; file TMP.PNG` and often 287343a5ec4eSXin LI# as "PSX TIM" by ImageMagick version 7.1.0-10 command `identify *.tim` 287443a5ec4eSXin LI# here signed integers are used but according to Kaitai unsigned 2875a4d6d3b8SXin LI0 ulelong 0x00000010 287643a5ec4eSXin LI# 32 Flag bits *cttt; c~CLUT flag t~type 000~4BPP 001~8BPP 010~16BPP 011~24BPP 100~Mixed 2877a4d6d3b8SXin LI#>4 ulelong x FLAGS=%#x 287843a5ec4eSXin LI# 12+Size of CLUT (2Ch for 4BPP; 20Ch 40Ch 60Ch 80Ch C0Ch for 8BPP) or 287943a5ec4eSXin LI# +image data size (800Ch 2000Ch 2580C for 16BPP) (02000003h for dBase memo test.dbt) 2880a4d6d3b8SXin LI#>8 ulelong x \b, 12+CLUT or data size=%#8.8x 288143a5ec4eSXin LI# CLUT or data size remainder is 12 (Ch), but 03 for dBase memo test.dbt 288243a5ec4eSXin LI#>8 ubyte&0x0F =0x0C \b, SIZE REMAINDER IS 12 288343a5ec4eSXin LI# skip dBase III memo test.dbt with invalid flags 22D10189h 2884a4d6d3b8SXin LI>4 ulelong&0xffFFffF0 =0 Sony PlayStation PSX image, 288543a5ec4eSXin LI# file (version 5.40) labeled the above entry as "TIM image" 288643a5ec4eSXin LI!:mime image/x-sony-tim 288743a5ec4eSXin LI!:ext tim 2888a4d6d3b8SXin LI#>>4 ulelong&0x00000007 x \b, BPP~%u 288943a5ec4eSXin LI# 4BPP and 8BPP examples exist with CLUT or without CLUT 2890a4d6d3b8SXin LI>>4 ulelong&0x07 0x0 4-Bit, 2891a4d6d3b8SXin LI>>4 ulelong&0x07 0x1 8-Bit, 289243a5ec4eSXin LI# 16BPP and 24BPP examples have no CLUT 2893a4d6d3b8SXin LI>>4 ulelong 0x2 15-Bit, 2894a4d6d3b8SXin LI>>4 ulelong 0x3 24-Bit, 289543a5ec4eSXin LI# no example 2896a4d6d3b8SXin LI>>4 ulelong&0x07 0x4 Mixed-Bit, 289743a5ec4eSXin LI# CLUT flag set 2898a4d6d3b8SXin LI>>4 ulelong &8 289943a5ec4eSXin LI# 12 + size of CLUT like: 1000Ch 800Ch 400Ch 40Ch and 2FEh (KAGE.TIM) 2900a4d6d3b8SXin LI#>>>(8.l+8) ulelong x \b, 12+CLUT SIZE=%#8.8x 2901a4d6d3b8SXin LI>>>(8.l+12) uleshort x Pixel at (%d, 2902a4d6d3b8SXin LI>>>(8.l+14) uleshort x \b%d) Size= 290343a5ec4eSXin LI# image width (to get actual width multiply by 4 for 4BPP and by 2 for 8BPP) 2904a4d6d3b8SXin LI>>>>4 ulelong 0x8 2905a4d6d3b8SXin LI>>>>>(8.l+16) uleshort*4 x \b%d 2906a4d6d3b8SXin LI>>>>4 ulelong 0x9 2907a4d6d3b8SXin LI>>>>>(8.l+16) uleshort*2 x \b%d 290843a5ec4eSXin LI# image height like: 32 64 128 144 160 208 256 2909a4d6d3b8SXin LI>>>(8.l+18) uleshort x \bx%d, 2910a4d6d3b8SXin LI>>>4 ulelong 0x8 16 CLUT Entries at 2911a4d6d3b8SXin LI>>>4 ulelong 0x9 256 CLUT Entries at 2912a4d6d3b8SXin LI>>>12 uleshort x (%d, 2913a4d6d3b8SXin LI>>>14 uleshort x \b%d) 291443a5ec4eSXin LI# no Color LookUp Table (CLUT) 2915a4d6d3b8SXin LI>>4 ulelong ^8 2916a4d6d3b8SXin LI# image origin X Y 2917a4d6d3b8SXin LI>>>12 uleshort x Pixel at (%d, 2918a4d6d3b8SXin LI>>>14 uleshort x \b%d) Size= 291943a5ec4eSXin LI# real image width = multiply by 4 (4BPP) 2 (8BPP) 1 (16BPP) 2/3 (24BPP) 2920a4d6d3b8SXin LI>>>>4 ulelong 0x0 2921a4d6d3b8SXin LI>>>>>16 uleshort*4 x \b%d 2922a4d6d3b8SXin LI>>>>4 ulelong 0x1 2923a4d6d3b8SXin LI>>>>>16 uleshort*2 x \b%d 2924a4d6d3b8SXin LI>>>>4 ulelong 0x2 2925a4d6d3b8SXin LI>>>>>16 uleshort x \b%d 2926a4d6d3b8SXin LI>>>>4 ulelong 0x3 292743a5ec4eSXin LI# GRR: NOT working 2928a4d6d3b8SXin LI#>>>>>16 uleshort*2/3 x \b%d 2929a4d6d3b8SXin LI>>>>>16 uleshort x \b2/3*%d 293043a5ec4eSXin LI# mixed format width not explained! 2931a4d6d3b8SXin LI>>>>4 ulelong 0x4 2932a4d6d3b8SXin LI>>>>>16 uleshort x \b%d 293343a5ec4eSXin LI# image height like: 64 240 256 2934a4d6d3b8SXin LI>>>18 uleshort x \bx%d 293543a5ec4eSXin LI# TIM image data 29363e41d09dSXin LI 29373e41d09dSXin LI# MDEC streams 2938a4d6d3b8SXin LI0 ulelong 0x80010160 MDEC video stream, 2939a4d6d3b8SXin LI>16 uleshort x %dx 2940a4d6d3b8SXin LI>18 uleshort x \b%d 2941a4d6d3b8SXin LI#>8 ulelong x %d frames 2942a4d6d3b8SXin LI#>4 uleshort x secCount=%d; 2943a4d6d3b8SXin LI#>6 uleshort x nSectors=%d; 2944a4d6d3b8SXin LI#>12 ulelong x frameSize=%d; 29453e41d09dSXin LI 29463e41d09dSXin LI# BS encoded bitstreams 2947a4d6d3b8SXin LI2 uleshort 0x3800 BS image, 2948898496eeSXin LI# GRR: the above line is also true for binary Computer Graphics Metafile SAB00012.CGM with long parameter length 56 (=38h) 2949a4d6d3b8SXin LI>6 uleshort x Version %d, 2950a4d6d3b8SXin LI>4 uleshort x Quantization %d, 2951a4d6d3b8SXin LI>0 uleshort x (Decompresses to %d words) 29523e41d09dSXin LI 29533e41d09dSXin LI# Type: farbfeld image. 29543e41d09dSXin LI# Url: http://tools.suckless.org/farbfeld/ 29553e41d09dSXin LI# From: Ian D. Scott <ian@iandouglasscott.com> 29563e41d09dSXin LI# 29573e41d09dSXin LI0 string farbfeld farbfeld image data, 29583e41d09dSXin LI>8 ubelong x %dx 29593e41d09dSXin LI>12 ubelong x \b%d 29603e41d09dSXin LI 2961a4d6d3b8SXin LI# Type: Microsoft DirectDraw Surface (DXGI formats) 2962a4d6d3b8SXin LI# URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp 2963a4d6d3b8SXin LI# From: Morten Hustveit <morten@debian.org> 2964a4d6d3b8SXin LI# Updated by: David Korth <gerbilsoft@gerbilsoft.com> 2965a4d6d3b8SXin LI0 name ms-directdraw-dx10 2966a4d6d3b8SXin LI>0 ulelong x \b, DXGI format: 2967a4d6d3b8SXin LI>0 ulelong 1 R32G32B32A32_TYPELESS 2968a4d6d3b8SXin LI>0 ulelong 2 R32G32B32A32_FLOAT 2969a4d6d3b8SXin LI>0 ulelong 3 R32G32B32A32_UINT 2970a4d6d3b8SXin LI>0 ulelong 4 R32G32B32A32_SINT 2971a4d6d3b8SXin LI>0 ulelong 5 R32G32B32_TYPELESS 2972a4d6d3b8SXin LI>0 ulelong 6 R32G32B32_FLOAT 2973a4d6d3b8SXin LI>0 ulelong 7 R32G32B32_UINT 2974a4d6d3b8SXin LI>0 ulelong 8 R32G32B32_SINT 2975a4d6d3b8SXin LI>0 ulelong 9 R16G16B16A16_TYPELESS 2976a4d6d3b8SXin LI>0 ulelong 10 R16G16B16A16_FLOAT 2977a4d6d3b8SXin LI>0 ulelong 11 R16G16B16A16_UNORM 2978a4d6d3b8SXin LI>0 ulelong 12 R16G16B16A16_UINT 2979a4d6d3b8SXin LI>0 ulelong 13 R16G16B16A16_SNORM 2980a4d6d3b8SXin LI>0 ulelong 14 R16G16B16A16_SINT 2981a4d6d3b8SXin LI>0 ulelong 15 R32G32_TYPELESS 2982a4d6d3b8SXin LI>0 ulelong 16 R32G32_FLOAT 2983a4d6d3b8SXin LI>0 ulelong 17 R32G32_UINT 2984a4d6d3b8SXin LI>0 ulelong 18 R32G32_SINT 2985a4d6d3b8SXin LI>0 ulelong 19 R32G8X24_TYPELESS 2986a4d6d3b8SXin LI>0 ulelong 20 D32_FLOAT_S8X24_UINT 2987a4d6d3b8SXin LI>0 ulelong 21 R32_FLOAT_X8X24_TYPELESS 2988a4d6d3b8SXin LI>0 ulelong 22 X32_TYPELESS_G8X24_UINT 2989a4d6d3b8SXin LI>0 ulelong 23 R10G10B10A2_TYPELESS 2990a4d6d3b8SXin LI>0 ulelong 24 R10G10B10A2_UNORM 2991a4d6d3b8SXin LI>0 ulelong 25 R10G10B10A2_UINT 2992a4d6d3b8SXin LI>0 ulelong 26 R11G11B10_FLOAT 2993a4d6d3b8SXin LI>0 ulelong 27 R8G8B8A8_TYPELESS 2994a4d6d3b8SXin LI>0 ulelong 28 R8G8B8A8_UNORM 2995a4d6d3b8SXin LI>0 ulelong 29 R8G8B8A8_UNORM_SRGB 2996a4d6d3b8SXin LI>0 ulelong 30 R8G8B8A8_UINT 2997a4d6d3b8SXin LI>0 ulelong 31 R8G8B8A8_SNORM 2998a4d6d3b8SXin LI>0 ulelong 32 R8G8B8A8_SINT 2999a4d6d3b8SXin LI>0 ulelong 33 R16G16_TYPELESS 3000a4d6d3b8SXin LI>0 ulelong 34 R16G16_FLOAT 3001a4d6d3b8SXin LI>0 ulelong 35 R16G16_UNORM 3002a4d6d3b8SXin LI>0 ulelong 36 R16G16_UINT 3003a4d6d3b8SXin LI>0 ulelong 37 R16G16_SNORM 3004a4d6d3b8SXin LI>0 ulelong 38 R16G16_SINT 3005a4d6d3b8SXin LI>0 ulelong 39 R32_TYPELESS 3006a4d6d3b8SXin LI>0 ulelong 40 D32_FLOAT 3007a4d6d3b8SXin LI>0 ulelong 41 R32_FLOAT 3008a4d6d3b8SXin LI>0 ulelong 42 R32_UINT 3009a4d6d3b8SXin LI>0 ulelong 43 R32_SINT 3010a4d6d3b8SXin LI>0 ulelong 44 R24G8_TYPELESS 3011a4d6d3b8SXin LI>0 ulelong 45 D24_UNORM_S8_UINT 3012a4d6d3b8SXin LI>0 ulelong 46 R24_UNORM_X8_TYPELESS 3013a4d6d3b8SXin LI>0 ulelong 47 X24_TYPELESS_G8_UINT 3014a4d6d3b8SXin LI>0 ulelong 48 R8G8_TYPELESS 3015a4d6d3b8SXin LI>0 ulelong 49 R8G8_UNORM 3016a4d6d3b8SXin LI>0 ulelong 50 R8G8_UINT 3017a4d6d3b8SXin LI>0 ulelong 51 R8G8_SNORM 3018a4d6d3b8SXin LI>0 ulelong 52 R8G8_SINT 3019a4d6d3b8SXin LI>0 ulelong 53 R16_TYPELESS 3020a4d6d3b8SXin LI>0 ulelong 54 R16_FLOAT 3021a4d6d3b8SXin LI>0 ulelong 55 D16_UNORM 3022a4d6d3b8SXin LI>0 ulelong 56 R16_UNORM 3023a4d6d3b8SXin LI>0 ulelong 57 R16_UINT 3024a4d6d3b8SXin LI>0 ulelong 58 R16_SNORM 3025a4d6d3b8SXin LI>0 ulelong 59 R16_SINT 3026a4d6d3b8SXin LI>0 ulelong 60 R8_TYPELESS 3027a4d6d3b8SXin LI>0 ulelong 61 R8_UNORM 3028a4d6d3b8SXin LI>0 ulelong 62 R8_UINT 3029a4d6d3b8SXin LI>0 ulelong 63 R8_SNORM 3030a4d6d3b8SXin LI>0 ulelong 64 R8_SINT 3031a4d6d3b8SXin LI>0 ulelong 65 A8_UNORM 3032a4d6d3b8SXin LI>0 ulelong 66 R1_UNORM 3033a4d6d3b8SXin LI>0 ulelong 67 R9G9B9E5_SHAREDEXP 3034a4d6d3b8SXin LI>0 ulelong 68 R8G8_B8G8_UNORM 3035a4d6d3b8SXin LI>0 ulelong 69 G8R8_G8B8_UNORM 3036a4d6d3b8SXin LI>0 ulelong 70 BC1_TYPELESS 3037a4d6d3b8SXin LI>0 ulelong 71 BC1_UNORM 3038a4d6d3b8SXin LI>0 ulelong 72 BC1_UNORM_SRGB 3039a4d6d3b8SXin LI>0 ulelong 73 BC2_TYPELESS 3040a4d6d3b8SXin LI>0 ulelong 74 BC2_UNORM 3041a4d6d3b8SXin LI>0 ulelong 75 BC2_UNORM_SRGB 3042a4d6d3b8SXin LI>0 ulelong 76 BC3_TYPELESS 3043a4d6d3b8SXin LI>0 ulelong 77 BC3_UNORM 3044a4d6d3b8SXin LI>0 ulelong 78 BC3_UNORM_SRGB 3045a4d6d3b8SXin LI>0 ulelong 79 BC4_TYPELESS 3046a4d6d3b8SXin LI>0 ulelong 80 BC4_UNORM 3047a4d6d3b8SXin LI>0 ulelong 81 BC4_SNORM 3048a4d6d3b8SXin LI>0 ulelong 82 BC5_TYPELESS 3049a4d6d3b8SXin LI>0 ulelong 83 BC5_UNORM 3050a4d6d3b8SXin LI>0 ulelong 84 BC5_SNORM 3051a4d6d3b8SXin LI>0 ulelong 85 B5G6R5_UNORM 3052a4d6d3b8SXin LI>0 ulelong 86 B5G5R5A1_UNORM 3053a4d6d3b8SXin LI>0 ulelong 87 B8G8R8A8_UNORM 3054a4d6d3b8SXin LI>0 ulelong 88 B8G8R8X8_UNORM 3055a4d6d3b8SXin LI>0 ulelong 89 R10G10B10_XR_BIAS_A2_UNORM 3056a4d6d3b8SXin LI>0 ulelong 90 B8G8R8A8_TYPELESS 3057a4d6d3b8SXin LI>0 ulelong 91 B8G8R8A8_UNORM_SRGB 3058a4d6d3b8SXin LI>0 ulelong 92 B8G8R8X8_TYPELESS 3059a4d6d3b8SXin LI>0 ulelong 93 B8G8R8X8_UNORM_SRGB 3060a4d6d3b8SXin LI>0 ulelong 94 BC6H_TYPELESS 3061a4d6d3b8SXin LI>0 ulelong 95 BC6H_UF16 3062a4d6d3b8SXin LI>0 ulelong 96 BC6H_SF16 3063a4d6d3b8SXin LI>0 ulelong 97 BC7_TYPELESS 3064a4d6d3b8SXin LI>0 ulelong 98 BC7_UNORM 3065a4d6d3b8SXin LI>0 ulelong 99 BC7_UNORM_SRGB 3066a4d6d3b8SXin LI>0 ulelong 100 AYUV 3067a4d6d3b8SXin LI>0 ulelong 101 Y410 3068a4d6d3b8SXin LI>0 ulelong 102 Y416 3069a4d6d3b8SXin LI>0 ulelong 103 NV12 3070a4d6d3b8SXin LI>0 ulelong 104 P010 3071a4d6d3b8SXin LI>0 ulelong 105 P016 3072a4d6d3b8SXin LI>0 ulelong 106 420_OPAQUE 3073a4d6d3b8SXin LI>0 ulelong 107 YUY2 3074a4d6d3b8SXin LI>0 ulelong 108 Y210 3075a4d6d3b8SXin LI>0 ulelong 109 Y216 3076a4d6d3b8SXin LI>0 ulelong 110 NV11 3077a4d6d3b8SXin LI>0 ulelong 111 AI44 3078a4d6d3b8SXin LI>0 ulelong 112 IA44 3079a4d6d3b8SXin LI>0 ulelong 113 P8 3080a4d6d3b8SXin LI>0 ulelong 114 A8P8 3081a4d6d3b8SXin LI>0 ulelong 115 B4G4R4A4_UNORM 3082a4d6d3b8SXin LI 3083a4d6d3b8SXin LI>0 ulelong 116 XBOX_R10G10B10_7E3_A2_FLOAT 3084a4d6d3b8SXin LI>0 ulelong 117 XBOX_R10G10B10_6E4_A2_FLOAT 3085a4d6d3b8SXin LI>0 ulelong 118 XBOX_D16_UNORM_S8_UINT 3086a4d6d3b8SXin LI>0 ulelong 119 XBOX_R16_UNORM_X8_TYPELESS 3087a4d6d3b8SXin LI>0 ulelong 120 XBOX_X16_TYPELESS_G8_UINT 3088a4d6d3b8SXin LI 3089a4d6d3b8SXin LI>0 ulelong 130 DXGI_FORMAT_P208 3090a4d6d3b8SXin LI>0 ulelong 131 DXGI_FORMAT_V208 3091a4d6d3b8SXin LI>0 ulelong 132 DXGI_FORMAT_V408 3092a4d6d3b8SXin LI 3093a4d6d3b8SXin LI>0 ulelong 133 ASTC_4X4_TYPELESS 3094a4d6d3b8SXin LI>0 ulelong 134 ASTC_4X4_UNORM 3095a4d6d3b8SXin LI>0 ulelong 135 ASTC_4X4_UNORM_SRGB 3096a4d6d3b8SXin LI>0 ulelong 137 ASTC_5X4_TYPELESS 3097a4d6d3b8SXin LI>0 ulelong 138 ASTC_5X4_UNORM 3098a4d6d3b8SXin LI>0 ulelong 139 ASTC_5X4_UNORM_SRGB 3099a4d6d3b8SXin LI>0 ulelong 141 ASTC_5X5_TYPELESS 3100a4d6d3b8SXin LI>0 ulelong 142 ASTC_5X5_UNORM 3101a4d6d3b8SXin LI>0 ulelong 143 ASTC_5X5_UNORM_SRGB 3102a4d6d3b8SXin LI>0 ulelong 145 ASTC_6X5_TYPELESS 3103a4d6d3b8SXin LI>0 ulelong 146 ASTC_6X5_UNORM 3104a4d6d3b8SXin LI>0 ulelong 147 ASTC_6X5_UNORM_SRGB 3105a4d6d3b8SXin LI>0 ulelong 149 ASTC_6X6_TYPELESS 3106a4d6d3b8SXin LI>0 ulelong 150 ASTC_6X6_UNORM 3107a4d6d3b8SXin LI>0 ulelong 151 ASTC_6X6_UNORM_SRGB 3108a4d6d3b8SXin LI>0 ulelong 153 ASTC_8X5_TYPELESS 3109a4d6d3b8SXin LI>0 ulelong 154 ASTC_8X5_UNORM 3110a4d6d3b8SXin LI>0 ulelong 155 ASTC_8X5_UNORM_SRGB 3111a4d6d3b8SXin LI>0 ulelong 157 ASTC_8X6_TYPELESS 3112a4d6d3b8SXin LI>0 ulelong 158 ASTC_8X6_UNORM 3113a4d6d3b8SXin LI>0 ulelong 159 ASTC_8X6_UNORM_SRGB 3114a4d6d3b8SXin LI>0 ulelong 161 ASTC_8X8_TYPELESS 3115a4d6d3b8SXin LI>0 ulelong 162 ASTC_8X8_UNORM 3116a4d6d3b8SXin LI>0 ulelong 163 ASTC_8X8_UNORM_SRGB 3117a4d6d3b8SXin LI>0 ulelong 165 ASTC_10X5_TYPELESS 3118a4d6d3b8SXin LI>0 ulelong 166 ASTC_10X5_UNORM 3119a4d6d3b8SXin LI>0 ulelong 167 ASTC_10X5_UNORM_SRGB 3120a4d6d3b8SXin LI>0 ulelong 169 ASTC_10X6_TYPELESS 3121a4d6d3b8SXin LI>0 ulelong 170 ASTC_10X6_UNORM 3122a4d6d3b8SXin LI>0 ulelong 171 ASTC_10X6_UNORM_SRGB 3123a4d6d3b8SXin LI>0 ulelong 173 ASTC_10X8_TYPELESS 3124a4d6d3b8SXin LI>0 ulelong 174 ASTC_10X8_UNORM 3125a4d6d3b8SXin LI>0 ulelong 175 ASTC_10X8_UNORM_SRGB 3126a4d6d3b8SXin LI>0 ulelong 177 ASTC_10X10_TYPELESS 3127a4d6d3b8SXin LI>0 ulelong 178 ASTC_10X10_UNORM 3128a4d6d3b8SXin LI>0 ulelong 179 ASTC_10X10_UNORM_SRGB 3129a4d6d3b8SXin LI>0 ulelong 181 ASTC_12X10_TYPELESS 3130a4d6d3b8SXin LI>0 ulelong 182 ASTC_12X10_UNORM 3131a4d6d3b8SXin LI>0 ulelong 183 ASTC_12X10_UNORM_SRGB 3132a4d6d3b8SXin LI>0 ulelong 185 ASTC_12X12_TYPELESS 3133a4d6d3b8SXin LI>0 ulelong 186 ASTC_12X12_UNORM 3134a4d6d3b8SXin LI>0 ulelong 187 ASTC_12X12_UNORM_SRGB 3135a4d6d3b8SXin LI 3136a4d6d3b8SXin LI>0 ulelong 190 XBOX_R10G10B10_SNORM_A2_UNORM 3137a4d6d3b8SXin LI>0 ulelong 189 XBOX_R4G4_UNORM 3138a4d6d3b8SXin LI>0 ulelong 0xFFFFFFFF DXGI_FORMAT_FORCE_UINT 3139a4d6d3b8SXin LI 31402dc4dbb9SEitan Adler# Type: Microsoft DirectDraw Surface (common data) 314148c779cdSXin LI# URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp 31422dc4dbb9SEitan Adler# From: Morten Hustveit <morten@debian.org> 31432dc4dbb9SEitan Adler# Updated by: David Korth <gerbilsoft@gerbilsoft.com> 31442dc4dbb9SEitan Adler0 name ms-directdraw-surface 31452dc4dbb9SEitan Adler>0x10 ulelong x %u x 31462dc4dbb9SEitan Adler>0x0C ulelong x %u 31472dc4dbb9SEitan Adler# Color depth. 31482dc4dbb9SEitan Adler>0x58 ulelong >0 \b, %u-bit color 31492dc4dbb9SEitan Adler# Determine the pixel format. 31502dc4dbb9SEitan Adler>0x50 ulelong&0x4 4 31512dc4dbb9SEitan Adler# FIXME: Handle DX10 and XBOX formats. 3152a4d6d3b8SXin LI>>0x54 string DX10 3153a4d6d3b8SXin LI>>>0x80 use ms-directdraw-dx10 3154*ae316d1dSXin LI>>0x54 string !DX10 3155*ae316d1dSXin LI>>>0x54 string x \b, compressed using %.4s 31562dc4dbb9SEitan Adler>0x50 ulelong&0x2 0x2 \b, alpha only 31572dc4dbb9SEitan Adler>0x50 ulelong&0x200 0x200 \b, YUV 31582dc4dbb9SEitan Adler>0x50 ulelong&0x20000 0x20000 \b, luminance 31592dc4dbb9SEitan Adler# RGB pixel format 31602dc4dbb9SEitan Adler>0x50 ulelong&0x40 0x40 31612dc4dbb9SEitan Adler 31622dc4dbb9SEitan Adler# Determine the RGB format using the color masks. 31632dc4dbb9SEitan Adler# ulequad order: 0xGGGGGGGGRRRRRRRR, 0xAAAAAAAABBBBBBBB 31642dc4dbb9SEitan Adler 31652dc4dbb9SEitan Adler>>0x58 ulelong 16 31662dc4dbb9SEitan Adler 31672dc4dbb9SEitan Adler# NOTE: 15-bit color formats usually have 16-bit listed as the color depth. 31682dc4dbb9SEitan Adler>>>0x5C ulequad 0x000003E000007C00 31692dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000000000001F \b, RGB555 31702dc4dbb9SEitan Adler>>>0x5C ulequad 0x000003E000001F00 31712dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000000000007C \b, BGR555 31722dc4dbb9SEitan Adler 31732dc4dbb9SEitan Adler>>>0x5C ulequad 0x000007E00000F800 31742dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000000000001F \b, RGB565 31752dc4dbb9SEitan Adler>>>0x5C ulequad 0x000007E000001F00 31762dc4dbb9SEitan Adler>>>>0x64 ulequad 0x00000000000000F8 \b, BGR565 31772dc4dbb9SEitan Adler 31782dc4dbb9SEitan Adler>>>0x5C ulequad 0x000000F000000F00 31792dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000F0000000000F \b, ARGB4444 31802dc4dbb9SEitan Adler>>>0x5C ulequad 0x000000F00000000F 31812dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000F00000000F00 \b, ABGR4444 31822dc4dbb9SEitan Adler 31832dc4dbb9SEitan Adler>>>0x5C ulequad 0x00000F000000F000 31842dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000F000000F0 \b, RGBA4444 31852dc4dbb9SEitan Adler>>>0x5C ulequad 0x00000F00000000F0 31862dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000F0000F000 \b, BGRA4444 31872dc4dbb9SEitan Adler 31882dc4dbb9SEitan Adler>>>0x5C ulequad 0x000000F000000F00 31892dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000000000000F \b, xRGB4444 31902dc4dbb9SEitan Adler>>>0x5C ulequad 0x000000F00000000F 31912dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000000000F00 \b, xBGR4444 31922dc4dbb9SEitan Adler 31932dc4dbb9SEitan Adler>>>0x5C ulequad 0x00000F000000F000 31942dc4dbb9SEitan Adler>>>>0x64 ulequad 0x00000000000000F0 \b, RGBx4444 31952dc4dbb9SEitan Adler>>>0x5C ulequad 0x00000F00000000F0 31962dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000000000F000 \b, BGRx4444 31972dc4dbb9SEitan Adler 31982dc4dbb9SEitan Adler>>>0x5C ulequad 0x000003E000007C00 31992dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000080000000001F \b, ARGB1555 32002dc4dbb9SEitan Adler>>>0x5C ulequad 0x000003E000001F00 32012dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000080000000007C \b, ABGR1555 32022dc4dbb9SEitan Adler>>>0x5C ulequad 0x000007C00000F800 32032dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000010000003E \b, RGBA5551 32042dc4dbb9SEitan Adler>>>0x5C ulequad 0x000007C00000003E 32052dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000010000F800 \b, BGRA5551 32062dc4dbb9SEitan Adler 32072dc4dbb9SEitan Adler>>88 ulelong 24 32082dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FF0000FF0000 32092dc4dbb9SEitan Adler>>>>0x64 ulequad 0x00000000000000FF \b, RGB888 32102dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FF00000000FF 32112dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000000FF0000 \b, BGR888 32122dc4dbb9SEitan Adler 32132dc4dbb9SEitan Adler>>88 ulelong 32 32142dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FF0000FF0000 32152dc4dbb9SEitan Adler>>>>0x64 ulequad 0xFF000000000000FF \b, ARGB8888 32162dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FF00000000FF 32172dc4dbb9SEitan Adler>>>>0x64 ulequad 0xFF00000000FF0000 \b, ABGR8888 32182dc4dbb9SEitan Adler 32192dc4dbb9SEitan Adler>>>0x5C ulequad 0x00FF0000FF000000 32202dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000FF0000FF00 \b, RGBA8888 32212dc4dbb9SEitan Adler>>>0x5C ulequad 0x00FF00000000FF00 32222dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000FFFF000000 \b, BGBA8888 32232dc4dbb9SEitan Adler 32242dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FF0000FF0000 32252dc4dbb9SEitan Adler>>>>0x64 ulequad 0x00000000000000FF \b, xRGB8888 32262dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FF00000000FF 32272dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000000FF0000 \b, xBGR8888 32282dc4dbb9SEitan Adler 32292dc4dbb9SEitan Adler>>>0x5C ulequad 0x00FF0000FF000000 32302dc4dbb9SEitan Adler>>>>0x64 ulequad 0x000000000000FF00 \b, RGBx8888 32312dc4dbb9SEitan Adler>>>0x5C ulequad 0x00FF00000000FF00 32322dc4dbb9SEitan Adler>>>>0x64 ulequad 0x00000000FF000000 \b, BGBx8888 32332dc4dbb9SEitan Adler 32342dc4dbb9SEitan Adler# Less common 32-bit color formats. 32352dc4dbb9SEitan Adler>>>0x5C ulequad 0xFFFF00000000FFFF 32362dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000000000000 \b, G16R16 32372dc4dbb9SEitan Adler>>>0x5C ulequad 0x0000FFFFFFFF0000 32382dc4dbb9SEitan Adler>>>>0x64 ulequad 0x0000000000000000 \b, R16G16 32392dc4dbb9SEitan Adler 32402dc4dbb9SEitan Adler>>>0x5C ulequad 0x000FFC003FF00000 32412dc4dbb9SEitan Adler>>>>0x64 ulequad 0xC0000000000003FF \b, A2R10G10B10 32422dc4dbb9SEitan Adler>>>0x5C ulequad 0x000FFC00000003FF 32432dc4dbb9SEitan Adler>>>>0x64 ulequad 0xC00000003FF00000 \b, A2B10G10R10 32442dc4dbb9SEitan Adler 32452dc4dbb9SEitan Adler# Type: Microsoft DirectDraw Surface 324648c779cdSXin LI# URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp 32472dc4dbb9SEitan Adler# From: Morten Hustveit <morten@debian.org> 32482dc4dbb9SEitan Adler# Updated by: David Korth <gerbilsoft@gerbilsoft.com> 32492dc4dbb9SEitan Adler0 string/b DDS\040\174\000\000\000 Microsoft DirectDraw Surface (DDS): 32502dc4dbb9SEitan Adler>0 use ms-directdraw-surface 32512dc4dbb9SEitan Adler 32523e41d09dSXin LI# Type: Sega PVR image. 32533e41d09dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 32543e41d09dSXin LI# References: 325548c779cdSXin LI# - https://fabiensanglard.net/Mykaruga/tools/segaPVRFormat.txt 32563e41d09dSXin LI# - https://github.com/yazgoo/pvrx2png 32573e41d09dSXin LI# - https://github.com/nickworonekin/puyotools 32583e41d09dSXin LI 32593e41d09dSXin LI# Sega PVR header. 32603e41d09dSXin LI0 name sega-pvr-image-header 3261a4d6d3b8SXin LI>0x0C uleshort x %u x 3262a4d6d3b8SXin LI>0x0E uleshort x %u 32633e41d09dSXin LI# Image format. 3264a4d6d3b8SXin LI>0x08 ubyte 0 \b, ARGB1555 3265a4d6d3b8SXin LI>0x08 ubyte 1 \b, RGB565 3266a4d6d3b8SXin LI>0x08 ubyte 2 \b, ARGB4444 3267a4d6d3b8SXin LI>0x08 ubyte 3 \b, YUV442 3268a4d6d3b8SXin LI>0x08 ubyte 4 \b, Bump 3269a4d6d3b8SXin LI>0x08 ubyte 5 \b, 4bpp 3270a4d6d3b8SXin LI>0x08 ubyte 6 \b, 8bpp 32713e41d09dSXin LI# Image data type. 3272a4d6d3b8SXin LI>0x09 ubyte 0x01 \b, square twiddled 3273a4d6d3b8SXin LI>0x09 ubyte 0x02 \b, square twiddled & mipmap 3274a4d6d3b8SXin LI>0x09 ubyte 0x03 \b, VQ 3275a4d6d3b8SXin LI>0x09 ubyte 0x04 \b, VQ & mipmap 3276a4d6d3b8SXin LI>0x09 ubyte 0x05 \b, 8-bit CLUT twiddled 3277a4d6d3b8SXin LI>0x09 ubyte 0x06 \b, 4-bit CLUT twiddled 3278a4d6d3b8SXin LI>0x09 ubyte 0x07 \b, 8-bit direct twiddled 3279a4d6d3b8SXin LI>0x09 ubyte 0x08 \b, 4-bit direct twiddled 3280a4d6d3b8SXin LI>0x09 ubyte 0x09 \b, rectangle 3281a4d6d3b8SXin LI>0x09 ubyte 0x0B \b, rectangular stride 3282a4d6d3b8SXin LI>0x09 ubyte 0x0D \b, rectangular twiddled 3283a4d6d3b8SXin LI>0x09 ubyte 0x10 \b, small VQ 3284a4d6d3b8SXin LI>0x09 ubyte 0x11 \b, small VQ & mipmap 3285a4d6d3b8SXin LI>0x09 ubyte 0x12 \b, square twiddled & mipmap 32863e41d09dSXin LI 32873e41d09dSXin LI# Sega PVR image. 32883e41d09dSXin LI0 string PVRT 32893e41d09dSXin LI>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image: 32902dc4dbb9SEitan Adler>>0x20 use ms-directdraw-surface 3291a4d6d3b8SXin LI>0x10 ubelong !0x44445320 Sega PVR image: 32923e41d09dSXin LI>>0 use sega-pvr-image-header 32933e41d09dSXin LI 32943e41d09dSXin LI# Sega PVR image with GBIX. 32953e41d09dSXin LI0 string GBIX 32963e41d09dSXin LI>0x10 string PVRT 32973e41d09dSXin LI>>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image: 329848c779cdSXin LI>>>0x20 use ms-directdraw-surface 3299a4d6d3b8SXin LI>>0x10 ubelong !0x44445320 Sega PVR image: 33003e41d09dSXin LI>>>0x10 use sega-pvr-image-header 3301a4d6d3b8SXin LI>>0x08 ulelong x \b, global index = %u 3302*ae316d1dSXin LI# Sega GVR image with GBIX. 3303*ae316d1dSXin LI>0x10 string GVRT Sega GVR image: 3304*ae316d1dSXin LI>>0x10 use sega-gvr-image-header 3305*ae316d1dSXin LI>>0x08 ubelong x \b, global index = %u 33063e41d09dSXin LI 33073e41d09dSXin LI# Sega GVR header. 33083e41d09dSXin LI0 name sega-gvr-image-header 3309a4d6d3b8SXin LI>0x0C ubeshort x %u x 3310a4d6d3b8SXin LI>0x0E ubeshort x %u 33113e41d09dSXin LI# Image data format. 3312a4d6d3b8SXin LI>0x0B ubyte 0 \b, I4 3313a4d6d3b8SXin LI>0x0B ubyte 1 \b, I8 3314a4d6d3b8SXin LI>0x0B ubyte 2 \b, IA4 3315a4d6d3b8SXin LI>0x0B ubyte 3 \b, IA8 3316a4d6d3b8SXin LI>0x0B ubyte 4 \b, RGB565 3317a4d6d3b8SXin LI>0x0B ubyte 5 \b, RGB5A3 3318a4d6d3b8SXin LI>0x0B ubyte 6 \b, ARGB8888 3319a4d6d3b8SXin LI>0x0B ubyte 8 \b, CI4 3320a4d6d3b8SXin LI>0x0B ubyte 9 \b, CI8 3321a4d6d3b8SXin LI>0x0B ubyte 14 \b, DXT1 33223e41d09dSXin LI 33233e41d09dSXin LI# Sega GVR image. 33243e41d09dSXin LI0 string GVRT Sega GVR image: 33253e41d09dSXin LI>0x10 use sega-gvr-image-header 33263e41d09dSXin LI 33272dc4dbb9SEitan Adler# Sega GVR image with GCIX. (Wii) 33282dc4dbb9SEitan Adler0 string GCIX 33292dc4dbb9SEitan Adler>0x10 string GVRT Sega GVR image: 33302dc4dbb9SEitan Adler>>0x10 use sega-gvr-image-header 3331a4d6d3b8SXin LI>>0x08 ubelong x \b, global index = %u 33322dc4dbb9SEitan Adler 333340427ccaSGordon Tetlow# Light Field Picture 333440427ccaSGordon Tetlow# Documentation: http://optics.miloush.net/lytro/TheFileFormat.aspx 333540427ccaSGordon Tetlow# Typical file extensions: .lfp .lfr .lfx 3336a4d6d3b8SXin LI0 ubelong 0x894C4650 3337*ae316d1dSXin LI>4 ubelong 0x0D0A1A0A Lytro Light Field Picture 3338*ae316d1dSXin LI>>8 ubelong x \b, version %u 333958a0f0d0SEitan Adler 334058a0f0d0SEitan Adler# Type: ARRI Raw Image 334158a0f0d0SEitan Adler# Info: SMPTE RDD30:2014 334258a0f0d0SEitan Adler# From: Harry Mallon <hjmallon at gmail.com> 334358a0f0d0SEitan Adler0 string ARRI ARRI ARI image data, 3344a4d6d3b8SXin LI>4 ulelong 0x78563412 little-endian, 3345a4d6d3b8SXin LI>4 ulelong 0x12345678 big-endian, 3346a4d6d3b8SXin LI>12 ulelong x version %d, 3347a4d6d3b8SXin LI>20 ulelong x %dx 3348a4d6d3b8SXin LI>24 ulelong x \b%d 33492dc4dbb9SEitan Adler 33502dc4dbb9SEitan Adler# Type: Khronos KTX texture. 33512dc4dbb9SEitan Adler# From: David Korth <gerbilsoft@gerbilsoft.com> 33522726a701SXin LI# Reference: https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/ 3353*ae316d1dSXin LI# https://www.iana.org/assignments/media-types/image/ktx 33542dc4dbb9SEitan Adler 33552dc4dbb9SEitan Adler# glEnum decoding. 33562dc4dbb9SEitan Adler# NOTE: Only the most common formats are listed here. 33572dc4dbb9SEitan Adler0 name khronos-ktx-glEnum 3358a4d6d3b8SXin LI>0 ulelong 0x1907 \b, RGB 3359a4d6d3b8SXin LI>0 ulelong 0x1908 \b, RGBA 3360a4d6d3b8SXin LI>0 ulelong 0x1909 \b, LUMINANCE 3361a4d6d3b8SXin LI>0 ulelong 0x190A \b, LUMINANCE_ALPHA 3362a4d6d3b8SXin LI>0 ulelong 0x80E1 \b, BGR 3363a4d6d3b8SXin LI>0 ulelong 0x80E2 \b, BGRA 3364a4d6d3b8SXin LI>0 ulelong 0x83A0 \b, RGB_S3TC 3365a4d6d3b8SXin LI>0 ulelong 0x83A1 \b, RGB4_S3TC 3366a4d6d3b8SXin LI>0 ulelong 0x83A2 \b, RGBA_S3TC 3367a4d6d3b8SXin LI>0 ulelong 0x83A3 \b, RGBA4_S3TC 3368a4d6d3b8SXin LI>0 ulelong 0x83A4 \b, RGBA_DXT5_S3TC 3369a4d6d3b8SXin LI>0 ulelong 0x83A5 \b, RGBA4_DXT5_S3TC 3370a4d6d3b8SXin LI>0 ulelong 0x83F0 \b, COMPRESSED_RGB_S3TC_DXT1_EXT 3371a4d6d3b8SXin LI>0 ulelong 0x83F1 \b, COMPRESSED_RGBA_S3TC_DXT1_EXT 3372a4d6d3b8SXin LI>0 ulelong 0x83F2 \b, COMPRESSED_RGBA_S3TC_DXT3_EXT 3373a4d6d3b8SXin LI>0 ulelong 0x83F3 \b, COMPRESSED_RGBA_S3TC_DXT5_EXT 3374a4d6d3b8SXin LI>0 ulelong 0x8D64 \b, ETC1_RGB8_OES 3375a4d6d3b8SXin LI>0 ulelong 0x9270 \b, COMPRESSED_R11_EAC 3376a4d6d3b8SXin LI>0 ulelong 0x9271 \b, COMPRESSED_SIGNED_R11_EAC 3377a4d6d3b8SXin LI>0 ulelong 0x9272 \b, COMPRESSED_RG11_EAC 3378a4d6d3b8SXin LI>0 ulelong 0x9273 \b, COMPRESSED_SIGNED_RG11_EAC 3379a4d6d3b8SXin LI>0 ulelong 0x9274 \b, COMPRESSED_RGB8_ETC2 3380a4d6d3b8SXin LI>0 ulelong 0x9275 \b, COMPRESSED_SRGB8_ETC2 3381a4d6d3b8SXin LI>0 ulelong 0x9276 \b, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 3382a4d6d3b8SXin LI>0 ulelong 0x9277 \b, COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 3383a4d6d3b8SXin LI>0 ulelong 0x9278 \b, COMPRESSED_RGBA2_ETC2_EAC 3384a4d6d3b8SXin LI>0 ulelong 0x9279 \b, COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 3385a4d6d3b8SXin LI>0 ulelong 0x93B0 \b, COMPRESSED_RGBA_ASTC_4x4_KHR 3386a4d6d3b8SXin LI>0 ulelong 0x93B1 \b, COMPRESSED_RGBA_ASTC_5x4_KHR 3387a4d6d3b8SXin LI>0 ulelong 0x93B2 \b, COMPRESSED_RGBA_ASTC_5x5_KHR 3388a4d6d3b8SXin LI>0 ulelong 0x93B3 \b, COMPRESSED_RGBA_ASTC_6x5_KHR 3389a4d6d3b8SXin LI>0 ulelong 0x93B4 \b, COMPRESSED_RGBA_ASTC_6x6_KHR 3390a4d6d3b8SXin LI>0 ulelong 0x93B5 \b, COMPRESSED_RGBA_ASTC_8x5_KHR 3391a4d6d3b8SXin LI>0 ulelong 0x93B6 \b, COMPRESSED_RGBA_ASTC_8x6_KHR 3392a4d6d3b8SXin LI>0 ulelong 0x93B7 \b, COMPRESSED_RGBA_ASTC_8x8_KHR 3393a4d6d3b8SXin LI>0 ulelong 0x93B8 \b, COMPRESSED_RGBA_ASTC_10x5_KHR 3394a4d6d3b8SXin LI>0 ulelong 0x93B9 \b, COMPRESSED_RGBA_ASTC_10x6_KHR 3395a4d6d3b8SXin LI>0 ulelong 0x93BA \b, COMPRESSED_RGBA_ASTC_10x8_KHR 3396a4d6d3b8SXin LI>0 ulelong 0x93BB \b, COMPRESSED_RGBA_ASTC_10x10_KHR 3397a4d6d3b8SXin LI>0 ulelong 0x93BC \b, COMPRESSED_RGBA_ASTC_12x10_KHR 3398a4d6d3b8SXin LI>0 ulelong 0x93BD \b, COMPRESSED_RGBA_ASTC_12x12_KHR 3399a4d6d3b8SXin LI>0 ulelong 0x93D0 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 3400a4d6d3b8SXin LI>0 ulelong 0x93D1 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 3401a4d6d3b8SXin LI>0 ulelong 0x93D2 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 3402a4d6d3b8SXin LI>0 ulelong 0x93D3 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 3403a4d6d3b8SXin LI>0 ulelong 0x93D4 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 3404a4d6d3b8SXin LI>0 ulelong 0x93D5 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 3405a4d6d3b8SXin LI>0 ulelong 0x93D6 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 3406a4d6d3b8SXin LI>0 ulelong 0x93D7 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 3407a4d6d3b8SXin LI>0 ulelong 0x93D8 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 3408a4d6d3b8SXin LI>0 ulelong 0x93D9 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 3409a4d6d3b8SXin LI>0 ulelong 0x93DA \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 3410a4d6d3b8SXin LI>0 ulelong 0x93DB \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 3411a4d6d3b8SXin LI>0 ulelong 0x93DC \b, COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 3412a4d6d3b8SXin LI>0 ulelong 0x93DD \b, COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 34132dc4dbb9SEitan Adler 34142dc4dbb9SEitan Adler# Endian-specific KTX header. 34152dc4dbb9SEitan Adler# TODO: glType (all textures I've seen so far are GL_UNSIGNED_BYTE) 34162dc4dbb9SEitan Adler0 name khronos-ktx-endian-header 3417a4d6d3b8SXin LI>20 ulelong x \b, %u 3418a4d6d3b8SXin LI>24 ulelong >1 x %u 3419a4d6d3b8SXin LI>28 ulelong >1 x %u 3420a4d6d3b8SXin LI>8 ulelong >0 34212dc4dbb9SEitan Adler>>8 use khronos-ktx-glEnum 3422a4d6d3b8SXin LI>8 ulelong 0 34232dc4dbb9SEitan Adler>>12 use khronos-ktx-glEnum 34242dc4dbb9SEitan Adler 34252dc4dbb9SEitan Adler# Main KTX header. 34262dc4dbb9SEitan Adler# Determine endianness, then check the rest of the header. 34272dc4dbb9SEitan Adler0 string \xABKTX\ 11\xBB\r\n\x1A\n Khronos KTX texture 3428*ae316d1dSXin LI!:mime image/ktx 3429*ae316d1dSXin LI!:ext ktx 3430a4d6d3b8SXin LI>12 ulelong 0x04030201 (little-endian) 34312dc4dbb9SEitan Adler>>16 use khronos-ktx-endian-header 3432a4d6d3b8SXin LI>12 ubelong 0x04030201 (big-endian) 343348c779cdSXin LI>>16 use \^khronos-ktx-endian-header 34342dc4dbb9SEitan Adler 34352726a701SXin LI# Type: Khronos KTX2 texture. 34362726a701SXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 34372726a701SXin LI# Based on draft19. 34382726a701SXin LI# Reference: http://github.khronos.org/KTX-Specification/ 3439*ae316d1dSXin LI# https://www.iana.org/assignments/media-types/image/ktx2 34402726a701SXin LI 34412726a701SXin LI# Supercompression enum. 34422726a701SXin LI0 name khronos-ktx2-supercompression 3443a4d6d3b8SXin LI>0 ulelong 1 BasisLZ 3444a4d6d3b8SXin LI>0 ulelong 2 Zstandard 3445a4d6d3b8SXin LI>0 ulelong 3 ZLIB 34462726a701SXin LI 34472726a701SXin LI# Vulkan format identifier. 34482726a701SXin LI# NOTE: Formats prohibited from KTX2 are commented out. 34492726a701SXin LI0 name khronos-ktx2-vkFormat 3450a4d6d3b8SXin LI>0 ulelong 0 UNDEFINED 3451a4d6d3b8SXin LI>0 ulelong 1 R4G4_UNORM_PACK8 3452a4d6d3b8SXin LI>0 ulelong 2 R4G4B4A4_UNORM_PACK16 3453a4d6d3b8SXin LI>0 ulelong 3 B4G4R4A4_UNORM_PACK16 3454a4d6d3b8SXin LI>0 ulelong 4 R5G6B5_UNORM_PACK16 3455a4d6d3b8SXin LI>0 ulelong 5 B5G6R5_UNORM_PACK16 3456a4d6d3b8SXin LI>0 ulelong 6 R5G5B5A1_UNORM_PACK16 3457a4d6d3b8SXin LI>0 ulelong 7 B5G5R5A1_UNORM_PACK16 3458a4d6d3b8SXin LI>0 ulelong 8 A1R5G5B5_UNORM_PACK16 3459a4d6d3b8SXin LI>0 ulelong 9 R8_UNORM 3460a4d6d3b8SXin LI>0 ulelong 10 R8_SNORM 3461a4d6d3b8SXin LI#>0 ulelong 11 R8_USCALED 3462a4d6d3b8SXin LI#>0 ulelong 12 R8_SSCALED 3463a4d6d3b8SXin LI>0 ulelong 13 R8_UINT 3464a4d6d3b8SXin LI>0 ulelong 14 R8_SINT 3465a4d6d3b8SXin LI>0 ulelong 15 R8_SRGB 3466a4d6d3b8SXin LI>0 ulelong 16 R8G8_UNORM 3467a4d6d3b8SXin LI>0 ulelong 17 R8G8_SNORM 3468a4d6d3b8SXin LI#>0 ulelong 18 R8G8_USCALED 3469a4d6d3b8SXin LI#>0 ulelong 19 R8G8_SSCALED 3470a4d6d3b8SXin LI>0 ulelong 20 R8G8_UINT 3471a4d6d3b8SXin LI>0 ulelong 21 R8G8_SINT 3472a4d6d3b8SXin LI>0 ulelong 22 R8G8_SRGB 3473a4d6d3b8SXin LI>0 ulelong 23 R8G8B8_UNORM 3474a4d6d3b8SXin LI>0 ulelong 24 R8G8B8_SNORM 3475a4d6d3b8SXin LI#>0 ulelong 25 R8G8B8_USCALED 3476a4d6d3b8SXin LI#>0 ulelong 26 R8G8B8_SSCALED 3477a4d6d3b8SXin LI>0 ulelong 27 R8G8B8_UINT 3478a4d6d3b8SXin LI>0 ulelong 28 R8G8B8_SINT 3479a4d6d3b8SXin LI>0 ulelong 29 R8G8B8_SRGB 3480a4d6d3b8SXin LI>0 ulelong 30 B8G8R8_UNORM 3481a4d6d3b8SXin LI>0 ulelong 31 B8G8R8_SNORM 3482a4d6d3b8SXin LI#>0 ulelong 32 B8G8R8_USCALED 3483a4d6d3b8SXin LI#>0 ulelong 33 B8G8R8_SSCALED 3484a4d6d3b8SXin LI>0 ulelong 34 B8G8R8_UINT 3485a4d6d3b8SXin LI>0 ulelong 35 B8G8R8_SINT 3486a4d6d3b8SXin LI>0 ulelong 36 B8G8R8_SRGB 3487a4d6d3b8SXin LI>0 ulelong 37 R8G8B8A8_UNORM 3488a4d6d3b8SXin LI>0 ulelong 38 R8G8B8A8_SNORM 3489a4d6d3b8SXin LI#>0 ulelong 39 R8G8B8A8_USCALED 3490a4d6d3b8SXin LI#>0 ulelong 40 R8G8B8A8_SSCALED 3491a4d6d3b8SXin LI>0 ulelong 41 R8G8B8A8_UINT 3492a4d6d3b8SXin LI>0 ulelong 42 R8G8B8A8_SINT 3493a4d6d3b8SXin LI>0 ulelong 43 R8G8B8A8_SRGB 3494a4d6d3b8SXin LI>0 ulelong 44 B8G8R8A8_UNORM 3495a4d6d3b8SXin LI>0 ulelong 45 B8G8R8A8_SNORM 3496a4d6d3b8SXin LI#>0 ulelong 46 B8G8R8A8_USCALED 3497a4d6d3b8SXin LI#>0 ulelong 47 B8G8R8A8_SSCALED 3498a4d6d3b8SXin LI>0 ulelong 48 B8G8R8A8_UINT 3499a4d6d3b8SXin LI>0 ulelong 49 B8G8R8A8_SINT 3500a4d6d3b8SXin LI>0 ulelong 50 B8G8R8A8_SRGB 3501a4d6d3b8SXin LI#>0 ulelong 51 A8B8G8R8_UNORM_PACK32 3502a4d6d3b8SXin LI#>0 ulelong 52 A8B8G8R8_SNORM_PACK32 3503a4d6d3b8SXin LI#>0 ulelong 53 A8B8G8R8_USCALED_PACK32 3504a4d6d3b8SXin LI#>0 ulelong 54 A8B8G8R8_SSCALED_PACK32 3505a4d6d3b8SXin LI#>0 ulelong 55 A8B8G8R8_UINT_PACK32 3506a4d6d3b8SXin LI#>0 ulelong 56 A8B8G8R8_SINT_PACK32 3507a4d6d3b8SXin LI#>0 ulelong 57 A8B8G8R8_SRGB_PACK32 3508a4d6d3b8SXin LI>0 ulelong 58 A2R10G10B10_UNORM_PACK32 3509a4d6d3b8SXin LI>0 ulelong 59 A2R10G10B10_SNORM_PACK32 3510a4d6d3b8SXin LI#>0 ulelong 60 A2R10G10B10_USCALED_PACK32 3511a4d6d3b8SXin LI#>0 ulelong 61 A2R10G10B10_SSCALED_PACK32 3512a4d6d3b8SXin LI>0 ulelong 62 A2R10G10B10_UINT_PACK32 3513a4d6d3b8SXin LI>0 ulelong 63 A2R10G10B10_SINT_PACK32 3514a4d6d3b8SXin LI>0 ulelong 64 A2B10G10R10_UNORM_PACK32 3515a4d6d3b8SXin LI>0 ulelong 65 A2B10G10R10_SNORM_PACK32 3516a4d6d3b8SXin LI#>0 ulelong 66 A2B10G10R10_USCALED_PACK32 3517a4d6d3b8SXin LI#>0 ulelong 67 A2B10G10R10_SSCALED_PACK32 3518a4d6d3b8SXin LI>0 ulelong 68 A2B10G10R10_UINT_PACK32 3519a4d6d3b8SXin LI>0 ulelong 69 A2B10G10R10_SINT_PACK32 3520a4d6d3b8SXin LI>0 ulelong 70 R16_UNORM 3521a4d6d3b8SXin LI>0 ulelong 71 R16_SNORM 3522a4d6d3b8SXin LI#>0 ulelong 72 R16_USCALED 3523a4d6d3b8SXin LI#>0 ulelong 73 R16_SSCALED 3524a4d6d3b8SXin LI>0 ulelong 74 R16_UINT 3525a4d6d3b8SXin LI>0 ulelong 75 R16_SINT 3526a4d6d3b8SXin LI>0 ulelong 76 R16_SFLOAT 3527a4d6d3b8SXin LI>0 ulelong 77 R16G16_UNORM 3528a4d6d3b8SXin LI>0 ulelong 78 R16G16_SNORM 3529a4d6d3b8SXin LI#>0 ulelong 79 R16G16_USCALED 3530a4d6d3b8SXin LI#>0 ulelong 80 R16G16_SSCALED 3531a4d6d3b8SXin LI>0 ulelong 81 R16G16_UINT 3532a4d6d3b8SXin LI>0 ulelong 82 R16G16_SINT 3533a4d6d3b8SXin LI>0 ulelong 83 R16G16_SFLOAT 3534a4d6d3b8SXin LI>0 ulelong 84 R16G16B16_UNORM 3535a4d6d3b8SXin LI>0 ulelong 85 R16G16B16_SNORM 3536a4d6d3b8SXin LI#>0 ulelong 86 R16G16B16_USCALED 3537a4d6d3b8SXin LI#>0 ulelong 87 R16G16B16_SSCALED 3538a4d6d3b8SXin LI>0 ulelong 88 R16G16B16_UINT 3539a4d6d3b8SXin LI>0 ulelong 89 R16G16B16_SINT 3540a4d6d3b8SXin LI>0 ulelong 90 R16G16B16_SFLOAT 3541a4d6d3b8SXin LI>0 ulelong 91 R16G16B16A16_UNORM 3542a4d6d3b8SXin LI>0 ulelong 92 R16G16B16A16_SNORM 3543a4d6d3b8SXin LI#>0 ulelong 93 R16G16B16A16_USCALED 3544a4d6d3b8SXin LI#>0 ulelong 94 R16G16B16A16_SSCALED 3545a4d6d3b8SXin LI>0 ulelong 95 R16G16B16A16_UINT 3546a4d6d3b8SXin LI>0 ulelong 96 R16G16B16A16_SINT 3547a4d6d3b8SXin LI>0 ulelong 97 R16G16B16A16_SFLOAT 3548a4d6d3b8SXin LI>0 ulelong 98 R32_UINT 3549a4d6d3b8SXin LI>0 ulelong 99 R32_SINT 3550a4d6d3b8SXin LI>0 ulelong 100 R32_SFLOAT 3551a4d6d3b8SXin LI>0 ulelong 101 R32G32_UINT 3552a4d6d3b8SXin LI>0 ulelong 102 R32G32_SINT 3553a4d6d3b8SXin LI>0 ulelong 103 R32G32_SFLOAT 3554a4d6d3b8SXin LI>0 ulelong 104 R32G32B32_UINT 3555a4d6d3b8SXin LI>0 ulelong 105 R32G32B32_SINT 3556a4d6d3b8SXin LI>0 ulelong 106 R32G32B32_SFLOAT 3557a4d6d3b8SXin LI>0 ulelong 107 R32G32B32A32_UINT 3558a4d6d3b8SXin LI>0 ulelong 108 R32G32B32A32_SINT 3559a4d6d3b8SXin LI>0 ulelong 109 R32G32B32A32_SFLOAT 3560a4d6d3b8SXin LI>0 ulelong 110 R64_UINT 3561a4d6d3b8SXin LI>0 ulelong 111 R64_SINT 3562a4d6d3b8SXin LI>0 ulelong 112 R64_SFLOAT 3563a4d6d3b8SXin LI>0 ulelong 113 R64G64_UINT 3564a4d6d3b8SXin LI>0 ulelong 114 R64G64_SINT 3565a4d6d3b8SXin LI>0 ulelong 115 R64G64_SFLOAT 3566a4d6d3b8SXin LI>0 ulelong 116 R64G64B64_UINT 3567a4d6d3b8SXin LI>0 ulelong 117 R64G64B64_SINT 3568a4d6d3b8SXin LI>0 ulelong 118 R64G64B64_SFLOAT 3569a4d6d3b8SXin LI>0 ulelong 119 R64G64B64A64_UINT 3570a4d6d3b8SXin LI>0 ulelong 120 R64G64B64A64_SINT 3571a4d6d3b8SXin LI>0 ulelong 121 R64G64B64A64_SFLOAT 3572a4d6d3b8SXin LI>0 ulelong 122 B10G11R11_UFLOAT_PACK32 3573a4d6d3b8SXin LI>0 ulelong 123 E5B9G9R9_UFLOAT_PACK32 3574a4d6d3b8SXin LI>0 ulelong 124 D16_UNORM 3575a4d6d3b8SXin LI>0 ulelong 125 X8_D24_UNORM_PACK32 3576a4d6d3b8SXin LI>0 ulelong 126 D32_SFLOAT 3577a4d6d3b8SXin LI>0 ulelong 127 S8_UINT 3578a4d6d3b8SXin LI>0 ulelong 128 D16_UNORM_S8_UINT 3579a4d6d3b8SXin LI>0 ulelong 129 D24_UNORM_S8_UINT 3580a4d6d3b8SXin LI>0 ulelong 130 D32_SFLOAT_S8_UINT 35812726a701SXin LI 3582a4d6d3b8SXin LI>0 ulelong 131 BC1_RGB_UNORM_BLOCK 3583a4d6d3b8SXin LI>0 ulelong 132 BC1_RGB_SRGB_BLOCK 3584a4d6d3b8SXin LI>0 ulelong 133 BC1_RGBA_UNORM_BLOCK 3585a4d6d3b8SXin LI>0 ulelong 134 BC1_RGBA_SRGB_BLOCK 3586a4d6d3b8SXin LI>0 ulelong 135 BC2_UNORM_BLOCK 3587a4d6d3b8SXin LI>0 ulelong 136 BC2_SRGB_BLOCK 3588a4d6d3b8SXin LI>0 ulelong 137 BC3_UNORM_BLOCK 3589a4d6d3b8SXin LI>0 ulelong 138 BC3_SRGB_BLOCK 3590a4d6d3b8SXin LI>0 ulelong 139 BC4_UNORM_BLOCK 3591a4d6d3b8SXin LI>0 ulelong 140 BC4_SNORM_BLOCK 3592a4d6d3b8SXin LI>0 ulelong 141 BC5_UNORM_BLOCK 3593a4d6d3b8SXin LI>0 ulelong 142 BC5_SNORM_BLOCK 3594a4d6d3b8SXin LI>0 ulelong 143 BC6H_UFLOAT_BLOCK 3595a4d6d3b8SXin LI>0 ulelong 144 BC6H_SFLOAT_BLOCK 3596a4d6d3b8SXin LI>0 ulelong 145 BC7_UNORM_BLOCK 3597a4d6d3b8SXin LI>0 ulelong 146 BC7_SRGB_BLOCK 35982726a701SXin LI 3599a4d6d3b8SXin LI>0 ulelong 147 ETC2_R8G8B8_UNORM_BLOCK 3600a4d6d3b8SXin LI>0 ulelong 148 ETC2_R8G8B8_SRGB_BLOCK 3601a4d6d3b8SXin LI>0 ulelong 149 ETC2_R8G8B8A1_UNORM_BLOCK 3602a4d6d3b8SXin LI>0 ulelong 150 ETC2_R8G8B8A1_SRGB_BLOCK 3603a4d6d3b8SXin LI>0 ulelong 151 ETC2_R8G8B8A8_UNORM_BLOCK 3604a4d6d3b8SXin LI>0 ulelong 152 ETC2_R8G8B8A8_SRGB_BLOCK 36052726a701SXin LI 3606a4d6d3b8SXin LI>0 ulelong 153 EAC_R11_UNORM_BLOCK 3607a4d6d3b8SXin LI>0 ulelong 154 EAC_R11_SNORM_BLOCK 3608a4d6d3b8SXin LI>0 ulelong 155 EAC_R11G11_UNORM_BLOCK 3609a4d6d3b8SXin LI>0 ulelong 156 EAC_R11G11_SNORM_BLOCK 36102726a701SXin LI 3611a4d6d3b8SXin LI>0 ulelong 157 ASTC_4x4_UNORM_BLOCK 3612a4d6d3b8SXin LI>0 ulelong 158 ASTC_4x4_SRGB_BLOCK 3613a4d6d3b8SXin LI>0 ulelong 159 ASTC_5x4_UNORM_BLOCK 3614a4d6d3b8SXin LI>0 ulelong 160 ASTC_5x4_SRGB_BLOCK 3615a4d6d3b8SXin LI>0 ulelong 161 ASTC_5x5_UNORM_BLOCK 3616a4d6d3b8SXin LI>0 ulelong 162 ASTC_5x5_SRGB_BLOCK 3617a4d6d3b8SXin LI>0 ulelong 163 ASTC_6x5_UNORM_BLOCK 3618a4d6d3b8SXin LI>0 ulelong 164 ASTC_6x5_SRGB_BLOCK 3619a4d6d3b8SXin LI>0 ulelong 165 ASTC_6x6_UNORM_BLOCK 3620a4d6d3b8SXin LI>0 ulelong 166 ASTC_6x6_SRGB_BLOCK 3621a4d6d3b8SXin LI>0 ulelong 167 ASTC_8x5_UNORM_BLOCK 3622a4d6d3b8SXin LI>0 ulelong 168 ASTC_8x5_SRGB_BLOCK 3623a4d6d3b8SXin LI>0 ulelong 169 ASTC_8x6_UNORM_BLOCK 3624a4d6d3b8SXin LI>0 ulelong 170 ASTC_8x6_SRGB_BLOCK 3625a4d6d3b8SXin LI>0 ulelong 171 ASTC_8x8_UNORM_BLOCK 3626a4d6d3b8SXin LI>0 ulelong 172 ASTC_8x8_SRGB_BLOCK 3627a4d6d3b8SXin LI>0 ulelong 173 ASTC_10x5_UNORM_BLOCK 3628a4d6d3b8SXin LI>0 ulelong 174 ASTC_10x5_SRGB_BLOCK 3629a4d6d3b8SXin LI>0 ulelong 175 ASTC_10x6_UNORM_BLOCK 3630a4d6d3b8SXin LI>0 ulelong 176 ASTC_10x6_SRGB_BLOCK 3631a4d6d3b8SXin LI>0 ulelong 177 ASTC_10x8_UNORM_BLOCK 3632a4d6d3b8SXin LI>0 ulelong 178 ASTC_10x8_SRGB_BLOCK 3633a4d6d3b8SXin LI>0 ulelong 179 ASTC_10x10_UNORM_BLOCK 3634a4d6d3b8SXin LI>0 ulelong 180 ASTC_10x10_SRGB_BLOCK 3635a4d6d3b8SXin LI>0 ulelong 181 ASTC_12x10_UNORM_BLOCK 3636a4d6d3b8SXin LI>0 ulelong 182 ASTC_12x10_SRGB_BLOCK 3637a4d6d3b8SXin LI>0 ulelong 183 ASTC_12x12_UNORM_BLOCK 3638a4d6d3b8SXin LI>0 ulelong 184 ASTC_12x12_SRGB_BLOCK 36392726a701SXin LI 3640a4d6d3b8SXin LI>0 ulelong 1000156000 G8B8G8R8_422_UNORM 3641a4d6d3b8SXin LI>0 ulelong 1000156001 B8G8R8G8_422_UNORM 3642a4d6d3b8SXin LI>0 ulelong 1000156002 G8_B8_R8_3PLANE_420_UNORM 3643a4d6d3b8SXin LI>0 ulelong 1000156003 G8_B8R8_2PLANE_420_UNORM 3644a4d6d3b8SXin LI>0 ulelong 1000156004 G8_B8_R8_3PLANE_422_UNORM 3645a4d6d3b8SXin LI>0 ulelong 1000156005 G8_B8R8_2PLANE_422_UNORM 3646a4d6d3b8SXin LI>0 ulelong 1000156006 G8_B8_R8_3PLANE_444_UNORM 3647a4d6d3b8SXin LI>0 ulelong 1000156007 R10X6_UNORM_PACK16 3648a4d6d3b8SXin LI>0 ulelong 1000156008 R10X6G10X6_UNORM_2PACK16 3649a4d6d3b8SXin LI>0 ulelong 1000156009 R10X6G10X6B10X6A10X6_UNORM_4PACK16 3650a4d6d3b8SXin LI>0 ulelong 1000156010 G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 3651a4d6d3b8SXin LI>0 ulelong 1000156011 B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 3652a4d6d3b8SXin LI>0 ulelong 1000156012 G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 3653a4d6d3b8SXin LI>0 ulelong 1000156013 G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 3654a4d6d3b8SXin LI>0 ulelong 1000156014 G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 3655a4d6d3b8SXin LI>0 ulelong 1000156015 G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 3656a4d6d3b8SXin LI>0 ulelong 1000156016 G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 3657a4d6d3b8SXin LI>0 ulelong 1000156017 R12X4_UNORM_PACK16 3658a4d6d3b8SXin LI>0 ulelong 1000156018 R12X4G12X4_UNORM_2PACK16 3659a4d6d3b8SXin LI>0 ulelong 1000156019 R12X4G12X4B12X4A12X4_UNORM_4PACK16 3660a4d6d3b8SXin LI>0 ulelong 1000156020 G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 3661a4d6d3b8SXin LI>0 ulelong 1000156021 B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 3662a4d6d3b8SXin LI>0 ulelong 1000156022 G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 3663a4d6d3b8SXin LI>0 ulelong 1000156023 G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 3664a4d6d3b8SXin LI>0 ulelong 1000156024 G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 3665a4d6d3b8SXin LI>0 ulelong 1000156025 G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 3666a4d6d3b8SXin LI>0 ulelong 1000156026 G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 3667a4d6d3b8SXin LI>0 ulelong 1000156027 G16B16G16R16_422_UNORM 3668a4d6d3b8SXin LI>0 ulelong 1000156028 B16G16R16G16_422_UNORM 3669a4d6d3b8SXin LI>0 ulelong 1000156029 G16_B16_R16_3PLANE_420_UNORM 3670a4d6d3b8SXin LI>0 ulelong 1000156030 G16_B16R16_2PLANE_420_UNORM 3671a4d6d3b8SXin LI>0 ulelong 1000156031 G16_B16_R16_3PLANE_422_UNORM 3672a4d6d3b8SXin LI>0 ulelong 1000156032 G16_B16R16_2PLANE_422_UNORM 3673a4d6d3b8SXin LI>0 ulelong 1000156033 G16_B16_R16_3PLANE_444_UNORM 36742726a701SXin LI 3675a4d6d3b8SXin LI>0 ulelong 1000054000 PVRTC1_2BPP_UNORM_BLOCK_IMG 3676a4d6d3b8SXin LI>0 ulelong 1000054001 PVRTC1_4BPP_UNORM_BLOCK_IMG 3677a4d6d3b8SXin LI>0 ulelong 1000054002 PVRTC2_2BPP_UNORM_BLOCK_IMG 3678a4d6d3b8SXin LI>0 ulelong 1000054003 PVRTC2_4BPP_UNORM_BLOCK_IMG 3679a4d6d3b8SXin LI>0 ulelong 1000054004 PVRTC1_2BPP_SRGB_BLOCK_IMG 3680a4d6d3b8SXin LI>0 ulelong 1000054005 PVRTC1_4BPP_SRGB_BLOCK_IMG 3681a4d6d3b8SXin LI>0 ulelong 1000054006 PVRTC2_2BPP_SRGB_BLOCK_IMG 3682a4d6d3b8SXin LI>0 ulelong 1000054007 PVRTC2_4BPP_SRGB_BLOCK_IMG 36832726a701SXin LI 3684a4d6d3b8SXin LI>0 ulelong 1000066000 ASTC_4x4_SFLOAT_BLOCK_EXT 3685a4d6d3b8SXin LI>0 ulelong 1000066001 ASTC_5x4_SFLOAT_BLOCK_EXT 3686a4d6d3b8SXin LI>0 ulelong 1000066002 ASTC_5x5_SFLOAT_BLOCK_EXT 3687a4d6d3b8SXin LI>0 ulelong 1000066003 ASTC_6x5_SFLOAT_BLOCK_EXT 3688a4d6d3b8SXin LI>0 ulelong 1000066004 ASTC_6x6_SFLOAT_BLOCK_EXT 3689a4d6d3b8SXin LI>0 ulelong 1000066005 ASTC_8x5_SFLOAT_BLOCK_EXT 3690a4d6d3b8SXin LI>0 ulelong 1000066006 ASTC_8x6_SFLOAT_BLOCK_EXT 3691a4d6d3b8SXin LI>0 ulelong 1000066007 ASTC_8x8_SFLOAT_BLOCK_EXT 3692a4d6d3b8SXin LI>0 ulelong 1000066008 ASTC_10x5_SFLOAT_BLOCK_EXT 3693a4d6d3b8SXin LI>0 ulelong 1000066009 ASTC_10x6_SFLOAT_BLOCK_EXT 3694a4d6d3b8SXin LI>0 ulelong 1000066010 ASTC_10x8_SFLOAT_BLOCK_EXT 3695a4d6d3b8SXin LI>0 ulelong 1000066011 ASTC_10x10_SFLOAT_BLOCK_EXT 3696a4d6d3b8SXin LI>0 ulelong 1000066012 ASTC_12x10_SFLOAT_BLOCK_EXT 3697a4d6d3b8SXin LI>0 ulelong 1000066013 ASTC_12x12_SFLOAT_BLOCK_EXT 36982726a701SXin LI 36992726a701SXin LI# Main KTX2 header. 37002726a701SXin LI0 string \xABKTX\ 20\xBB\r\n\x1A\n Khronos KTX2 texture 3701*ae316d1dSXin LI!:mime image/ktx2 3702*ae316d1dSXin LI!:ext ktx2 3703a4d6d3b8SXin LI>20 ulelong x \b, %u 3704a4d6d3b8SXin LI>24 ulelong >1 x %u 3705a4d6d3b8SXin LI>28 ulelong >1 x %u 3706a4d6d3b8SXin LI>32 ulelong >1 \b, %u layers 3707a4d6d3b8SXin LI>36 ulelong >1 \b, %u faces 3708a4d6d3b8SXin LI>40 ulelong >1 \b, %u mipmaps 3709a4d6d3b8SXin LI>44 ulelong >0 \b, 37102726a701SXin LI>>44 use khronos-ktx2-supercompression 3711a4d6d3b8SXin LI>12 ulelong >0 \b, 37122726a701SXin LI>>12 use khronos-ktx2-vkFormat 37132726a701SXin LI 37142dc4dbb9SEitan Adler# Type: Valve VTF texture. 37152dc4dbb9SEitan Adler# From: David Korth <gerbilsoft@gerbilsoft.com> 37162dc4dbb9SEitan Adler# References: 37172dc4dbb9SEitan Adler# - https://developer.valvesoftware.com/wiki/Valve_Texture_Format 37182dc4dbb9SEitan Adler 37192dc4dbb9SEitan Adler# VTF image formats. 37202dc4dbb9SEitan Adler0 name vtf-image-format 3721a4d6d3b8SXin LI>0 ulelong 0 RGBA8888 3722a4d6d3b8SXin LI>0 ulelong 1 ABGR8888 3723a4d6d3b8SXin LI>0 ulelong 2 RGB888 3724a4d6d3b8SXin LI>0 ulelong 3 BGR888 3725a4d6d3b8SXin LI>0 ulelong 4 RGB565 3726a4d6d3b8SXin LI>0 ulelong 5 I8 3727a4d6d3b8SXin LI>0 ulelong 6 IA88 3728a4d6d3b8SXin LI>0 ulelong 7 P8 3729a4d6d3b8SXin LI>0 ulelong 8 A8 3730a4d6d3b8SXin LI>0 ulelong 9 RGB888 (bluescreen) 3731a4d6d3b8SXin LI>0 ulelong 10 BGR888 (bluescreen) 3732a4d6d3b8SXin LI>0 ulelong 11 ARGB8888 3733a4d6d3b8SXin LI>0 ulelong 12 BGRA8888 3734a4d6d3b8SXin LI>0 ulelong 13 DXT1 3735a4d6d3b8SXin LI>0 ulelong 14 DXT3 3736a4d6d3b8SXin LI>0 ulelong 15 DXT5 3737a4d6d3b8SXin LI>0 ulelong 16 BGRx8888 3738a4d6d3b8SXin LI>0 ulelong 17 BGR565 3739a4d6d3b8SXin LI>0 ulelong 18 BGRx5551 3740a4d6d3b8SXin LI>0 ulelong 19 BGRA4444 3741a4d6d3b8SXin LI>0 ulelong 20 DXT1+A1 3742a4d6d3b8SXin LI>0 ulelong 21 BGRA5551 3743a4d6d3b8SXin LI>0 ulelong 22 UV88 3744a4d6d3b8SXin LI>0 ulelong 23 UVWQ8888 3745a4d6d3b8SXin LI>0 ulelong 24 RGBA16161616F 3746a4d6d3b8SXin LI>0 ulelong 25 RGBA16161616 3747a4d6d3b8SXin LI>0 ulelong 26 UVLX8888 37482dc4dbb9SEitan Adler 37492dc4dbb9SEitan Adler# Main VTF header. 37502dc4dbb9SEitan Adler0 string VTF\0 Valve Texture Format 3751a4d6d3b8SXin LI>4 ulelong x v%u 3752a4d6d3b8SXin LI>8 ulelong x \b.%u 3753a4d6d3b8SXin LI>0x10 uleshort x \b, %u 3754a4d6d3b8SXin LI>0x12 uleshort >1 x %u 37552dc4dbb9SEitan Adler>4 lequad 0x0000000700000002 3756a4d6d3b8SXin LI>>0x3F uleshort >1 x %u 3757a4d6d3b8SXin LI>0x18 uleshort >1 \b, %u frames 3758a4d6d3b8SXin LI>0x38 ubyte x \b, mipmaps: %u 3759a4d6d3b8SXin LI>0x34 ulelong >-1 \b, 37602dc4dbb9SEitan Adler>>0x34 use vtf-image-format 37612dc4dbb9SEitan Adler 37622dc4dbb9SEitan Adler# Type: Valve VTF3 (PS3) texture. 37632dc4dbb9SEitan Adler# From: David Korth <gerbilsoft@gerbilsoft.com> 37642dc4dbb9SEitan Adler0 string VTF3 Valve Texture Format (PS3) 3765a4d6d3b8SXin LI>0x14 ubeshort x \b, %u 3766a4d6d3b8SXin LI>0x16 ubeshort x \b x %u 3767a4d6d3b8SXin LI>0x10 ubelong&0x2000 0 \b, DXT1 3768a4d6d3b8SXin LI>0x10 ubelong&0x2000 0x2000 \b, DXT5 37692dc4dbb9SEitan Adler 37702dc4dbb9SEitan Adler# Type: ASTC texture. 37712dc4dbb9SEitan Adler# From: David Korth <gerbilsoft@gerbilsoft.com> 37722dc4dbb9SEitan Adler# References: 37732dc4dbb9SEitan Adler# - https://stackoverflow.com/questions/22600678/determine-internal-format-of-given-astc-compressed-image-through-its-header 37742dc4dbb9SEitan Adler# - https://stackoverflow.com/a/22682244 3775a4d6d3b8SXin LI0 ulelong 0x5ca1ab13 ASTC 3776a4d6d3b8SXin LI>4 ubyte x %u 3777a4d6d3b8SXin LI>5 ubyte x \bx%u 3778a4d6d3b8SXin LI>6 ubyte >1 \bx%u 37792dc4dbb9SEitan Adler# X, Y, and Z dimensions are stored as 24-bit LE. 37802dc4dbb9SEitan Adler# Pretend it's 32-bit and mask off the high byte. 3781a4d6d3b8SXin LI>7 ulelong&0x00FFFFFF x texture, %u 3782a4d6d3b8SXin LI>10 ulelong&0x00FFFFFF x x %u 3783a4d6d3b8SXin LI>13 ulelong&0x00FFFFFF >1 x %u 37842dc4dbb9SEitan Adler 37852dc4dbb9SEitan Adler# Zebra Metafile graphic 37862dc4dbb9SEitan Adler# http://www.fileformat.info/format/zbr/egff.htm 3787a4d6d3b8SXin LI0 ubeshort 0x9a02 Zebra Metafile graphic 3788a4d6d3b8SXin LI>2 uleshort 1 (version 1.x) 3789a4d6d3b8SXin LI>2 uleshort 2 (version 1.1x or 1.2x) 3790a4d6d3b8SXin LI>2 uleshort 3 (version 1.49) 3791a4d6d3b8SXin LI>2 uleshort 4 (version 1.50) 37922dc4dbb9SEitan Adler>4 string x (comment = %s) 37932dc4dbb9SEitan Adler 37942dc4dbb9SEitan Adler# Microsoft Paint graphic 37952dc4dbb9SEitan Adler# http://www.fileformat.info/format/mspaint/egff.htm 3796*ae316d1dSXin LI0 string DanM Microsoft Paint image data (version 1.x) 3797a4d6d3b8SXin LI>4 uleshort x (%d 3798a4d6d3b8SXin LI>>6 uleshort x x %d) 37992dc4dbb9SEitan Adler0 string LinS Microsoft Paint image data (version 2.0) 3800a4d6d3b8SXin LI>4 uleshort x (%d 3801a4d6d3b8SXin LI>>6 uleshort x x %d) 380248c779cdSXin LI 380348c779cdSXin LI# reMarkable tablet internal file format (https://www.remarkable.com/) 380448c779cdSXin LI# https://github.com/ax3l/lines-are-beautiful 380548c779cdSXin LI# https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/\ 380648c779cdSXin LI# reMarkable-lines-file-format.html#what-to-do-next 380748c779cdSXin LI# from Axel Huebl 380848c779cdSXin LI0 string reMarkable 380948c779cdSXin LI>11 string lines 381048c779cdSXin LI>>17 string with 381148c779cdSXin LI>>>22 string selections 381248c779cdSXin LI>>>>33 string and 381348c779cdSXin LI>>>>>37 string layers 3814a4d6d3b8SXin LI>>>>>>43 ulelong x reMarkable tablet notebook lines, 1404 x 1872, %x page(s) 381548c779cdSXin LI# newer per-page files for the reMarkable 381648c779cdSXin LI>11 string .lines 381748c779cdSXin LI>>18 string file, 381848c779cdSXin LI>>>24 string version= 3819a4d6d3b8SXin LI>>>>32 ubyte x reMarkable tablet page (v%c), 1404 x 1872, 3820a4d6d3b8SXin LI>>>>>43 ulelong x %d layer(s) 382148c779cdSXin LI 382248c779cdSXin LI# Type: PVR3 texture. 382348c779cdSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 382448c779cdSXin LI# References: 382548c779cdSXin LI# - http://cdn.imgtec.com/sdk-documentation/PVR+File+Format.Specification.pdf 382648c779cdSXin LI 382748c779cdSXin LI# PVR3 pixel formats. 382848c779cdSXin LI0 name pvr3-pixel-format 38292726a701SXin LI>0 ulelong 0 PVRTC 2bpp RGB 38302726a701SXin LI>0 ulelong 1 PVRTC 2bpp RGBA 38312726a701SXin LI>0 ulelong 2 PVRTC 4bpp RGB 38322726a701SXin LI>0 ulelong 3 PVRTC 4bpp RGBA 38332726a701SXin LI>0 ulelong 4 PVRTC-II 2bpp 38342726a701SXin LI>0 ulelong 5 PVRTC-II 4bpp 38352726a701SXin LI>0 ulelong 6 ETC1 38362726a701SXin LI>0 ulelong 7 DXT1 38372726a701SXin LI>0 ulelong 8 DXT2 38382726a701SXin LI>0 ulelong 9 DXT3 38392726a701SXin LI>0 ulelong 10 DXT4 38402726a701SXin LI>0 ulelong 11 DXT5 38412726a701SXin LI>0 ulelong 12 BC4 38422726a701SXin LI>0 ulelong 13 BC5 38432726a701SXin LI>0 ulelong 14 BC6 38442726a701SXin LI>0 ulelong 15 BC7 38452726a701SXin LI>0 ulelong 16 UYVY 38462726a701SXin LI>0 ulelong 17 YUY2 38472726a701SXin LI>0 ulelong 18 BW1bpp 38482726a701SXin LI>0 ulelong 19 R9G9B9E5 Shared Exponent 38492726a701SXin LI>0 ulelong 20 RGBG8888 38502726a701SXin LI>0 ulelong 21 GRGB8888 38512726a701SXin LI>0 ulelong 22 ETC2 RGB 38522726a701SXin LI>0 ulelong 23 ETC2 RGBA 38532726a701SXin LI>0 ulelong 24 ETC2 RGB A1 38542726a701SXin LI>0 ulelong 25 EAC R11 38552726a701SXin LI>0 ulelong 26 EAC RG11 38562726a701SXin LI>0 ulelong 27 ASTC_4x4 38572726a701SXin LI>0 ulelong 28 ASTC_5x4 38582726a701SXin LI>0 ulelong 29 ASTC_5x5 38592726a701SXin LI>0 ulelong 30 ASTC_6x5 38602726a701SXin LI>0 ulelong 31 ASTC_6x6 38612726a701SXin LI>0 ulelong 32 ASTC_8x5 38622726a701SXin LI>0 ulelong 33 ASTC_8x6 38632726a701SXin LI>0 ulelong 34 ASTC_8x8 38642726a701SXin LI>0 ulelong 35 ASTC_10x5 38652726a701SXin LI>0 ulelong 36 ASTC_10x6 38662726a701SXin LI>0 ulelong 37 ASTC_10x8 38672726a701SXin LI>0 ulelong 38 ASTC_10x10 38682726a701SXin LI>0 ulelong 39 ASTC_12x10 38692726a701SXin LI>0 ulelong 40 ASTC_12x12 38702726a701SXin LI>0 ulelong 41 ASTC_3x3x3 38712726a701SXin LI>0 ulelong 42 ASTC_4x3x3 38722726a701SXin LI>0 ulelong 43 ASTC_4x4x3 38732726a701SXin LI>0 ulelong 44 ASTC_4x4x4 38742726a701SXin LI>0 ulelong 45 ASTC_5x4x4 38752726a701SXin LI>0 ulelong 46 ASTC_5x5x4 38762726a701SXin LI>0 ulelong 47 ASTC_5x5x5 38772726a701SXin LI>0 ulelong 48 ASTC_6x5x5 38782726a701SXin LI>0 ulelong 49 ASTC_6x6x5 38792726a701SXin LI>0 ulelong 50 ASTC_6x6x6 388048c779cdSXin LI 38812726a701SXin LI0 string PVR\x03 PowerVR 3.0 texture: 388248c779cdSXin LI>0x18 ulelong x %u x 388348c779cdSXin LI>0x1C ulelong x %u 388448c779cdSXin LI>0x20 ulelong >1 x %u 3885a4d6d3b8SXin LI>0x08 ubyte x \b, 38862726a701SXin LI>0x0C ulelong 0 38872726a701SXin LI>>0x08 use pvr3-pixel-format 38882726a701SXin LI>0x0C ulelong !0 3889a4d6d3b8SXin LI>>0x08 ubyte !0 %c 3890a4d6d3b8SXin LI>>>0x0C ubyte !0 \b%u 3891a4d6d3b8SXin LI>>0x09 ubyte !0 \b%c 3892a4d6d3b8SXin LI>>>0x0D ubyte !0 \b%u 3893a4d6d3b8SXin LI>>0x0A ubyte !0 \b%c 3894a4d6d3b8SXin LI>>>0x0E ubyte !0 \b%u 3895a4d6d3b8SXin LI>>0x0B ubyte !0 \b%c 3896a4d6d3b8SXin LI>>>0x0F ubyte !0 \b%u 389748c779cdSXin LI>0x10 ulelong 1 \b, sRGB 389848c779cdSXin LI>0x04 ulelong&0x02 0x02 \b, premultiplied alpha 389948c779cdSXin LI 39002726a701SXin LI0 string \x03RVP PowerVR 3.0 texture: BE, 39012726a701SXin LI>0x18 ubelong x %u x 39022726a701SXin LI>0x1C ubelong x %u 39032726a701SXin LI>0x20 ubelong >1 x %u 3904a4d6d3b8SXin LI>0x08 ubyte x \b, 39052726a701SXin LI>0x0C ubelong 0 39062726a701SXin LI>>0x08 use pvr3-pixel-format 39072726a701SXin LI>0x0C ubelong !0 3908a4d6d3b8SXin LI>>0x0B ubyte !0 %c 3909a4d6d3b8SXin LI>>>0x0F ubyte !0 \b%u 3910a4d6d3b8SXin LI>>0x0A ubyte !0 \b%c 3911a4d6d3b8SXin LI>>>0x0E ubyte !0 \b%u 3912a4d6d3b8SXin LI>>0x09 ubyte !0 \b%c 3913a4d6d3b8SXin LI>>>0x0D ubyte !0 \b%u 3914a4d6d3b8SXin LI>>0x08 ubyte !0 \b%c 3915a4d6d3b8SXin LI>>>0x0C ubyte !0 \b%u 39162726a701SXin LI>0x10 ubelong 1 \b, sRGB 39172726a701SXin LI>0x04 ubelong&0x02 0x02 \b, premultiplied alpha 39182726a701SXin LI 391948c779cdSXin LI# Type: Microsoft Xbox XPR0 texture. 392048c779cdSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 392148c779cdSXin LI# References: 392248c779cdSXin LI# - https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/develop/src/core/hle/D3D8/XbD3D8Types.h 392348c779cdSXin LI 392448c779cdSXin LI# XPR pixel formats. 392548c779cdSXin LI0 name xbox-xpr-pixel-format 3926a4d6d3b8SXin LI>0 ubyte 0x00 L8 3927a4d6d3b8SXin LI>0 ubyte 0x01 AL8 3928a4d6d3b8SXin LI>0 ubyte 0x02 ARGB1555 3929a4d6d3b8SXin LI>0 ubyte 0x03 RGB555 3930a4d6d3b8SXin LI>0 ubyte 0x04 ARGB4444 3931a4d6d3b8SXin LI>0 ubyte 0x05 RGB565 3932a4d6d3b8SXin LI>0 ubyte 0x06 ARGB8888 3933a4d6d3b8SXin LI>0 ubyte 0x07 xRGB8888 3934a4d6d3b8SXin LI>0 ubyte 0x0B P8 3935a4d6d3b8SXin LI>0 ubyte 0x0C DXT1 3936a4d6d3b8SXin LI>0 ubyte 0x0E DXT2 3937a4d6d3b8SXin LI>0 ubyte 0x0F DXT4 3938a4d6d3b8SXin LI>0 ubyte 0x10 Linear ARGB1555 3939a4d6d3b8SXin LI>0 ubyte 0x11 Linear RGB565 3940a4d6d3b8SXin LI>0 ubyte 0x12 Linear ARGB8888 3941a4d6d3b8SXin LI>0 ubyte 0x13 Linear L8 3942a4d6d3b8SXin LI>0 ubyte 0x16 Linear R8B8 3943a4d6d3b8SXin LI>0 ubyte 0x17 Linear G8B8 3944a4d6d3b8SXin LI>0 ubyte 0x19 A8 3945a4d6d3b8SXin LI>0 ubyte 0x1A A8L8 3946a4d6d3b8SXin LI>0 ubyte 0x1B Linear AL8 3947a4d6d3b8SXin LI>0 ubyte 0x1C Linear RGB555 3948a4d6d3b8SXin LI>0 ubyte 0x1D Linear ARGB4444 3949a4d6d3b8SXin LI>0 ubyte 0x1E Linear xRGB8888 3950a4d6d3b8SXin LI>0 ubyte 0x1F Linear A8 3951a4d6d3b8SXin LI>0 ubyte 0x20 Linear A8L8 3952a4d6d3b8SXin LI>0 ubyte 0x24 YUY2 3953a4d6d3b8SXin LI>0 ubyte 0x25 UYVY 3954a4d6d3b8SXin LI>0 ubyte 0x27 L6V5U5 3955a4d6d3b8SXin LI>0 ubyte 0x28 V8U8 3956a4d6d3b8SXin LI>0 ubyte 0x29 R8B8 3957a4d6d3b8SXin LI>0 ubyte 0x2A D24S8 3958a4d6d3b8SXin LI>0 ubyte 0x2B F24S8 3959a4d6d3b8SXin LI>0 ubyte 0x2C D16 3960a4d6d3b8SXin LI>0 ubyte 0x2D F16 3961a4d6d3b8SXin LI>0 ubyte 0x2E Linear D24S8 3962a4d6d3b8SXin LI>0 ubyte 0x2F Linear F24S8 3963a4d6d3b8SXin LI>0 ubyte 0x30 Linear D16 3964a4d6d3b8SXin LI>0 ubyte 0x31 Linear F16 3965a4d6d3b8SXin LI>0 ubyte 0x32 L16 3966a4d6d3b8SXin LI>0 ubyte 0x33 V16U16 3967a4d6d3b8SXin LI>0 ubyte 0x35 Linear L16 3968a4d6d3b8SXin LI>0 ubyte 0x36 Linear V16U16 3969a4d6d3b8SXin LI>0 ubyte 0x37 Linear L6V5U5 3970a4d6d3b8SXin LI>0 ubyte 0x38 RGBA5551 3971a4d6d3b8SXin LI>0 ubyte 0x39 RGBA4444 3972a4d6d3b8SXin LI>0 ubyte 0x3A QWVU8888 3973a4d6d3b8SXin LI>0 ubyte 0x3B BGRA8888 3974a4d6d3b8SXin LI>0 ubyte 0x3C RGBA8888 3975a4d6d3b8SXin LI>0 ubyte 0x3D Linear RGBA5551 3976a4d6d3b8SXin LI>0 ubyte 0x3E Linear RGBA4444 3977a4d6d3b8SXin LI>0 ubyte 0x3F Linear ABGR8888 3978a4d6d3b8SXin LI>0 ubyte 0x40 Linear BGRA8888 3979a4d6d3b8SXin LI>0 ubyte 0x41 Linear RGBA8888 3980a4d6d3b8SXin LI>0 ubyte 0x64 Vertex Data 398148c779cdSXin LI 398248c779cdSXin LI0 string XPR0 Microsoft Xbox XPR0 texture 3983a4d6d3b8SXin LI>0x19 ubyte x \b, format: 398448c779cdSXin LI>>0x19 use xbox-xpr-pixel-format 3985d38c30c0SXin LI 3986d38c30c0SXin LI# ILDA Image Data Transfer Format 3987d38c30c0SXin LI# https://www.ilda.com/resources/StandardsDocs/ILDA_IDTF14_rev011.pdf 3988d38c30c0SXin LI# 3989d38c30c0SXin LI# Updated by Chuck Hein (laser@geekdude.com) 3990d38c30c0SXin LI# 3991d38c30c0SXin LI0 string ILDA ILDA Image Data Transfer Format 3992a4d6d3b8SXin LI>7 ubyte 0x00 3D Coordinates with Indexed Color 3993a4d6d3b8SXin LI>7 ubyte 0x01 2D Coordinates with Indexed Color 3994a4d6d3b8SXin LI>7 ubyte 0x02 Color Palette 3995a4d6d3b8SXin LI>7 ubyte 0x04 3D Coordinates with True Color 3996a4d6d3b8SXin LI>7 ubyte 0x05 2D Coordinates with True Color 3997d38c30c0SXin LI>8 string >0 \b, palette %s 3998d38c30c0SXin LI>16 string >0 \b, company %s 3999a4d6d3b8SXin LI>24 ubeshort >0 \b, number of records %d 4000a4d6d3b8SXin LI>>26 ubeshort x \b, palette number %d 4001a4d6d3b8SXin LI>>28 ubeshort >0 \b, number of frames %d 4002a4d6d3b8SXin LI>>30 ubyte >0 \b, projector number %d 4003d38c30c0SXin LI 4004d38c30c0SXin LI# Dropbox "lepton" compressed jpeg format 4005d38c30c0SXin LI# https://github.com/dropbox/lepton 4006a4d6d3b8SXin LI0 ubelong&0xfffff0ff 0xcf84005a Lepton image file 4007a4d6d3b8SXin LI>2 ubyte x (version %d) 40082726a701SXin LI 40092726a701SXin LI# Apple QuickTake camera raw images 40102726a701SXin LI# https://en.wikipedia.org/wiki/Apple_QuickTake 40112726a701SXin LI# dcraw can decode them 40122726a701SXin LI0 name quicktake 4013a4d6d3b8SXin LI>4 ubelong 8 4014a4d6d3b8SXin LI>>544 ubeshort x \b, %dx 4015a4d6d3b8SXin LI>>546 ubeshort x \b%d 4016a4d6d3b8SXin LI>4 ubelong 4 4017a4d6d3b8SXin LI>>546 ubeshort x \b, %dx 4018a4d6d3b8SXin LI>>544 ubeshort x \b%d 40192726a701SXin LI 40202726a701SXin LI0 string qktk Apple QuickTake 100 Raw Image 40212726a701SXin LI>0 use quicktake 40222726a701SXin LI 40232726a701SXin LI0 string qktn 4024a4d6d3b8SXin LI>4 ubyte 0 Apple QuickTake 150 Raw Image 4025a4d6d3b8SXin LI>4 ubyte >0 Apple QuickTake 200 Raw Image 40262726a701SXin LI>0 use quicktake 402743a5ec4eSXin LI 402843a5ec4eSXin LI# From: Joerg Jenderek 402943a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/Corel_Photo-Paint_image 403043a5ec4eSXin LI# Reference: http://blog.argasinski.eu/wp-content/uploads/2011/08/cpt-specification-0.01.pdf 403143a5ec4eSXin LI0 string CPT 403243a5ec4eSXin LI>4 string FILE Corel Photo-Paint image, version 403343a5ec4eSXin LI# version like 7, 9 or 8 403443a5ec4eSXin LI>>3 ubyte x %c, 403543a5ec4eSXin LI!:mime image/x-corel-cpt 403643a5ec4eSXin LI!:ext cpt 403743a5ec4eSXin LI# if blocks_array_offset available jump blockNumber*8 bytes 403843a5ec4eSXin LI>>0x34 ulelong >0 403943a5ec4eSXin LI>>>(0x28.l*8) ubyte x 404043a5ec4eSXin LI# jump additional stored blocks_array_offset bytes forward to object block 404143a5ec4eSXin LI>>>>&(0x34.l-1) ulelong x %u 404243a5ec4eSXin LI# object height in pixels 404343a5ec4eSXin LI>>>>>&0 ulelong x x %u 404443a5ec4eSXin LI# if no blocks_array_offset available jump blockNumber*8 bytes 404543a5ec4eSXin LI>>0x34 ulelong =0 404643a5ec4eSXin LI>>>(0x28.l*8) ubyte x 404743a5ec4eSXin LI# jump additional 0x13C bytes forward to object block 404843a5ec4eSXin LI>>>>&0x13B ulelong x %u 404943a5ec4eSXin LI>>>>>&0 ulelong x x %u 405043a5ec4eSXin LI# image color model used 405143a5ec4eSXin LI>>0x8 ulelong x 405243a5ec4eSXin LI>>>0x8 ulelong 0x1 RGB 24 bits 405343a5ec4eSXin LI>>>0x8 ulelong 0x3 CMYK 24 bits 405443a5ec4eSXin LI>>>0x8 ulelong 0x5 greyscale 8 bits 405543a5ec4eSXin LI>>>0x8 ulelong 0x6 black and white 1 bit 405643a5ec4eSXin LI>>>0x8 ulelong 0xA RGB 8 bits 405743a5ec4eSXin LI# palette_length number of colors * 3 in case of 8-bit RGB paletted image 405843a5ec4eSXin LI# 0 otherwise. Allowed values: 0 or [1..256] * 3 405943a5ec4eSXin LI#>>0xC ulelong >0 \b, palette length %u 406043a5ec4eSXin LI>>>>0xC ulelong/3 <256 \b, %u colors 406143a5ec4eSXin LI>>>0x8 ulelong 0xB LAB 406243a5ec4eSXin LI>>>0x8 ulelong 0xC RGB 48 bits 406343a5ec4eSXin LI>>>0x8 ulelong 0xE greyscale 16 bits 406443a5ec4eSXin LI# this should not happen 406543a5ec4eSXin LI>>>0x8 default x color model 406643a5ec4eSXin LI>>>>0x8 ulelong x %#x 406743a5ec4eSXin LI# bit 1 in CPT file flags: UCS-2 file comment present 406843a5ec4eSXin LI>>0x31 ubyte &0x02 406943a5ec4eSXin LI# look for comment marker 407043a5ec4eSXin LI>>>0x100 search/0xc9d \4\2\0\0 407143a5ec4eSXin LI# UCS-2 file comment 407243a5ec4eSXin LI>>>>&0 lestring16 x "%s" 407343a5ec4eSXin LI# if no UCS-2 is present show ANSI file comment[112] if available 407443a5ec4eSXin LI>>0x31 ubyte&0x02 =0 407543a5ec4eSXin LI>>>0x3C string >\0 "%-.112s" 407643a5ec4eSXin LI# reserved seems to be always 0 407743a5ec4eSXin LI#>>0x10 ulelong >0 \b, reserved1 %u 407843a5ec4eSXin LI# horizontal real dpi = dpi_h * 25.4 / 10**6 407943a5ec4eSXin LI>>0x18 ulelong x \b, %u micro dots/mm 408043a5ec4eSXin LI# image vertical DPI in CPT DPI unit 408143a5ec4eSXin LI#>>0x1C ulelong x \b, %u micro dots/mm 408243a5ec4eSXin LI# reserved seems to be always 0 408343a5ec4eSXin LI#>>0x20 ulelong >0 \b, reserved2 %u 408443a5ec4eSXin LI#>>0x24 ulelong >0 \b, reserved3 %u 408543a5ec4eSXin LI# blocks_count; number of CPT_Block blocks. Allowed values: > 0 408643a5ec4eSXin LI>>0x28 ulelong x \b, %u block 408743a5ec4eSXin LI# plural s 408843a5ec4eSXin LI>>0x28 ulelong !1 \bs 408943a5ec4eSXin LI# CPT file flags 409043a5ec4eSXin LI# lower byte of CPT file flags: 0x94~CPT9FILE 0x01~often CPT7FILE 0x8C~CPT8FILE 409143a5ec4eSXin LI#>>0x30 ubyte x \b, lower flags %#x 409243a5ec4eSXin LI# upper byte of CPT file flags: 409343a5ec4eSXin LI#>>0x31 ubyte >0 \b, upper flags %#x 409443a5ec4eSXin LI# bit 2 in CPT file flags: unknown 409543a5ec4eSXin LI#>>0x31 ubyte &0x04 \b, with UNKNOWN 409643a5ec4eSXin LI# bits 3-7 in CPT file flags: unknown, seem to be often 0 409743a5ec4eSXin LI# show unusual flag combinations 409843a5ec4eSXin LI>>0x31 ubyte&0xFC >0 409943a5ec4eSXin LI>>>0x30 uleshort x \b, flags %#4.4x 410043a5ec4eSXin LI# reserved seems to be always 0 410143a5ec4eSXin LI#>>0x32 uleshort >0 \b, reserved4 %#x 410243a5ec4eSXin LI# blocks_array_offset is always 0 for CPT7 and CPT8 files created by PP7-PP8 410343a5ec4eSXin LI# typical values like: 13Ch 154h 43Ch 4F0h DA8h 410443a5ec4eSXin LI>>0x34 ulelong x \b, array offset %#x 410543a5ec4eSXin LI# reserved seems to be often 0 410643a5ec4eSXin LI>>0x38 ulelong >0 \b, reserved5 %#x 410743a5ec4eSXin LI# possible next master block 410843a5ec4eSXin LI#>>0x100 ubequad !0 \b, next block=%#llx... 410943a5ec4eSXin LI# bit 0: ICC profile block present 411043a5ec4eSXin LI>>0x31 ubyte &0x01 \b, with ICC profile 411143a5ec4eSXin LI# check for characteristic string acsp of color profile for DEBUGGING 411243a5ec4eSXin LI#>>>0x178 string x icc=%.4s 411343a5ec4eSXin LI# display ICC/ICM color profile by ./icc 411443a5ec4eSXin LI#>>>0x154 use color-profile 411543a5ec4eSXin LI 4116898496eeSXin LI# URL: http://fileformats.archiveteam.org/wiki/CorelDRAW 4117898496eeSXin LI# https://en.wikipedia.org/wiki/CorelDRAW 4118898496eeSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cdr-gen.trid.xml 4119898496eeSXin LI# Note: called "CorelDRAW drawing (generic)" by TrID 4120898496eeSXin LI# version til 2 WL-based; from version 3 til 13 handled by ./riff and from 14 zip based handled by ./archive 4121898496eeSXin LI0 ubelong&0xFFffF7ff 0x574C6500 Corel Draw Picture 4122898496eeSXin LI#!:mime image/x-coreldraw 4123898496eeSXin LI!:mime application/vnd.corel-draw 4124898496eeSXin LI!:ext cdr 4125898496eeSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cdr-corel-10.trid.xml 4126898496eeSXin LI# Note: called "CorelDRAW drawing (v1.0)" by TrID and 4127898496eeSXin LI# "CorelDraw Drawing" with version "1.0" by DROID via PUID fmt/467 4128898496eeSXin LI# only DROID fmt-467-signature-id-726.cdr example 4129898496eeSXin LI>2 ubyte 0x65 \b, version 1.0 4130898496eeSXin LI#>>4 ubelong !0x45000000 \b, at 4 %#8.8x 4131898496eeSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cdr-corel-20.trid.xml 4132898496eeSXin LI# Note: called "CorelDRAW drawing (v2.0)" by TrID and 4133898496eeSXin LI# "CorelDraw Drawing" with version "2.0" by DROID via PUID fmt/466 4134898496eeSXin LI>2 ubyte 0x6D \b, version 2.0 4135898496eeSXin LI# According to DROID 0xed080000 or 0x25050000 4136898496eeSXin LI#>>4 ubelong !0xed080000 4137898496eeSXin LI#>>>4 ubelong !0x25050000 \b, at 4 %#8.8x 4138898496eeSXin LI 413943a5ec4eSXin LI# Type: Crunch compressed texture. 414043a5ec4eSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 414143a5ec4eSXin LI# References: 414243a5ec4eSXin LI# - https://github.com/BinomialLLC/crunch/blob/44c8402e24441c7524ca364941fd224ab3b971e9/inc/crn_decomp.h#L267 414343a5ec4eSXin LI0 ubelong 0x4878004A Crunch compressed texture: 414443a5ec4eSXin LI>0x0C ubeshort x %u x 414543a5ec4eSXin LI>0x0E ubeshort x %u 414643a5ec4eSXin LI>0x12 ubyte 0 \b, DXT1 414743a5ec4eSXin LI>0x12 ubyte 1 \b, DXT3 414843a5ec4eSXin LI>0x12 ubyte 2 \b, DXT5 414943a5ec4eSXin LI>0x12 ubyte 3 \b, DXT5 CCxY 415043a5ec4eSXin LI>0x12 ubyte 4 \b, DXT5 xGxR 415143a5ec4eSXin LI>0x12 ubyte 5 \b, DXT5 xGBR 415243a5ec4eSXin LI>0x12 ubyte 6 \b, DXT5 AGBR 415343a5ec4eSXin LI>0x12 ubyte 7 \b, DXn XY 415443a5ec4eSXin LI>0x12 ubyte 8 \b, DXn YX 415543a5ec4eSXin LI>0x12 ubyte 9 \b, DXT5 Alpha 415643a5ec4eSXin LI>0x12 ubyte 10 \b, ETC1 415743a5ec4eSXin LI>0x10 ubyte >1 \b, %u images 415843a5ec4eSXin LI>0x11 ubyte >1 \b, %u faces 415943a5ec4eSXin LI# TODO: Flags at 0x13? (ubeshort) 416043a5ec4eSXin LI 416143a5ec4eSXin LI# Type: BasisLZ compressed texture. 416243a5ec4eSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 416343a5ec4eSXin LI# References: 416443a5ec4eSXin LI# - https://github.com/BinomialLLC/basis_universal/blob/master/spec/basis_spec.txt 416543a5ec4eSXin LI0 uleshort 0x4273 416643a5ec4eSXin LI>0x04 uleshort 0x4D BasisLZ 416743a5ec4eSXin LI>>0x02 uleshort x v%x compressed texture: 416843a5ec4eSXin LI>>0x14 ubyte 0 ETC1S 416943a5ec4eSXin LI>>0x14 ubyte 1 UASTC 4x4 417043a5ec4eSXin LI>>0x0E ulelong&0xFFFFFF >1 \b, %u slices 417143a5ec4eSXin LI>>0x11 ulelong&0xFFFFFF >1 \b, %u images 417243a5ec4eSXin LI>>0x15 uleshort&0x02 2 \b, Y-flipped 417343a5ec4eSXin LI 417443a5ec4eSXin LI# MIME registration: https://www.iana.org/assignments/media-types/model/e57 417543a5ec4eSXin LI# Sample files: http://www.libe57.org/data.html 417643a5ec4eSXin LI# Reference implementation: http://www.libe57.org/ 417743a5ec4eSXin LI# https://www.ri.cmu.edu/pub_files/2011/1/2011-huber-e57-v3.pdf 417843a5ec4eSXin LI0 string ASTM-E57 ASTM E57 three-dimensional model 417943a5ec4eSXin LI!:mime model/e57 418043a5ec4eSXin LI!:ext e57 4181a4d6d3b8SXin LI 4182a4d6d3b8SXin LI# QOI [Quite OK Image Format] images 4183a4d6d3b8SXin LI# (Horia Mihai David, mihaidavid@posteo.net) 4184a4d6d3b8SXin LI# 4185a4d6d3b8SXin LI# QOI format by Dominic Szablewski <http://phoboslab.org/> 4186a4d6d3b8SXin LI# <https://qoiformat.org/> 4187a4d6d3b8SXin LI# 4188a4d6d3b8SXin LI# Based on spec v1.0 (2022.01.05) <https://qoiformat.org/qoi-specification.pdf> 4189a4d6d3b8SXin LI 4190a4d6d3b8SXin LI0 string qoif QOI image data 4191a4d6d3b8SXin LI!:ext qoi 4192a4d6d3b8SXin LI!:mime image/x-qoi 4193a4d6d3b8SXin LI# See <https://github.com/phoboslab/qoi/issues/167> 4194a4d6d3b8SXin LI>4 ubelong x %ux 4195a4d6d3b8SXin LI>8 ubelong x \b%u, 4196a4d6d3b8SXin LI>>13 ubyte 0 s 4197a4d6d3b8SXin LI>>>12 ubyte 3 \bRGB 4198a4d6d3b8SXin LI>>>12 ubyte 4 \bRGBA 4199a4d6d3b8SXin LI>>>12 default x 4200a4d6d3b8SXin LI>>>>12 ubyte x \b*bad channels %u* 4201a4d6d3b8SXin LI>>>13 ubyte 0 (linear alpha) 4202a4d6d3b8SXin LI>>13 ubyte 1 4203a4d6d3b8SXin LI>>>12 ubyte 3 RGB 4204a4d6d3b8SXin LI>>>12 ubyte 4 RGBA 4205a4d6d3b8SXin LI>>>13 ubyte 1 (all channels linear) 4206a4d6d3b8SXin LI>>13 default x 4207a4d6d3b8SXin LI>>>13 ubyte x *bad colorspace %u* 4208a4d6d3b8SXin LI 4209a4d6d3b8SXin LI 4210*ae316d1dSXin LI# Type: Godot 3 texture (pixel format) 4211a4d6d3b8SXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 4212*ae316d1dSXin LI0 name godot-pixel-format-v3 4213a4d6d3b8SXin LI>0 ulelong&0xFFFFF 0 L8 4214a4d6d3b8SXin LI>0 ulelong&0xFFFFF 1 LA8 4215a4d6d3b8SXin LI>0 ulelong&0xFFFFF 2 R8 4216a4d6d3b8SXin LI>0 ulelong&0xFFFFF 3 RG8 4217a4d6d3b8SXin LI>0 ulelong&0xFFFFF 4 RGB8 4218a4d6d3b8SXin LI>0 ulelong&0xFFFFF 5 RGBA8 4219a4d6d3b8SXin LI>0 ulelong&0xFFFFF 6 RGBA4444 4220a4d6d3b8SXin LI>0 ulelong&0xFFFFF 7 RGB565 4221a4d6d3b8SXin LI>0 ulelong&0xFFFFF 8 RF 4222a4d6d3b8SXin LI>0 ulelong&0xFFFFF 9 RGF 4223a4d6d3b8SXin LI>0 ulelong&0xFFFFF 10 RGBF 4224a4d6d3b8SXin LI>0 ulelong&0xFFFFF 11 RGBAF 4225a4d6d3b8SXin LI>0 ulelong&0xFFFFF 12 RH 4226a4d6d3b8SXin LI>0 ulelong&0xFFFFF 13 RGH 4227a4d6d3b8SXin LI>0 ulelong&0xFFFFF 14 RGBH 4228a4d6d3b8SXin LI>0 ulelong&0xFFFFF 15 RGBAH 4229a4d6d3b8SXin LI>0 ulelong&0xFFFFF 16 RGBE9995 4230a4d6d3b8SXin LI>0 ulelong&0xFFFFF 17 DXT1 4231a4d6d3b8SXin LI>0 ulelong&0xFFFFF 18 DXT3 4232a4d6d3b8SXin LI>0 ulelong&0xFFFFF 19 DXT5 4233a4d6d3b8SXin LI>0 ulelong&0xFFFFF 20 RGTC_R 4234a4d6d3b8SXin LI>0 ulelong&0xFFFFF 21 RGTC_RG 4235a4d6d3b8SXin LI>0 ulelong&0xFFFFF 22 BPTC_RGBA 4236a4d6d3b8SXin LI>0 ulelong&0xFFFFF 23 BPTC_RGBF 4237a4d6d3b8SXin LI>0 ulelong&0xFFFFF 24 BPTC_RGBFU 4238a4d6d3b8SXin LI>0 ulelong&0xFFFFF 25 PVRTC1_2 4239a4d6d3b8SXin LI>0 ulelong&0xFFFFF 26 PVRTC1_2A 4240a4d6d3b8SXin LI>0 ulelong&0xFFFFF 27 PVRTC1_4 4241a4d6d3b8SXin LI>0 ulelong&0xFFFFF 28 PVRTC1_4A 4242a4d6d3b8SXin LI>0 ulelong&0xFFFFF 29 ETC 4243a4d6d3b8SXin LI>0 ulelong&0xFFFFF 30 ETC2_R11 4244a4d6d3b8SXin LI>0 ulelong&0xFFFFF 31 ETC2_R11S 4245a4d6d3b8SXin LI>0 ulelong&0xFFFFF 32 ETC2_RG11 4246a4d6d3b8SXin LI>0 ulelong&0xFFFFF 33 ETC2_RG11S 4247a4d6d3b8SXin LI>0 ulelong&0xFFFFF 34 ETC2_RGB8 4248a4d6d3b8SXin LI>0 ulelong&0xFFFFF 35 ETC2_RGBA8 4249a4d6d3b8SXin LI>0 ulelong&0xFFFFF 36 ETC2_RGB8A1 4250*ae316d1dSXin LI# NOTE: This is a custom pixel format used by Sonic Colors Ultimate. 4251*ae316d1dSXin LI# Godot 4 later added its own ASTC format values. 4252a4d6d3b8SXin LI>0 ulelong&0xFFFFF 37 ASTC_8x8 4253a4d6d3b8SXin LI 4254*ae316d1dSXin LI# Type: Godot 4 texture (pixel format) 4255*ae316d1dSXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 4256*ae316d1dSXin LI# NOTE: This is a custom pixel format used by Sonic Colors Ultimate. 4257*ae316d1dSXin LI# Godot 4 later added its own ASTC format values. 4258*ae316d1dSXin LI0 name godot-pixel-format-v4 4259*ae316d1dSXin LI>0 ulelong&0xFFFFF 0 L8 4260*ae316d1dSXin LI>0 ulelong&0xFFFFF 1 LA8 4261*ae316d1dSXin LI>0 ulelong&0xFFFFF 2 R8 4262*ae316d1dSXin LI>0 ulelong&0xFFFFF 3 RG8 4263*ae316d1dSXin LI>0 ulelong&0xFFFFF 4 RGB8 4264*ae316d1dSXin LI>0 ulelong&0xFFFFF 5 RGBA8 4265*ae316d1dSXin LI>0 ulelong&0xFFFFF 6 RGBA4444 4266*ae316d1dSXin LI>0 ulelong&0xFFFFF 7 RGB565 4267*ae316d1dSXin LI>0 ulelong&0xFFFFF 8 RF 4268*ae316d1dSXin LI>0 ulelong&0xFFFFF 9 RGF 4269*ae316d1dSXin LI>0 ulelong&0xFFFFF 10 RGBF 4270*ae316d1dSXin LI>0 ulelong&0xFFFFF 11 RGBAF 4271*ae316d1dSXin LI>0 ulelong&0xFFFFF 12 RH 4272*ae316d1dSXin LI>0 ulelong&0xFFFFF 13 RGH 4273*ae316d1dSXin LI>0 ulelong&0xFFFFF 14 RGBH 4274*ae316d1dSXin LI>0 ulelong&0xFFFFF 15 RGBAH 4275*ae316d1dSXin LI>0 ulelong&0xFFFFF 16 RGBE9995 4276*ae316d1dSXin LI>0 ulelong&0xFFFFF 17 DXT1 4277*ae316d1dSXin LI>0 ulelong&0xFFFFF 18 DXT3 4278*ae316d1dSXin LI>0 ulelong&0xFFFFF 19 DXT5 4279*ae316d1dSXin LI>0 ulelong&0xFFFFF 20 RGTC_R 4280*ae316d1dSXin LI>0 ulelong&0xFFFFF 21 RGTC_RG 4281*ae316d1dSXin LI>0 ulelong&0xFFFFF 22 BPTC_RGBA 4282*ae316d1dSXin LI>0 ulelong&0xFFFFF 23 BPTC_RGBF 4283*ae316d1dSXin LI>0 ulelong&0xFFFFF 24 BPTC_RGBFU 4284*ae316d1dSXin LI>0 ulelong&0xFFFFF 25 ETC 4285*ae316d1dSXin LI>0 ulelong&0xFFFFF 36 ETC2_R11 4286*ae316d1dSXin LI>0 ulelong&0xFFFFF 27 ETC2_R11S 4287*ae316d1dSXin LI>0 ulelong&0xFFFFF 28 ETC2_RG11 4288*ae316d1dSXin LI>0 ulelong&0xFFFFF 29 ETC2_RG11S 4289*ae316d1dSXin LI>0 ulelong&0xFFFFF 30 ETC2_RGB8 4290*ae316d1dSXin LI>0 ulelong&0xFFFFF 31 ETC2_RGBA8 4291*ae316d1dSXin LI>0 ulelong&0xFFFFF 32 ETC2_RGB8A1 4292*ae316d1dSXin LI>0 ulelong&0xFFFFF 33 ETC2_RA_AS_RG 4293*ae316d1dSXin LI>0 ulelong&0xFFFFF 34 DXT5_RA_AS_RG 4294*ae316d1dSXin LI>0 ulelong&0xFFFFF 35 ASTC_4x4 4295*ae316d1dSXin LI>0 ulelong&0xFFFFF 36 ASTC_4x4_HDR 4296*ae316d1dSXin LI>0 ulelong&0xFFFFF 37 ASTC_8x8 4297*ae316d1dSXin LI>0 ulelong&0xFFFFF 38 ASTC_8x8_HDR 4298*ae316d1dSXin LI 4299a4d6d3b8SXin LI# Type: Godot 3, 4 texture (rescale display, width) 4300a4d6d3b8SXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 4301a4d6d3b8SXin LI# Shows rescale value if it's not a power of 2. 4302a4d6d3b8SXin LI0 name godot-rescale-display-w 4303a4d6d3b8SXin LI>0 uleshort 0 4304a4d6d3b8SXin LI>0 uleshort 1 4305a4d6d3b8SXin LI>0 uleshort 2 4306a4d6d3b8SXin LI>0 uleshort 4 4307a4d6d3b8SXin LI>0 uleshort 8 4308a4d6d3b8SXin LI>0 uleshort 16 4309a4d6d3b8SXin LI>0 uleshort 32 4310a4d6d3b8SXin LI>0 uleshort 64 4311a4d6d3b8SXin LI>0 uleshort 128 4312a4d6d3b8SXin LI>0 uleshort 256 4313a4d6d3b8SXin LI>0 uleshort 512 4314a4d6d3b8SXin LI>0 uleshort 1024 4315a4d6d3b8SXin LI>0 uleshort 2048 4316a4d6d3b8SXin LI>0 uleshort 4096 4317a4d6d3b8SXin LI>0 uleshort 8192 4318a4d6d3b8SXin LI>0 uleshort 16384 4319a4d6d3b8SXin LI>0 uleshort 32768 4320a4d6d3b8SXin LI>0 default x 4321a4d6d3b8SXin LI>>0 uleshort x (rescale to %u x 4322a4d6d3b8SXin LI 4323a4d6d3b8SXin LI# Type: Godot 3, 4 texture (rescale display, height) 4324a4d6d3b8SXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 4325a4d6d3b8SXin LI# Shows rescale value if it's not a power of 2. 4326a4d6d3b8SXin LI0 name godot-rescale-display-h 4327a4d6d3b8SXin LI>0 clear x 4328a4d6d3b8SXin LI>0 uleshort 0 4329a4d6d3b8SXin LI>0 uleshort 1 4330a4d6d3b8SXin LI>0 uleshort 2 4331a4d6d3b8SXin LI>0 uleshort 4 4332a4d6d3b8SXin LI>0 uleshort 8 4333a4d6d3b8SXin LI>0 uleshort 16 4334a4d6d3b8SXin LI>0 uleshort 32 4335a4d6d3b8SXin LI>0 uleshort 64 4336a4d6d3b8SXin LI>0 uleshort 128 4337a4d6d3b8SXin LI>0 uleshort 256 4338a4d6d3b8SXin LI>0 uleshort 512 4339a4d6d3b8SXin LI>0 uleshort 1024 4340a4d6d3b8SXin LI>0 uleshort 2048 4341a4d6d3b8SXin LI>0 uleshort 4096 4342a4d6d3b8SXin LI>0 uleshort 8192 4343a4d6d3b8SXin LI>0 uleshort 16384 4344a4d6d3b8SXin LI>0 uleshort 32768 4345a4d6d3b8SXin LI>0 default x 4346a4d6d3b8SXin LI>>0 uleshort x %u) 4347a4d6d3b8SXin LI 4348a4d6d3b8SXin LI# Type: Godot 3 texture 4349a4d6d3b8SXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 4350a4d6d3b8SXin LI# References: 4351a4d6d3b8SXin LI# - https://github.com/godotengine/godot/blob/3.3/core/image.h 4352a4d6d3b8SXin LI# - https://github.com/godotengine/godot/blob/3.3/scene/resources/texture.cpp 4353a4d6d3b8SXin LI# - https://github.com/godotengine/godot/blob/3.3/scene/resources/texture.h 4354a4d6d3b8SXin LI# TODO: Don't show "rescale to" if it matches the image size. 4355a4d6d3b8SXin LI0 string GDST Godot 3 texture: 4356a4d6d3b8SXin LI!:ext stex 4357a4d6d3b8SXin LI!:mime image/x-godot-stex 4358a4d6d3b8SXin LI>4 uleshort x %u x 4359a4d6d3b8SXin LI>8 uleshort x %u 4360a4d6d3b8SXin LI>6 uleshort 0 \b, 4361a4d6d3b8SXin LI>6 uleshort !0 4362a4d6d3b8SXin LI>>6 use godot-rescale-display-w 4363a4d6d3b8SXin LI>>10 use godot-rescale-display-h 4364a4d6d3b8SXin LI>>10 uleshort x \b, 4365a4d6d3b8SXin LI>16 ulelong&0x800000 !0 has mipmaps, 4366a4d6d3b8SXin LI>16 ulelong&0x100000 0x100000 lossless encoding 4367a4d6d3b8SXin LI>16 ulelong&0x200000 0x200000 lossy encoding 4368a4d6d3b8SXin LI>16 ulelong&0x300000 0 4369*ae316d1dSXin LI>>16 use godot-pixel-format-v3 4370a4d6d3b8SXin LI 4371a4d6d3b8SXin LI# Type: Godot 4 texture 4372a4d6d3b8SXin LI# From: David Korth <gerbilsoft@gerbilsoft.com> 4373a4d6d3b8SXin LI# References: 4374a4d6d3b8SXin LI# - https://github.com/godotengine/godot/blob/master/core/io/image.h 4375a4d6d3b8SXin LI# - https://github.com/godotengine/godot/blob/master/scene/resources/texture.cpp 4376a4d6d3b8SXin LI# - https://github.com/godotengine/godot/blob/master/scene/resources/texture.h 4377a4d6d3b8SXin LI# TODO: Don't show "rescale to" if it matches the image size. 4378a4d6d3b8SXin LI0 string GST2 Godot 4 texture 4379a4d6d3b8SXin LI!:ext stex 4380a4d6d3b8SXin LI!:mime image/x-godot-stex 4381a4d6d3b8SXin LI>4 ulelong x v%u: 4382a4d6d3b8SXin LI>0x28 uleshort x %u x 4383a4d6d3b8SXin LI>0x2A uleshort x %u 4384a4d6d3b8SXin LI>8 use godot-rescale-display-w 4385a4d6d3b8SXin LI>12 use godot-rescale-display-h 4386a4d6d3b8SXin LI>12 uleshort x \b, 4387a4d6d3b8SXin LI>0x2C ulelong >1 %u mipmaps, 4388*ae316d1dSXin LI>0x30 use godot-pixel-format-v4 4389a4d6d3b8SXin LI>0x24 ulelong 1 \b, embedded PNG image 4390a4d6d3b8SXin LI>0x24 ulelong 2 \b, embedded WebP image 4391a4d6d3b8SXin LI>0x24 ulelong 3 \b, Basis Universal 4392a2dfb722SXin LI 4393a2dfb722SXin LI# Summary: iCEDraw graphic *.IDF 4394a2dfb722SXin LI# URL: http://fileformats.archiveteam.org/wiki/ICEDraw 4395a2dfb722SXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/idf-icedraw.trid.xml 4396a2dfb722SXin LI# From: Joerg Jenderek 4397a2dfb722SXin LI# Note: called "iCEDraw graphic" by TrID, "iCEDraw text" by FFmpeg and "iCE Draw" by Ansilove 4398a2dfb722SXin LI# verified by FFmpeg command `ffprobe ICE-9605.IDF` and `ansilove -s SQ-FORCE.IDF` 4399a2dfb722SXin LI0 string \0041.4\0\0\0\0O\0 iCEDraw graphic 4400a2dfb722SXin LI#!:mime application/octet-stream 4401a2dfb722SXin LI!:mime image/x-idf 4402a2dfb722SXin LI!:ext idf 4403898496eeSXin LI 4404898496eeSXin LI# Type: ColoRIX VGA Paint Image File (.rix/.sci/.scX) 4405898496eeSXin LI# From: Eddy Jansson <github.com/eloj> 4406898496eeSXin LI# Reference: https://www.fileformat.info/format/rix/spec/ 4407898496eeSXin LI# 4408898496eeSXin LI0 name rix-header 4409898496eeSXin LI>0 uleshort x \b, %u x 4410898496eeSXin LI>2 uleshort x %u 4411898496eeSXin LI# palette type: 4412898496eeSXin LI# .. if direct color, low bits encode bpp 4413898496eeSXin LI>4 ubyte&128 0 4414898496eeSXin LI>>4 ubyte&127 x \b %u bpp (direct color) 4415898496eeSXin LI# .. else palette 4416898496eeSXin LI>4 ubyte&128 128 4417898496eeSXin LI>>4 ubyte&7 0 \b x 2 4418898496eeSXin LI>>4 ubyte&7 1 \b x 4 4419898496eeSXin LI>>4 ubyte&7 2 \b x 8 4420898496eeSXin LI>>4 ubyte&7 3 \b x 16 4421898496eeSXin LI>>4 ubyte&7 4 \b x 32 4422898496eeSXin LI>>4 ubyte&7 5 \b x 64 4423898496eeSXin LI>>4 ubyte&7 6 \b x 128 4424898496eeSXin LI>>4 ubyte&7 7 \b x 256 4425898496eeSXin LI# storage type 4426898496eeSXin LI#>5 ubyte&15 0 \b, Linear 4427898496eeSXin LI>5 ubyte&15 1 \b, Planar (0213) 4428898496eeSXin LI>5 ubyte&15 2 \b, Planar 4429898496eeSXin LI>5 ubyte&15 3 \b, Text 4430898496eeSXin LI>5 ubyte&15 4 \b, Planar lines 4431898496eeSXin LI>5 ubyte&128 128 \b (compressed) 4432898496eeSXin LI>5 ubyte&64 64 \b (extension) 4433898496eeSXin LI>5 ubyte&32 32 \b (encrypted) 4434898496eeSXin LI 4435898496eeSXin LI0 string RIX3 ColoRIX Image 4436898496eeSXin LI>4 use rix-header 4437898496eeSXin LI 4438898496eeSXin LI0 string RIX7 ColoRIX Slideshow 4439898496eeSXin LI 4440898496eeSXin LI# http://fileformats.archiveteam.org/wiki/PaperPort_(MAX) 4441898496eeSXin LI0 string ViG Visioneer PaperPort 4442898496eeSXin LI>3 string Ae 2 4443898496eeSXin LI>3 string Be 2 4444898496eeSXin LI>3 string Cj 3-4 4445898496eeSXin LI>3 string Em 5-7 4446898496eeSXin LI>3 string Fk 8-12 4447898496eeSXin LI>3 default x MAX 4448*ae316d1dSXin LI 4449*ae316d1dSXin LI 4450*ae316d1dSXin LI# https://teem.sourceforge.net/nrrd/index.html 4451*ae316d1dSXin LI# From: Quasar Jarosz <quasar@uams.edu>, 2023 4452*ae316d1dSXin LI0 string NRRD000 NRRD imaging data 4453*ae316d1dSXin LI!:mime image/x.nrrd 4454*ae316d1dSXin LI!:ext nrrd 4455*ae316d1dSXin LI>7 string x \b, version %s 4456*ae316d1dSXin LI>0 search type: 4457*ae316d1dSXin LI>>&1 string x \b, type: %s 4458*ae316d1dSXin LI>0 search dimension: 4459*ae316d1dSXin LI>>&1 string x \b, dimensions: %s 4460*ae316d1dSXin LI>0 search sizes: 4461*ae316d1dSXin LI>>&1 string x \b, sizes: %s 4462*ae316d1dSXin LI>0 search encoding: 4463*ae316d1dSXin LI>>&1 string x \b, encoding: %s 4464*ae316d1dSXin LI 4465*ae316d1dSXin LI# From: Joerg Jenderek 4466*ae316d1dSXin LI# URL: http://justsolve.archiveteam.org/wiki/PICT 4467*ae316d1dSXin LI# https://en.wikipedia.org/wiki/PICT 4468*ae316d1dSXin LI# Reference: https://www.fileformat.info/format/macpict/egff.htm 4469*ae316d1dSXin LI# http://mark0.net/download/triddefs_xml.7z/defs/p/pict-v2.trid.xml 4470*ae316d1dSXin LI# Note: called "Macintosh Quickdraw/PICT drawing" by shared MIME-info database from freedesktop.org, 4471*ae316d1dSXin LI# "QuickDraw/PICT bitmap (v2)" by TrID and "Macintosh PICT Image" version 2.0 by DROID via PUID via fmt/341 4472*ae316d1dSXin LI# verified by command like `deark -m pict -l -d2 flag_b24.pct` as PICT v2, 4473*ae316d1dSXin LI# partly by NetPBM `picttoppm venus.pct | file` as "Macintosh PICT", 4474*ae316d1dSXin LI# partly by ImageMagick `identify -verbose flag_b24.pct` as (Apple Macintosh QuickDraw/PICT) and 4475*ae316d1dSXin LI# partly by XnView `nconvert -fullinfo *.pict *.pic *.pct` as "Macintosh PICT 2" 4476*ae316d1dSXin LI# look for version operator (0011h) and version number (02FFh) 4477*ae316d1dSXin LI522 ubelong 0x001102ff 4478*ae316d1dSXin LI# few Macintosh QuickDraw with one corner at -1/-1 coordinates like PICT_129.pict PICT_2012.pict (strength=81=70+11) before Claris clip art (strength=80 ./claris) 4479*ae316d1dSXin LI!:strength +11 4480*ae316d1dSXin LI# look for Version operator (0C00h) 4481*ae316d1dSXin LI>526 ubeshort 0x0c00 4482*ae316d1dSXin LI# skip DROID fmt-341-signature-id-468.pct with invalid dimension x=0 4483*ae316d1dSXin LI>>520 ubeshort !0 4484*ae316d1dSXin LI# skip DROID variant fmt-341-signature-id-468.pct using 0xAB instead 0x0 4485*ae316d1dSXin LI>>>0 long !0xABABABAB Macintosh QuickDraw PICT, version 2 4486*ae316d1dSXin LI#!:mime application/octet-stream 4487*ae316d1dSXin LI!:mime image/x-pict 4488*ae316d1dSXin LI!:apple ????PICT 4489*ae316d1dSXin LI!:ext pict/pic/pct 4490*ae316d1dSXin LI# maybe also suffix pict2 https://www.xnview.com/de/image_formats/ 4491*ae316d1dSXin LI#!:ext pict2/pict/pic/pct 4492*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pict.trid.xml 4493*ae316d1dSXin LI# Note: called "Macintosh Quickdraw/PICT Drawing" by TrID 4494*ae316d1dSXin LI# "real" content stored by opcode 0x8200 (CompressedQuickTime *.qtif) with none, cvid or JPEG compression 4495*ae316d1dSXin LI# look for LongText QuickTime followed by trademark character 4496*ae316d1dSXin LI>>>>554 search/691976/b QuickTime\252 \b, QuickTime 4497*ae316d1dSXin LI# look for LongText afterwards like "and a/None|Cinepak|Photo - JPEG decompressor/are needed to see this picture" 4498*ae316d1dSXin LI>>>>>&0 search/28/bs \040decompressor with decompressor 4499*ae316d1dSXin LI>>>>>>&-4 string None None 4500*ae316d1dSXin LI# Cinepak and "Compact Video decompressor" seems to be cvid 4501*ae316d1dSXin LI>>>>>>&-7 string Cinepak Cinepak 4502*ae316d1dSXin LI>>>>>>&-12 string Photo\040-\040JPEG JPEG 4503*ae316d1dSXin LI>>>>>>&-13 string Compact\040Video cvid 4504*ae316d1dSXin LI# case where decompression is not like: Cinepak None "Photo - JPEG" "Compact Video decompressor" 4505*ae316d1dSXin LI>>>>>>&-6 default x 4506*ae316d1dSXin LI>>>>>>>&0 string x "%0.6s" 4507*ae316d1dSXin LI# file size in bytes; not reliable sometimes 0 or little smaller than real size 4508*ae316d1dSXin LI#>>>>512 ubeshort x \b, size %u 4509*ae316d1dSXin LI# 8 bytes picFrame (rectangle); for most examples one corner is located at coordinates 0/0; except deark other tools fail when negative values 4510*ae316d1dSXin LI# GRR: samples with coordinates -1/-1 and Y=0x01??|0x00?? are interpreted as "Claris clip art" (strength=80 ./claris) 4511*ae316d1dSXin LI#>>>>518 ubeshort x Y=%#4.4x 4512*ae316d1dSXin LI>>>>520 ubeshort x \b, %u 4513*ae316d1dSXin LI>>>>>516 beshort !0 \b-%d 4514*ae316d1dSXin LI>>>>518 ubeshort x x %u 4515*ae316d1dSXin LI>>>>>514 beshort !0 \b-%d 4516*ae316d1dSXin LI# Note: at the beginning all zeros or information about the particular software like: PICT 4517*ae316d1dSXin LI>>>>0 long !0 \b, at 0 4518*ae316d1dSXin LI>>>>>0 string x %.4s 4519*ae316d1dSXin LI# version 2.0 files also have a 26-byte header following the version information 4520*ae316d1dSXin LI# like: 0 FFFEh (freedesktop egff~Encyclopedia of Graphics File Formats) FFFFh (egff) 4521*ae316d1dSXin LI>>>>528 ubeshort x \b, at 528 %#4.4x 4522*ae316d1dSXin LI# 2nd opcode like: 0x0000~NOP 0x0001~Clip 0x00a0~ShortComment 0x00a1~LongComment 0x001e~DefHilite 0x001f~OpColor 4523*ae316d1dSXin LI>>>>552 ubeshort x \b, at 552 second opcode %#4.4x 4524*ae316d1dSXin LI# last opcode if not opEndPic (00FFh) 4525*ae316d1dSXin LI>>>>-2 ubeshort !0x00FF \b, at the end %#4.4x opcode 4526*ae316d1dSXin LI# Reference: http://web.archive.org/web/20010703041301/http://developer.apple.com/technotes/qd/qd_14.html 4527*ae316d1dSXin LI# http://mark0.net/download/triddefs_xml.7z/defs/p/pict-v1.trid.xml 4528*ae316d1dSXin LI# Note: called "QuickDraw/PICT bitmap (v1)" by TrID and "Macintosh PICT Image" version 1.0 by DROID via PUID via x-fmt/80 4529*ae316d1dSXin LI# verified by command like `deark -m pict -l -d2 FC9.PCT` as PICT v1, 4530*ae316d1dSXin LI# by ImageMagick `identify -verbose *.pict` as PICT (Apple Macintosh QuickDraw/PICT) and 4531*ae316d1dSXin LI# by XnView `nconvert -fullinfo *.pict *.pct` as "Macintosh PICT" 4532*ae316d1dSXin LI# 1 byte opcode for picversion (11h); next byte version number (1) 4533*ae316d1dSXin LI522 ubeshort 0x1101 4534*ae316d1dSXin LI# skip DROID x-fmt-80-signature-id-859.pct x-fmt-80-signature-id-860.pct without next opcode usually clipRgn (1h) 4535*ae316d1dSXin LI>524 ubyte =0x01 4536*ae316d1dSXin LI>>0 use mac-pict1 4537*ae316d1dSXin LI# display Macintosh PICT drawing version 1 information 4538*ae316d1dSXin LI0 name mac-pict1 4539*ae316d1dSXin LI>520 ubeshort x Macintosh QuickDraw PICT, version 1 4540*ae316d1dSXin LI#!:mime application/octet-stream 4541*ae316d1dSXin LI!:mime image/x-pict 4542*ae316d1dSXin LI!:apple ????PICT 4543*ae316d1dSXin LI!:ext pict/pct 4544*ae316d1dSXin LI# maybe also suffix pict1 and pic 4545*ae316d1dSXin LI#!:ext pict1/pict/pic/pct 4546*ae316d1dSXin LI# file size in bytes; not reliable sometimes 0 or smaller than real size 4547*ae316d1dSXin LI#>512 ubeshort x \b, size %u 4548*ae316d1dSXin LI# 8 bytes picFrame (rectangle) 4549*ae316d1dSXin LI>520 ubeshort x \b, %u 4550*ae316d1dSXin LI>516 ubeshort !0 \b-%u 4551*ae316d1dSXin LI>518 ubeshort x x %u 4552*ae316d1dSXin LI>514 ubeshort !0 \b-%u 4553*ae316d1dSXin LI# Note: According to DROID at the beginning all zeros or information about the particular software like DRWG(MD|D2) 4554*ae316d1dSXin LI>0 long !0 \b, at 0 4555*ae316d1dSXin LI>>0 string x %.6s 4556*ae316d1dSXin LI>>0 ubelong x %#8.8x 4557*ae316d1dSXin LI>>4 ubeshort x \b%4.4x 4558*ae316d1dSXin LI# 2nd opcode if not clipRgn (1h) 4559*ae316d1dSXin LI>524 ubyte !0x01 \b, at 524 %#2.2x opcode 4560*ae316d1dSXin LI# last opcode if not opEndPic (FFh) 4561*ae316d1dSXin LI>-1 ubyte !0xFF \b, at the end %#2.2x opcode 4562*ae316d1dSXin LI 4563*ae316d1dSXin LI# https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md 4564*ae316d1dSXin LI20 ulelong 0 4565*ae316d1dSXin LI>24 ulelong 0 4566*ae316d1dSXin LI>>4 uleshort 0xA5E0 Aseprite asset file 4567*ae316d1dSXin LI!:ext aseprite 4568*ae316d1dSXin LI>>>0 ulelong x \b, size %u 4569*ae316d1dSXin LI>>>6 uleshort x \b, frames %u 4570*ae316d1dSXin LI>>>8 uleshort x \b, size %ux 4571*ae316d1dSXin LI>>>10 uleshort x \b%u 4572*ae316d1dSXin LI>>>12 uleshort 32 \b, RGBA 4573*ae316d1dSXin LI>>>12 uleshort 16 \b, Grayscale 4574*ae316d1dSXin LI>>>12 uleshort 8 \b, Indexed 4575*ae316d1dSXin LI>>>14 ulelong x \b, flags %#x 4576*ae316d1dSXin LI#>>>18 uleshort x \b, speed %u 4577*ae316d1dSXin LI>>>28 ubyte x \b, transparency index %u 4578*ae316d1dSXin LI>>>32 uleshort x \b, number of colors %u 4579*ae316d1dSXin LI>>>34 ubyte >0 \b, pixel ratio %u: 4580*ae316d1dSXin LI>>>>35 ubyte x \b%u 4581*ae316d1dSXin LI>>>36 leshort x \b, grid position (%d, 4582*ae316d1dSXin LI>>>38 leshort x \b%d) 4583*ae316d1dSXin LI>>>40 uleshort x \b, grid size %dx 4584*ae316d1dSXin LI>>>42 uleshort x \b%d 4585