diff options
Diffstat (limited to 'contrib/file/magic/Magdir/images')
-rw-r--r-- | contrib/file/magic/Magdir/images | 1088 |
1 files changed, 928 insertions, 160 deletions
diff --git a/contrib/file/magic/Magdir/images b/contrib/file/magic/Magdir/images index 95004d1d9f47..a3b972fb1ee1 100644 --- a/contrib/file/magic/Magdir/images +++ b/contrib/file/magic/Magdir/images @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: images,v 1.223 2022/05/14 20:05:09 christos Exp $ +# $File: images,v 1.263 2024/11/10 20:44:30 christos Exp $ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # @@ -13,8 +13,10 @@ # Targa - matches `povray', `ppmtotga' and `xv' outputs # by Philippe De Muyter <phdm@macqel.be> # URL: http://justsolve.archiveteam.org/wiki/TGA +# https://en.wikipedia.org/wiki/Truevision_TGA # Reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf -# Update: Joerg Jenderek +# Update: Joerg Jenderek February 2024 +# Note: called by DROID "Truevision TGA Bitmap" version 1.0 via PUID x-fmt/367 # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 # ,32 or 33 (both not observed) # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise @@ -27,6 +29,8 @@ # and Image Type 1 2 3 9 10 11 32 33 # and Color Map Entry Size 0 15 16 24 32 0 ubequad&0x00FeC400000000C0 0 +# Targa image data (strength=70=110-40) before some Commodore disc image (strength=70=70+0 ./c64) like Cabal+2-MarioSoft(1).d64 +# and some MMDF mailbox (strength=70=70+0 ./mmdf) like uupc.input.1 # Conflict with MPEG sequences. !:strength -40 # Prevent conflicts with CRI ADX. @@ -42,7 +46,10 @@ >>>>17 ubyte&0x0F !11 # skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel depth 1 8 15 16 24 32 >>>>>16 ubyte 1 ->>>>>>0 use tga-image +# skip few Commodore D64 disc image like "The Great Gianna Sisters.d64" and +# few MMDF mailbox like uupc.input.1 with unlikely black&white, dimension 0101h x 0101h (257x257) and +0101h origin (+257 +257) +>>>>>>8 quad !0x0101010101010101 +>>>>>>>0 use tga-image >>>>>16 ubyte 8 >>>>>>0 use tga-image >>>>>16 ubyte 15 @@ -57,9 +64,11 @@ 0 name tga-image >2 ubyte <34 Targa image data !:mime image/x-tga +# Apple Uniform Type Identifier: com.truevision.tga-image !:apple ????TPIC # normal extension .tga but some Truevision products used others: # tpic (Apple),icb (Image Capture Board),vda (Video Display Adapter),vst (NuVista),win (UNSURE about that) +# afi bpx !:ext tga/tpic/icb/vda/vst # image type 1 2 3 9 10 11 32 33 >2 ubyte&0xF7 1 - Map @@ -110,6 +119,7 @@ # positive length implies identification field >0 ubyte >0 >>18 string x "%s" +# Note: called by DROID "Truevision TGA Bitmap" version 2.0 via fmt/402 # last 18 bytes of newer tga file footer signature >18 search/4261301/s TRUEVISION-XFILE.\0 # extension area offset if not 0 @@ -179,7 +189,7 @@ # adding 65 to strength so that Netpbm images comes before "x86 boot sector" or # "DOS/MBR boot sector" identified by ./filesystems 0 name netpbm ->3 regex/s =[0-9]{1,50}[\040\t\f\r\n]+[0-9]{1,50} Netpbm image data +>3 regex/s =\^[0-9]{1,50}[\040\t\f\r\n]+[0-9]{1,50} Netpbm image data >>&0 regex =[0-9]{1,50} \b, size = %s x >>>&0 regex =[0-9]{1,50} \b %s @@ -311,12 +321,12 @@ 0 string MM\x00\x2a TIFF image data, big-endian !:strength +70 !:mime image/tiff -!:ext tif,tiff +!:ext tif/tiff >(4.L) use \^tiff_ifd 0 string II\x2a\x00 TIFF image data, little-endian !:mime image/tiff !:strength +70 -!:ext tif,tiff +!:ext tif/tiff >(4.l) use tiff_ifd 0 name tiff_ifd @@ -327,17 +337,21 @@ # NewSubFileType >0 uleshort 0xfe >>12 use tiff_entry +# Width >0 uleshort 0x100 >>4 ulelong 1 ->>>12 use tiff_entry >>>8 uleshort x \b, width=%d +>>>12 use tiff_entry +# Height >0 uleshort 0x101 >>4 ulelong 1 >>>8 uleshort x \b, height=%d >>>12 use tiff_entry +# BPS >0 uleshort 0x102 >>8 uleshort x \b, bps=%d >>12 use tiff_entry +# Compression >0 uleshort 0x103 >>4 ulelong 1 \b, compression= >>>8 uleshort 1 \bnone @@ -365,7 +379,8 @@ >>>8 default x >>>>8 uleshort x \b(unknown %#x) >>>12 use tiff_entry ->0 uleshort 0x106 \b, PhotometricIntepretation= +# Photometric Interpretation +>0 uleshort 0x106 \b, PhotometricInterpretation= >>8 clear x >>8 uleshort 0 \bWhiteIsZero >>8 uleshort 1 \bBlackIsZero @@ -460,10 +475,8 @@ # GPS IFD >0 uleshort 0x8825 \b, GPS-Data >>12 use tiff_entry - #>0 uleshort x \b, unknown=%#x #>>12 use tiff_entry - 0 string MM\x00\x2b Big TIFF image data, big-endian !:mime image/tiff 0 string II\x2b\x00 Big TIFF image data, little-endian @@ -496,6 +509,12 @@ !:ext png !:strength +10 >16 use png-ihdr +>33 string \x00\x00\x00\x08acTL \b, animated +>>41 ubelong 1 (%d frame +>>41 ubelong >1 (%d frames +>>45 ubelong 0 \b, infinite repetitions) +>>45 ubelong 1 \b, %d repetition) +>>45 ubelong >1 \b, %d repetitions) # Apple CgBI PNG image. 0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x04CgBI @@ -544,6 +563,23 @@ #>10 ubyte&0x07 =0x06 128 colors #>10 ubyte&0x07 =0x07 256 colors +# URL: http://fileformats.archiveteam.org/wiki/Jeff%27s_Image_Format +# http://web.archive.org/web/20010603113404/http://jeff.cafe.net/jif +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jif.trid.xml +# https://www.nationalarchives.gov.uk/PRONOM/fmt/994 +# From: Joerg Jenderek +# Note: nearly identical to GIF, except that it uses zlib compression instead of LZW +# called by TrID "Jeff's Image Format bitmap" and "Jeffs Image Format" by DROID via fmt/994 +# verfied by XnView `nconvert -fullinfo *.jif` as "Jeff's Image Format" +0 string JIF99a Jeffs Image Format data +!:mime image/x-jif +# http://extension.nirsoft.net/jif +#!:mime image/jif +!:apple ????JIFf +!:ext jif +>6 uleshort x %u x +>8 uleshort x %u + # ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster, # 1 plane, no encoding. 0 string \361\0\100\273 CMU window manager raster image data @@ -625,7 +661,7 @@ >>8 string x "%s" # should be point character (2Eh) of version string according to TrID #>6 ubyte !0x2E \b, at 6 %#x -# caret character (23h) at the beginning in most or probaly all exanples +# caret character (23h) at the beginning in most or probably all examples #>0 ubyte !0x23 \b, starting with character %#x # URL: http://fileformats.archiveteam.org/wiki/DeskMate_Draw # http://en.wikipedia.org/wiki/Deskmate @@ -652,7 +688,86 @@ >24 string SunGKS \b, SunGKS # CGM image files -0 string BEGMF clear text Computer Graphics Metafile +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/CGM +# https://en.wikipedia.org/wiki/Computer_Graphics_Metafile +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cgm-ct.trid.xml +# http://standards.iso.org/ittf/PubliclyAvailableStandards/c032381_ISO_IEC_8632-4_1999(E).zip +# Note: called "Computer Graphics Metafile (Clear Text)" by TrID and +# "Computer Graphics Metafile ASCII" by DROID or CGM by XnView +# verified by LibreOffice and partly by XnView `nconvert -info *.CGM` +# According to TrID only letter B and M are always upcased and by DROID often only B is upcased for command BEGIN METAFILE +0 string/c begmf +# skip SOME DROID fmt-301-signature-id-359.cgm fmt-301-signature-id-361.cgm fmt-302-signature-id-364.cgm +# fmt-302-signature-id-365.cgm x-fmt-142-signature-id-350.cgm x-fmt-142-signature-id-351.cgm +>5 short !0 +# skip other versions of DROID fmt-301-signature-id-359.cgm fmt-301-signature-id-361.cgm fmt-302-signature-id-364.cgm +# fmt-302-signature-id-365.cgm x-fmt-142-signature-id-350.cgm x-fmt-142-signature-id-351.cgm +>>5 short !0xABab clear text Computer Graphics Metafile +# https://reposcope.com/mimetype/image/cgm +!:mime image/cgm +!:ext cgm +# SF:NAME like: 'metafile example'; +>>>5 string x %s +# look for command METAFILE VERSION (MFVERSION <SOFTSEP> <I:VERSION>) +>>>2 search/128/c mfversion +#>>>>&0 ubyte x SOFTSEP=%#x +# version like: 1 3 4 +>>>>&1 ubyte >0x31 \b, version %c +# Summary: Computer Graphics Metafile (binary) +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cgm-bin.trid.xml +# https://standards.iso.org/ittf/PubliclyAvailableStandards/c032380_ISO_IEC_8632-3_1999(E).zip +# Note: called "Computer Graphics Metafile (binary)" by TrID and DROID or CGM by XnView +# verified by LibreOffice and partly by XnView `nconvert -info *.CGM` +# 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 +0 ubeshort&0xFFe0 0x0020 +# 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 +# with containing only 28 bytes +>28 ubyte x +# 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 +# with "low" version; 2nd worst case argentin.cgm with parameter length 56 +# worst MS.CGM +#>>2 search/73/b \x10\x22\0 binary Computer Graphics Metafile +>>2 search/128/b \x10\x22\0 binary Computer Graphics Metafile +!:mime image/cgm +!:ext cgm +# metafile 2 byte version number like: 1 (most) 2 3 4 +>>>&-1 ubeshort >1 \b, version %u +# length number of 1st parameter octets in range 0 to 30 implies short command +>>>0 ubeshort&0x001F <31 \b, parameter length %u +# length of string like: 8 9 10 11 12 29 +#>>>>2 ubyte x \b, %u BYTES (SHORT) +# string like: 'HiJaak 2' 'Example 1' 'sahara.cgm' 'MASTERCLIPS--Art Of Business ' +>>>>2 pstring >\0 '%s' +# 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') +>>>>0 ubeshort&0x0001 =0 +>>>>>(2.b+3) ubeshort !0x1022 \b, 2nd command %#4.4x (short even) +# after 1st short command with odd parameter length comes nil padding byte followed 2nd command like: 1022h +>>>>0 ubeshort&0x0001 =1 +#>>>>>(2.b+3) ubyte !0 \b, PADDING %#x +>>>>>(2.b+4) ubeshort !0x1022 \b, 2nd command %#4.4x (short odd) +# 11111 binary (decimal 31) in the parameter field indicates that the command is in long-form +>>>0 ubeshort&0x001F =0x1F +# bit 15 is partition flag with 1 for 'not-last' partition and 0 for 'last' partition +>>>>2 ubeshort&0x8000 !0 \b, partition flag %#4.4x +# bits 0 to 14 is parameter list length; the number of following parameter octets; range 0 to 32767 +# length of 1st long command parameter like: 53 +>>>>2 ubeshort&0x7Fff x \b, parameter length %u (long) +# The two header words are then followed by lenghth of 1st string like: 52 +#>>>>4 ubyte x \b, %u BYTES +# string like: 'K:\PROJECTS\GRAPHICS\DWKS3.5\CLIPART\FLAGS\Italy.cgm' +>>>>4 pstring/B x '%s' +# odd long parameter length implies single null padding octet to start command on word boundary +>>>>2 ubeshort&0x0001 =1 +# after 1st long command with odd parameter length comes nil padding byte followed by 2nd command like: 1022h +#>>>>>(4.b+5) ubyte !0 \b, PADDING %#x +>>>>>(4.b+6) ubeshort !0x1022 \b, 2nd command %#4.4x (long odd) +# even long parameter length implies next command directly is following +>>>>2 ubeshort&0x0001 =0 +# after 1st long command with even parameter length comes 2nd command like: 1022h 0x1054 (MS.CGM) +>>>>>(4.b+5) ubeshort !0x1022 \b, 2nd command %#4.4x (long even) +# 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 +>>>-2 ubeshort !0x0040 \b, NOT_FOUND_END_METAFILE # MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de) 0 string yz MGR bitmap, modern format, 8-bit aligned @@ -1092,6 +1207,22 @@ #>>(10.l) ubequad !0 \b, bits %#16.16llx # dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x #>>14 ulelong x \b, dib header size %u +# Type: Vision Research Phantom CINE Format +# URL: https://www.phantomhighspeed.com/ +# URL2: http://phantomhighspeed.force.com/vriknowledge/servlet/fileField?id=0BEU0000000Cfyk +# From: Harry Mallon <hjmallon at gmail.com> +# +# This has a short "CI" code but the 44 is the size of the struct which is +# stable +>2 uleshort 44 Vision Research CINE Video, +>>4 uleshort 0 Grayscale, +>>4 uleshort 1 JPEG Compressed, +>>4 uleshort 2 RAW, +>>6 uleshort x version %d, +>>20 ulelong x %d frames, +>>48 ulelong x %dx +>>52 ulelong x \b%d + # Conflicts with other entries [BABYL] # URL: http://fileformats.archiveteam.org/wiki/BMP#OS.2F2_Bitmap_Array # Note: container for OS/2 icon "IC", color icon "CI", color pointer "CP" or bitmap "BM" @@ -1138,7 +1269,7 @@ 0 string /*\040 # 9 byte c-comment "/* XPM */" not at the beginning like: mozicon16.xpm mozicon50.xpm (thunderbird) >0 search/0xCE /*\ XPM\ */ -# skip DROID x-fmt-208-signature-id-620.xpm by looking for char aray without explict length +# skip DROID x-fmt-208-signature-id-620.xpm by looking for char array without explict length # and match mh-logo.xpm (emacs) >>&0 search/1249 [] >>>0 use xpm-image @@ -1146,7 +1277,7 @@ >0 default x # words are separated by a white space which can be composed of space and tabulation characters >>0 search/0x52 static\040char\040 -# skip debug.c testmlc.c by looking for char aray without explict length +# skip debug.c testmlc.c by looking for char array without explict length # https://www.clamav.net/downloads/production/clamav-0.104.2.tar.gz # clamav-0.104.2\libclammspack\mspack\debug.c >>>&0 search/64 [] @@ -1217,20 +1348,75 @@ # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com) # -# See -# http://reality.sgi.com/grafica/sgiimage.html -# -0 ubeshort 474 SGI image data -#>2 ubyte 0 \b, verbatim ->2 ubyte 1 \b, RLE -#>3 ubyte 1 \b, normal precision ->3 ubyte 2 \b, high precision ->4 ubeshort x \b, %d-D ->6 ubeshort x \b, %d x ->8 ubeshort x %d ->10 ubeshort x \b, %d channel ->10 ubeshort !1 \bs ->80 string >0 \b, "%s" +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/SGI_(image_file_format) +# https://en.wikipedia.org/wiki/Silicon_Graphics_Image +# Reference: https://paulbourke.net/dataformats/sgirgb/sgiversion.html +# http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-sgi.trid.xml +# Note: called "Silicon Graphics bitmap (generic)" by TrID, +# "Silicon Graphics Image" by DROID via PUID x-fmt/140 and shared MIME-info database from freedesktop.org, +# verfied by ImageMagick `identify -verbose *.sgi` as SGI (Irix RGB image) and +# verfied by XnView `nconvert -in sgi -info *.sgi` as SGI RGB +# look for magic number (integer 474=0x01DA) + storage format (0 or 1) + number of bytes per pixel channel (1 or 2) +# to skip few TeX font metric data (like pxmi.tfm pxmi1.tfm eksfi8a.tfm ./tex) with invalid "high" bytes/pixel (11 12) +0 ubelong&0xFFffFEfc 0x01da0000 +# skip DROID x-fmt-140-signature-id-623.bw with invalid "low" dimensions "0 x 0" +>6 long !0 SGI image data +#!:mime image/sgi +!:mime image/x-sgi +!:apple ????.SGI +# STORAGE format; allowed values 0~VERBATIM 1~RLE +#>>2 ubyte 0 \b, verbatim +>>2 ubyte 1 \b, RLE +#>>2 ubyte >1 STORAGE=%#x +# BPC; number of bytes per pixel component; allowed values 1 2 +#>>3 ubyte 1 \b, normal precision +>>3 ubyte 2 \b, high precision +#>>3 ubyte x BPC=%#x +# DIMENSION; allowed values are 1~scanline 2~XSIZExYSIZE 3~XSIZExYSIZExZSIZE +>>4 ubeshort x \b, %d-D +# XSIZE; width of image in pixels +>>6 ubeshort x \b, %d x +# YSIZE; height of image in pixels +>>8 ubeshort x %d +# ZSIZE; number of channels in image; 1~B/W (greyscale) 3~RGB 4~RGB+ALPHA channel +>>10 ubeshort x \b, %d +# GRR: avoid +# Magdir\images, 1347: Warning: Current entry does not yet have a description for adding a EXTENSION type +>>>10 ubeshort 1 channel +# GRR: exception https://sembiance.com/fileFormatSamples/image/sgi/greytest.rgb +!:ext bw +# no examples found with .int suffix +#!:ext bw/int +# no examples found with .inta suffix for black/white+ALPHA channel +# no examples found with 2 channels +#>>>10 ubeshort 2 channels +#!:ext sgi +>>>10 ubeshort 3 channels +!:ext rgb/sgi +>>>10 ubeshort 4 channels +!:ext rgba/sgi +>>>10 default x channels +# no examples found with 5 and more channels +!:ext sgi +# IMAGENAME; null terminated ascii string of up to 79 characters +>>24 string >\0 \b, "%0.80s" +# PINMIN; minimum pixel value in the image; often 0 +>>12 ubelong !0 \b, %u PINMIN +# PINMAX; maximum pixel value in the image; often 255 +>>16 ubelong !255 \b, %u PINMAX +# DUMMY; 4 bytes of data should be set to 0 +>>20 ubelong !0 \b, at 20 %#x +# COLORMAP; 0~normal 1~DITHEREDobsolete 2~SCREENobsolete 3~COLORMAP +>>104 ubelong !0 \b, %u COLORMAP +# DUMMY; 404 bytes should be set to 0 but not always true; makes header exactly 512 bytes +>>111 ubyte !0 \b, at 111 %#x +>>113 ubyte !0 \b, at 113 %#x +>>118 ubeshort !0 \b, at 118 %#4.4x +>>121 ubyte !0 \b, at 121 %#x +>>132 ubelong !0 \b, at 132 %#8.8x +>>135 ubyte !0 \b, at 135 %#x +>>137 ubequad !0 \b, at 137 %#16.16llx 0 string IT01 FIT image data >4 ubelong x \b, %d x @@ -1250,17 +1436,95 @@ 0 string PCD_OPA Kodak Photo CD overview pack file # FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu> +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/Flexible_Image_Transport_System +# https://en.wikipedia.org/wiki/FITS +# Reference: https://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-fts.trid.xml +# Note: called "Flexible Image Transport System bitmap" by TrID, GIMP and DROID via PUID x-fmt/383 +# "FITS document" with expanded acronym "Flexible Image Transport System" by shared MIME-info database from freedesktop.org +# verified as "Flexible Image Transport System" by XnView `nconvert -fullinfo M57.FIT MOON.FTS` , +# as "FTS (Flexible Image Transport System)" by ImageMagick command `identify MOON.FTS` , +# by NetPBM `fitstopnm M57.FIT | file` , +# falsified by `fitsverify M57.FIT MOON.FTS` # FITS is the Flexible Image Transport System, the de facto standard for # data and image transfer, storage, etc., for the astronomical community. # (FITS floating point formats are big-endian.) -0 string SIMPLE\ \ = FITS image data +# keyword is a 1- to 8-character, left-justified ASCII string; columns that do not contain data are filled with spaces +# The assignment indicator (=) always occupies columns nine and ten in the card +0 string SIMPLE\ \ = +# skip DROID x-fmt-383-signature-id-57.fits by check for left padding spaces of 2nd card value +>89 ubeshort =0x2020 FITS image +# URL: https://heasarc.gsfc.nasa.gov/fitsio/fpack/ +# Reference: https://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-fz.trid.xml +# https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/docs/fpackguide.pdf +# Note: called "Flexible Image Transport System bitmap (compressed)" by TrID +>>240 search/0x4790/b ZCMPTYPE= data, compression type +# fz suffix for compressed fits +!:ext fz +# Flexible Image Transport System compression value (followed by optional FITS comment) like: NOCOMPRESS GZIP_1 GZIP_2 HCOMPRESS_1 PLIO_1 RICE_1 +#>>>&0 string x COMPRESSION=%0.13s +>>>&0 regex [A-Z_1-2]{4,11} %s +# not compressed Flexible Image Transport System with other filename suffix +>>240 default x data +!:ext fits/fit/fts +# 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 +# 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 +>>80 search/81/b BITPIX\040\040= +#>>>&11 string x BIT=%-0.18s +# this is the number of bits per pixel for image data +>>>&20 string 8 \b, 8-bit, character or unsigned binary integer +# few samples with more right positioned values like: M57.FIT +# GRR: avoid warning: Magdir\images, 1380: Warning: description `, 8-bit, character or unsigned binary integer (too right positioned)' truncated +>>>&28 string 8 \b, 8-bit, character or unsigned binary integer +>>>>0 string x (too right positioned) +# few samples not right justified positioned like: MOON.FTS +>>>&11 string 8 \b, 8-bit, character or unsigned binary integer +>>>>0 string x (too left positioned) +# according to DROID but no examples found +#>>>&19 string 08 \b, 8-bit, character or unsigned binary integer +#>>>&19 string +8 \b, 8-bit, character or unsigned binary integer +>>>&19 string 16 \b, 16-bit, two's complement binary integer +>>>&18 string \04032 \b, 32-bit, two's complement binary integer +>>>&18 string -32 \b, 32-bit, floating point, single precision +>>>&18 string -64 \b, 64-bit, floating point, double precision +# second 64-bit variant like: blank.fits +>>>&18 string \04064 \b, 64-bit, two's complement binary integer +# in standard number of dimensions by keyword NAXIS on 3rd card image but in few cases on 2nd card like: M57.FIT +>>80 search/81/b NAXIS\040\040\040= \b, +# 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) +#>>>>&0 string x NAXIS=%-0.31s +# single digit 0 implies no data or similar +>>>&0 search/31/b \0400\040 0 axes +!:mime application/fits +# single digit 1 implies one-dimensional entity such as a spectrum or a time series (no example found) +>>>&-1 search/31/b \0401\040 1 axis +!:mime application/fits +#!:mime image/fits +# single digit 2 implies conventional bitmap +>>>&0 search/31/b \0402\040 2 axes +!:mime image/fits +# single digit 3 implies data cubes of three dimensions (animated bitmap or similar) +>>>&0 search/31/b \0403\040 3 axes !:mime image/fits -!:ext fits/fts ->109 string 8 \b, 8-bit, character or unsigned binary integer ->108 string 16 \b, 16-bit, two's complement binary integer ->107 string \ 32 \b, 32-bit, two's complement binary integer ->107 string -32 \b, 32-bit, floating point, single precision ->107 string -64 \b, 64-bit, floating point, double precision +# data cubes more dimensions like: 5 (group.fits) 6 (DDTSUVDATA.fits) +>>>&0 default x +>>>>&0 regex/31/s =[0-9]{1,3} %s axis +!:mime application/fits +# often NAXIS1 as 4th card but sometimes at higher offset like: 29400 (IUElwp25637mxlo.fits) 20400 (NICMOSn4hk12010_mos.fits) +>>240 search/29400/bs NAXIS1\040\040= \b, +# before optional comment 31 ASCII charactes left padded with spaces for first axis like: 192 512 1024 1200 2000 2064 3600 ... +>>>&9 regex =[0-9]{1,31} %s +# often NAXIS2 as 5th card but sometimes not existent or at higher offset like: 29120 (IUElwp25637mxlo.fits) 20480 (NICMOSn4hk12010_mos.fits) +>>>320 search/29120/bs NAXIS2\040\040= x +# before optional comment 31 ASCII charactes left padded with spaces for second axis like: 2 4 165 512 800 1024 3600 ... +>>>>&9 regex =[0-9]{1,31} %s +# not standard cards +>>80 string !BITPIX\040\040= \b, at 80 +# in M57.FIT like: "NAXIS =" +>>>80 string x "%-0.9s" +>>160 string !NAXIS\040\040\040= \b, at 160 +# in M57.FIT like: "BITPIX =" +>>>160 string x "%-0.9s" # other images 0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file @@ -1458,26 +1722,71 @@ >2 quad !0 # skip g3test.g3 by test for unused bits of 2nd color entry >>4 ubeshort&0xF000 0 ->>>0 use degas-bitmap +#>>>0 beshort x 1ST_VALUE=%x +#>>>-0 offset x FILE_SIZE=%lld +# standard DEGAS low-res uncompressed bitmap *.pi1 with file size 32034 +>>>-0 offset =32034 +#>>>>0 beshort x 1st_VALUE=%x +# like: 8ball.pi1 teddy.pi1 sonic01.pi1 +>>>>0 use degas-bitmap +# about 61 DEGAS Elite low-res uncompressed bitmap *.pi1 with file size 32066 +>>>-0 offset =32066 +# like: spider.pi1 pinkgirl.pi1 frog3.pi1 +>>>>0 use degas-bitmap +# about 55 DEGAS Elite low-res uncompressed bitmap *.pi1 with file size 32128 +>>>-0 offset =32128 +# like: mountain.pi1 bigspid.pi1 alf33.pi1 +>>>>0 use degas-bitmap +# 1 DEGAS Elite low-res uncompressed bitmap *.pi1 with file size 44834 +>>>-0 offset =44834 +# like: kenshin.pi1 +>>>>0 use degas-bitmap # DEGAS mid-res uncompressed bitmap *.pi2 (strength=50) after GEM Images like: # BEETHVEN.IMG CHURCH.IMG GAMEOVR4.IMG TURKEY.IMG clinton.img 0 beshort 0x0001 #!:strength +0 # skip many control files like gnucash-4.8.setup.exe.aria2 by test for non black in 4 palette entries >2 quad !0 -# skip control file load-v0001.aria2 by test for unused bits of 5th color palette entry ->>10 ubeshort&0xF000 0 -# skip many GEM Image data like DANCER.IMG GAMEOVR4.IMG SHIP.IMG by test for unused bits of 8th color palette entry ->>>16 ubeshort&0xF000 0 -# skip many GEM Image data like BEETHVEN.IMG CABINETS.IMG MEMO.IMG by test for unused bits of 14th color palette entry ->>>>28 ubeshort&0xF000 0 -# skip few GEM Image data like CHURCH.IMG by test for unused bits of 15th color palette entry ->>>>>30 ubeshort&0xF000 0 -# skip many GEM Image data like TIGER.IMG TURKEY.IMG XMAS.IMG by test for unused bits of 16th color palette entry ->>>>>>32 ubeshort&0xF000 0 -# skip GEM Image data like clinton.img by test for existing bytes at the end ->>>>>>>32026 quad x ->>>>>>>>0 use degas-bitmap +# skip control file load-v0001.aria2 and many GEM Image data like +# GAMEOVR4.IMG BEETHVEN.IMG CHURCH.IMG TURKEY.IMG clinton.img +# by test for valid file sizes +# standard DEGAS mid-res uncompressed bitmap *.pi2 with file size 32034 +>>-0 offset =32034 +# (39/41) like: GEMINI03.PI2 ST_TOOLS.PI2 TBX_DEMO.PI2 +>>>0 use degas-bitmap +# few DEGAS Elite mid-res uncompressed bitmap *.pi2 with file size 32066 +>>-0 offset =32066 +# (2/41) like: medres.pi2 +>>>0 use degas-bitmap +# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) +# Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de> +# Update: Joerg Jenderek +# See http://fileformats.archiveteam.org/wiki/GEM_Raster +# For variations, also see: +# https://www.seasip.info/Gem/ff_img.html (Ventura) +# http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT) +# http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT) +# http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG) +# header_size +>2 beshort 0x0008 +>>0 use gem_info +>2 beshort 0x0009 +>>0 use gem_info +# no example for NOSIG +>2 beshort 24 +>>0 use gem_info +# no example for HYPERPAINT +>2 beshort 25 +>>0 use gem_info +16 string XIMG\0 +>0 use gem_info +# no example +16 string STTT\0\x10 +>0 use gem_info +# no example or description +16 string TIMG\0 +>0 use gem_info + # DEGAS high-res uncompressed bitmap *.pi3 0 beshort 0x0002 # skip Intel ia64 COFF msvcrt.lib by test for unused bits of 1st atari color palette entry @@ -1497,8 +1806,12 @@ # 00000000 "LEREDACT.PI3" 03730773 "TBX_DEMO.PI3" #>>>>&8 ubelong x \b, LAST CHAR+NIL %8.8x >>>>&8 ubelong&0xff00ffFF !0 +# skip many Adobe Photoshop Color swatch (ANPA-Farben.aco TOYO-Farbsystem.aco) with invalid 3rd color entry (1319 2201 2206 21f5 2480 24db 25fd) +>>>>>6 ubeshort&0xF000 0 +# skip few Adobe Photoshop Color swatch (FOCOLTONE-Farben.aco "PANTONE process coated.aco") with invalid 4th color entry (ffff) +>>>>>>8 ubeshort&0xF000 0 # 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 ->>>>>0 use degas-bitmap +>>>>>>>0 use degas-bitmap # test for last character of Adobe PhotoShop Brush UTF16-LE string and terminating nul char >>>>&8 ubelong&0xff00ffFF =0 # select last DEGAS bitmaps by invalid last char of brush note like BASICNES.PI3 DB_HELP.PI3 DB_WRITR.PI3 LEREDACT.PI3 @@ -1510,13 +1823,23 @@ 0 beshort 0x8000 # skip lif files handled via ./lif by test for unused bits of 1st palette entry >2 ubeshort&0xF000 0 ->>0 use degas-bitmap +# skip CRI ADX ADPCM audio (R04HT.adx R03T-15552.adx) with 44100 Hz misinterpreted as 5th color entry value AC44h +>>10 ubeshort&0xF000 0 +# 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 +>>>2 quad !0 +>>>>0 use degas-bitmap # DEGAS mid-res compressed bitmap *.pc2 like: abydos.pc2 ARTIS3.PC2 SMTHDRAW.PC2 STAR_2K.PC2 TX2_DEMO.PC2 0 beshort 0x8001 ->0 use degas-bitmap +# 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 +>2 ubeshort&0xF000 0 +# skip some (95/1369) PostScript Type 1 font (fmt-525-signature-id-816.pfb LUXEMBRG.PFB) with invalid 3rd atari color palette entry 2521 +>>6 ubeshort&0xF000 0 +>>>0 use degas-bitmap # DEGAS high-res compressed bitmap *.pc3 like: abydos.pc3 COYOTE.PC3 ELEPHANT.PC3 TX2_DEMO.PC3 SMTHDRAW.PC3 0 beshort 0x8002 ->0 use degas-bitmap +# skip some (36/212) Python Pickle (factor_cache.pickle environment.pickle) with invalid 1st atari color entry (2863 6363 7d71) +>2 ubeshort&0xF000 0 +>>0 use degas-bitmap # display information of Atari DEGAS and DEGAS Elite bitmap images 0 name degas-bitmap >0 ubyte x Atari DEGAS @@ -1603,6 +1926,19 @@ #>32058 ubequad !0 \b, channel delays %16.16llx # From: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/GED +# https://recoil.sourceforge.net/formats.html#Atari-8-bit +# Reference: https://sourceforge.net/projects/recoil/files/recoil/6.3.4/recoil-6.3.4.tar.gz +# recoil-6.3.4/recoil.c +# http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-ged.trid.xml +# Note: called "Atari GED bitmap" by TrID; file size 11302 +# and verified by RECOIL graphic tool +0 string \xFF\xFF0SO\x7F Atari GED bitmap, 160x200 +#!:mime application/octet-stream +!:mime image/x-atari-ged +!:ext ged + +# From: Joerg Jenderek # URL: http://fileformats.archiveteam.org/wiki/ImageLab/PrintTechnic # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-b_w.trid.xml # Note: called "ImageLab bitmap" by TrID @@ -1641,8 +1977,12 @@ # PCX image files # From: Dan Fandrich <dan@coneharvesters.com> -# updated by Joerg Jenderek at Feb 2013 by https://de.wikipedia.org/wiki/PCX +# updated by Joerg Jenderek at Feb 2013, Nov 2023 by https://en.wikipedia.org/wiki/PCX # https://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt +# URL: http://fileformats.archiveteam.org/wiki/PCX +# Note: called "PCX image" with acronym "PiCture eXchange" by shared MIME-info database from freedesktop.org +# verfied partly as pcx "Zsoft Paintbrush" format by XnView `nconvert -in pcx -fullinfo *.pcx` and +# by ImageMagick version 7.1.1-21 command `identify *.pcx` # GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000 # 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 0 ubelong&0xffF8fe00 0x0a000000 @@ -1650,28 +1990,39 @@ >3 ubyte >0 # test for valid versions >>1 ubyte <6 ->>>1 ubyte !1 PCX -!:mime image/x-pcx -#!:mime image/pcx ->>>>1 ubyte 0 ver. 2.5 image data ->>>>1 ubyte 2 ver. 2.8 image data, with palette ->>>>1 ubyte 3 ver. 2.8 image data, without palette ->>>>1 ubyte 4 for Windows image data ->>>>1 ubyte 5 ver. 3.0 image data ->>>>4 uleshort x bounding box [%d, ->>>>6 uleshort x %d] - ->>>>8 uleshort x [%d, ->>>>10 uleshort x %d], ->>>>65 ubyte >1 %d planes each of ->>>>3 ubyte x %d-bit ->>>>68 ubyte 1 colour, ->>>>68 ubyte 2 grayscale, +>>>1 ubyte !1 +# 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 +>>>>8 long !0 PCX +!:mime image/vnd.zbrush.pcx +# deprecated +#!:mime image/x-pcx +!:ext pcx/pcc +# also examples like: abydos.st E-DIODE.ST MUSIC-13.ST ROSE.ST +#!:ext pcx/pcc/st +# Note: called as "PCX bitmap (v2.5)" by TrID via bitmap-pcx.trid.xml and "PCX" version 0 by DROID via PUID fmt/86 +>>>>>1 ubyte 0 ver. 2.5 image data +# 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 +>>>>>1 ubyte 2 ver. 2.8 image data, with palette +# 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 +>>>>>1 ubyte 3 ver. 2.8 image data, without palette +# Note: called as "PCX bitmap (Win)" by TrID via bitmap-pcx-win.trid.xml and "PCX" version 4 by DROID via PUID fmt/89 +>>>>>1 ubyte 4 for Windows image data +# 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 +>>>>>1 ubyte 5 ver. 3.0 image data +>>>>>4 uleshort x bounding box [%d, +>>>>>6 uleshort x %d] - +>>>>>8 uleshort x [%d, +>>>>>10 uleshort x %d], +>>>>>65 ubyte >1 %d planes each of +>>>>>3 ubyte x %d-bit +>>>>>68 ubyte 1 colour, +>>>>>68 ubyte 2 grayscale, # this should not happen ->>>>68 default x image, ->>>>12 uleshort >0 %d x ->>>>>14 uleshort x %d dpi, ->>>>2 ubyte 0 uncompressed ->>>>2 ubyte 1 RLE compressed +>>>>>68 default x image, +>>>>>12 uleshort >0 %d x +>>>>>>14 uleshort x %d dpi, +>>>>>2 ubyte 0 uncompressed +>>>>>2 ubyte 1 RLE compressed # Adobe Photoshop # From: Asbjoern Sloth Toennesen <asbjorn@lila.io> @@ -1723,6 +2074,113 @@ >>>6 belong x 0x%8.8x >>>6 beshort x \b%4.4x +# From: Joerg Jenderek +# URL: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ +# http://fileformats.archiveteam.org/wiki/Photoshop +# Reference: http://www.nomodes.com/aco.html +# Note: registers as Photoshop.SwatchesFile for Photoshop.exe on Windows +# check for valid versions like: 2 (newest) 1 (old) 0 (oldest no examples) +0 ubeshort <3 +# skip few Atari DEGAS med-res bitmap (DIAGRAM1.PI2) and many ISO 9660 CD-ROM by check for invalid low color numbers (0) +>2 ubeshort >0 +# skip few Targa (bmpsuite-15col.tga rgb24_top_left_colormap.tga) by check for invalid high color space ID (F0 1D) +>>4 ubeshort <16 +# skip many (69/327) Targa image *.TGA by check of accessing near the ending of first color space section (size=nc*5*2) +>>>(2.S*10) ubelong x +# RGB branch for Adobe Photoshop Color swatch +>>>>4 ubeshort =0 +# 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) +>>>>>12 ubeshort =0 +# RGB branch for Adobe Photoshop Color swatch for older versions +>>>>>>0 ubeshort <2 +>>>>>>>0 use adobe-aco +# RGB branch for Adobe Photoshop Color swatch for newer version 2 +>>>>>>0 ubeshort =2 +# skip many (74/176) Atari DEGAS hi-res bitmap (*.PI3) by check for invalid low color name length (0) +>>>>>>>16 ubeshort >0 +>>>>>>>>0 use adobe-aco +# non RGB branch for Adobe Photoshop Color swatch +>>>>4 ubeshort !0 +# non RGB branch for Adobe Photoshop Color swatch for older versions +>>>>>0 ubeshort <2 +# skip many GEM Image (CHURCH.IMG TIGER.IMG) by check for invalid second high color space ID (55 114 143 157 256 288 450) +>>>>>>14 ubeshort <16 +>>>>>>>0 use adobe-aco +# non RGB branch for Adobe Photoshop Color swatch for newer version 2 +>>>>>0 ubeshort =2 +# 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 +>>>>>>14 ubeshort =0 +>>>>>>>0 use adobe-aco +# display Adobe Photoshop Color swatch file information (version, number of colors, color spaces, coordinates, names) +0 name adobe-aco +>0 ubeshort x Adobe Photoshop Color swatch, version %u +#!:mime application/octet-stream +!:mime application/x-adobe-aco +!:apple ????8BCO +!:ext aco +>0 ubeshort <2 +>>(2.S*10) ubelong x +# version 2 section after version 1 section +>>>&0 ubeshort 2 and 2 +# nc; number of colors like: 20 50 86 88 126 204 300 1050 1137 1280 2092 3010 4096 +>2 ubeshort x \b, %u colors +# maybe last 4 bytes of first section (probably y z color value) like: 0 0x66660000 0xfe700000 0xffff0000 +#>(2.S*10) ubelong x 1ST_SECTION_END=%#8.8x +>0 ubeshort <2 \b; 1st +# first older Adobe Photoshop Color entry +>>4 use aco-color +>>>2 ubeshort >1 \b; 2nd +# second older Adobe Photoshop Color entry +>>>>14 use aco-color +>0 ubeshort =2 \b; 1st +# first new Adobe Photoshop Color entry +>>4 use aco-color-v2 +>>>2 ubeshort >1 \b; 2nd +# jump first color name length words +>>>>(16.S*2) ubequad x +# second new Adobe Photoshop Color entry +>>>>>&10 use aco-color-v2 +# display Adobe Photoshop Color entry (color space, color coordinates) +0 name aco-color +# each color spec entry occupies five words +# color space: 0~RGB 1~HSB 2~CMYK 3~Pantone 4~Focoltone 5~Trumatch 6~Toyo 7~Lab 8~Grayscale 9?~wideCMYK 10~HKS ... +#>0 ubeshort x COLOR_ENTRY +>0 ubeshort 0 RGB +>0 ubeshort 1 HSB +>0 ubeshort 2 CMYK +>0 ubeshort 3 Pantone +>0 ubeshort 4 Focoltone +>0 ubeshort 5 Trumatch +>0 ubeshort 6 Toyo +>0 ubeshort 7 Lab +>0 ubeshort 8 Grayscale +>0 ubeshort 9 wide CMYK +>0 ubeshort 10 HKS +# unofficial +# >0 ubeshort 12 foo +# >0 ubeshort 13 bar +# >0 ubeshort 14 FOO +# >0 ubeshort 15 BAR +>0 ubeshort x space (%u) +# color coordinate w +>2 ubeshort x \b, w %#x +# color coordinate x +>4 ubeshort x \b, x %#x +# color coordinate y +>6 ubeshort x \b, y %#x +# color coordinate z; zero for RGB space +>8 ubeshort x \b, z %#x +# display Adobe Photoshop Color entry version 2 (color space, color coordinates names) +0 name aco-color-v2 +>0 use aco-color +#>10 ubeshort x \b, NUL_BYTES %#x +# color name length plus one (len+1) like: 7 8 9 13 14 15 16 17 22 26 +#>>12 ubeshort x \b, LENGTH %u +>>12 ubeshort-1 x \b, %u chars +# len words; UTF-16 representation of the color name like: "DIC 1s" "PANTONE Process Yellow PC" +>>14 bestring16 x "%s" +# followed by nil word + # XV thumbnail indicator (ThMO) # URL: https://en.wikipedia.org/wiki/Xv_(software) # Reference: http://fileformats.archiveteam.org/wiki/XV_thumbnail @@ -1737,35 +2195,6 @@ 0 string NITF National Imagery Transmission Format >25 string >\0 dated %.14s -# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) -# Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de> -# Update: Joerg Jenderek -# See http://fileformats.archiveteam.org/wiki/GEM_Raster -# For variations, also see: -# https://www.seasip.info/Gem/ff_img.html (Ventura) -# http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT) -# http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT) -# http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG) -0 beshort 0x0001 -# header_size ->2 beshort 0x0008 ->>0 use gem_info ->2 beshort 0x0009 ->>0 use gem_info -# no example for NOSIG ->2 beshort 24 ->>0 use gem_info -# no example for HYPERPAINT ->2 beshort 25 ->>0 use gem_info -16 string XIMG\0 ->0 use gem_info -# no example -16 string STTT\0\x10 ->0 use gem_info -# no example or description -16 string TIMG\0 ->0 use gem_info 0 name gem_info # version is 2 for some XIMG and 1 for all others @@ -1856,43 +2285,41 @@ # Hercules DASD image files # From Jan Jaeger <jj@septa.nl> and Jay Maynard <jaymaynard@gmail.com> + +# Common Hercules CKD image files +0 name HercCKD +>0 lelong x \b, %d heads per cylinder +>4 lelong x \b, track size %d bytes +>8 ubyte >0x2F +>>8 ubyte 0x45 \b, device type 9345 +>>8 ubyte !0x45 \b, device type 33%2.2X +>8 ubyte <0x30 \b, device type 23%2.2X + 0 string CKD_P370 Hercules CKD DASD image file ->8 lelong x \b, %d heads per cylinder ->12 lelong x \b, track size %d bytes ->16 byte x \b, device type 33%2.2X +>8 use HercCKD 0 string CKD_C370 Hercules compressed CKD DASD image file ->8 lelong x \b, %d heads per cylinder ->12 lelong x \b, track size %d bytes ->16 byte x \b, device type 33%2.2X +>8 use HercCKD >552 lelong x \b, %d total cylinders >>557 byte 0 \b, no compression >>557 byte 1 \b, ZLIB compression >>557 byte 2 \b, BZ2 compression 0 string CKD_S370 Hercules CKD DASD shadow file ->8 lelong x \b, %d heads per cylinder ->12 lelong x \b, track size %d bytes ->16 byte x \b, device type 33%2.2X +>8 use HercCKD 0 string CKD_P064 Hercules CKD64 DASD image file ->8 lelong x \b, %d heads per cylinder ->12 lelong x \b, track size %d bytes ->16 byte x \b, device type 33%2.2X +>8 use HercCKD 0 string CKD_C064 Hercules compressed CKD64 DASD image file ->8 lelong x \b, %d heads per cylinder ->12 lelong x \b, track size %d bytes ->16 byte x \b, device type 33%2.2X +>8 use HercCKD >524 lelong x \b, %d total cylinders >>585 byte 0 \b, no compression >>585 byte 1 \b, ZLIB compression >>585 byte 2 \b, BZ2 compression 0 string CKD_S064 Hercules CKD64 DASD shadow file ->8 lelong x \b, %d heads per cylinder ->12 lelong x \b, track size %d bytes ->16 byte x \b, device type 33%2.2X +>8 use HercCKD # Squeak images and programs - etoffi@softhome.net 0 string \146\031\0\0 Squeak image data @@ -2210,10 +2637,103 @@ # height (80,90) >>0x53 uleshort x \b%d +# From: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/Imageiio/imaginfo_(Ulead) +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe3.trid.xml +# Note: called "Ulead Imageiio/Imaginfo thumbnail" by TrID +0 string IIO1$ Ulead Photo Explorer 3 +#!:mime application/octet-stream +!:mime image/x-ulead-pe3 +# IMAGEIIO.PE3 +!:ext pe3 +# look for DOS/Windows drive letter +>5 search/192/s :\\ +# directory or full name of corresponding imaginfo.pe3 like: "T:\SAMPLES\TEXTURES\SKY_SNOW\IIOE371.TMP "S:\PI3\PIMPACT3\PROGRAMS\PATTERNS\imaginfo.pe3" +>>&-1 string x "%s" +# look for DOS/Windows network path if no drive letter part +>5 default x +>>5 search/192/s \x5c\x5c +# full name of corresponding imaginfo.pe3 like: "\\Lionking\upi\SAMPLES\IMAGES\ANIMALS\imaginfo.pe3" +>>>&0 string x "%s" # Type: Ulead Photo Explorer5 (.pe5) -# URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese) +# URL: http://fileformats.archiveteam.org/wiki/Imageiio/imaginfo_(Ulead) +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe4.trid.xml # From: Simon Horman <horms@debian.org> -0 string IIO2H Ulead Photo Explorer5 +# Update: Joerg Jenderek +# Note: some called "Ulead Imageiio/Imaginfo thumbnail" by TrID +# and used in various Ulead applications +0 string IIO2H Ulead Photo Explorer 4 or 5 +#!:mime application/octet-stream +!:mime image/x-ulead-pe4 +# IMAGEIIO.PE4 +!:ext pe4/pe5 +# look in most samples for JPEG signature like: SAMPLES/IMAGES/SCENES/IMAGINFO.PE4 +>0x4c2 search/0xE02/s JFIF with JPEG image data +>>&-6 use jpeg +# near the end list of image names like: Img0001.pcd 1116012L.JPG NCARD4.TPL +# +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe3-imaginfo.trid.xml +11 string \001\0\0\0\0 +# check for version 3 part +>19 string \0\001\0\003\0 +>>0 use ulead-imaginfo +# From: Joerg Jenderek +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pe4-imaginfo.trid.xml +# check for version 4 part +>19 string \0\0\0\004\0 +>>0 use ulead-imaginfo +# display information about Ulead Imaginfo thumbnail (version, directory, image extension) +0 name ulead-imaginfo +>22 ubyte x Ulead Imaginfo thumbnail +#!:mime application/octet-stream +!:mime image/x-ulead-imaginfo +>22 ubyte =3 \b, version 3 +# IMAGINFO.PE3 +!:ext pe3 +>22 ubyte =4 \b, version 4 +# IMAGINFO.PE4 +!:ext pe4 +# MAYBE ALSO VERSION 5 ? +#>22 ubyte =5 \b, version 5 +#!:ext pe5 +>22 ubyte x +# look for DOS/Windows driver letter +>>4 search/192/s :\x5c +# skip f:\Programme\iPhoto Plus 4\Template\Business Cards\IMAGINFO.PE4 +# by looking for driver letter in range A-Z +>>>&-1 ubyte >0x40 +# directory path like: "E:\iPE\CDSample\Images\Scenes" "D:\XmasCard\Samples" "C:\TEMP\PLANTS" +>>>>&-5 pstring/l >0 \b, "%s" +# look for DOS/Windows network path if no valid drive letter part +>>>&-1 default x +>>>>4 search/192/s \x5c\x5c +# directory path like: "\\FSX\SYS\OPPS\IPE.ENG\TEMPLATE\BUSINESS" "\\Lionking\upi\SAMPLES\IMAGES\ANIMALS" +>>>>>&-4 pstring/l >0 \b, "%s" +# look for DOS/Windows network path if no drive letter part +>>4 default x +>>>4 search/192/s \x5c\x5c +# directory path like: "\\FSX\SYS\opps\ipe.eng\samples" "\\DANIEL\IPE_CD\IPE.ITA" +>>>>&-4 pstring/l >0 \b, "%s" +# look for point character inside image names +>56 search/38/s . +# image name extension like: bmp jpg pcd tpl +>>&1 string x with %-.3s images +# Summary: Ulead Pattern image (Corel Corporation) +# URL: https://en.wikipedia.org/wiki/Ulead_Systems +# https://www.file-extensions.org/pst-file-extension-ulead-pattern-image-format +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pst-ulead.trid.xml +# From: Joerg Jenderek +# Note: used also by CorelDraw Essentials 3 version 13.0.0.800 +# there seems to exist other versions +0 ubelong 0xFFFF0100 +>8 search/21 PresetInfo Ulead pattern image +#!:mime application/octet-stream +!:mime image/x-ulead-pst +!:ext pst +# string length like: 16 18 19 21 24 +#>>4 uleshort x n=%u +# like: BlendPresetInfo DropShadowPresetInfo FileNewPresetInfo VectorExtrudePresetInfo EnvelopePresetInfo ContourPresetInfo DistortionPresetInfo +>>4 pstring/h x "%s" # Type: X11 cursor # URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup @@ -2239,7 +2759,7 @@ # URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ # Radiance HDR; usually has .pic or .hdr extension. 0 string #?RADIANCE\n Radiance HDR image data -#!mime image/vnd.radiance +!:mime image/vnd.radiance # From: Adam Buchbinder <adam.buchbinder@gmail.com> # URL: https://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf @@ -2425,6 +2945,7 @@ # BS encoded bitstreams 2 uleshort 0x3800 BS image, +# GRR: the above line is also true for binary Computer Graphics Metafile SAB00012.CGM with long parameter length 56 (=38h) >6 uleshort x Version %d, >4 uleshort x Quantization %d, >0 uleshort x (Decompresses to %d words) @@ -2630,7 +3151,8 @@ # FIXME: Handle DX10 and XBOX formats. >>0x54 string DX10 >>>0x80 use ms-directdraw-dx10 ->>0x54 string !DX10 \b, compressed using %.4s +>>0x54 string !DX10 +>>>0x54 string x \b, compressed using %.4s >0x50 ulelong&0x2 0x2 \b, alpha only >0x50 ulelong&0x200 0x200 \b, YUV >0x50 ulelong&0x20000 0x20000 \b, luminance @@ -2777,6 +3299,10 @@ >>0x10 ubelong !0x44445320 Sega PVR image: >>>0x10 use sega-pvr-image-header >>0x08 ulelong x \b, global index = %u +# Sega GVR image with GBIX. +>0x10 string GVRT Sega GVR image: +>>0x10 use sega-gvr-image-header +>>0x08 ubelong x \b, global index = %u # Sega GVR header. 0 name sega-gvr-image-header @@ -2798,12 +3324,6 @@ 0 string GVRT Sega GVR image: >0x10 use sega-gvr-image-header -# Sega GVR image with GBIX. -0 string GBIX ->0x10 string GVRT Sega GVR image: ->>0x10 use sega-gvr-image-header ->>0x08 ubelong x \b, global index = %u - # Sega GVR image with GCIX. (Wii) 0 string GCIX >0x10 string GVRT Sega GVR image: @@ -2813,28 +3333,9 @@ # Light Field Picture # Documentation: http://optics.miloush.net/lytro/TheFileFormat.aspx # Typical file extensions: .lfp .lfr .lfx - 0 ubelong 0x894C4650 ->4 ubelong 0x0D0A1A0A ->12 ubelong 0x00000000 Lytro Light Field Picture ->8 ubelong x \b, version %d - -# Type: Vision Research Phantom CINE Format -# URL: https://www.phantomhighspeed.com/ -# URL2: http://phantomhighspeed.force.com/vriknowledge/servlet/fileField?id=0BEU0000000Cfyk -# From: Harry Mallon <hjmallon at gmail.com> -# -# This has a short "CI" code but the 44 is the size of the struct which is -# stable -0 string CI ->2 uleshort 44 Vision Research CINE Video, ->>4 uleshort 0 Grayscale, ->>4 uleshort 1 JPEG Compressed, ->>4 uleshort 2 RAW, ->>6 uleshort x version %d, ->>20 ulelong x %d frames, ->>48 ulelong x %dx ->>52 ulelong x \b%d +>4 ubelong 0x0D0A1A0A Lytro Light Field Picture +>>8 ubelong x \b, version %u # Type: ARRI Raw Image # Info: SMPTE RDD30:2014 @@ -2849,6 +3350,7 @@ # Type: Khronos KTX texture. # From: David Korth <gerbilsoft@gerbilsoft.com> # Reference: https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/ +# https://www.iana.org/assignments/media-types/image/ktx # glEnum decoding. # NOTE: Only the most common formats are listed here. @@ -2923,6 +3425,8 @@ # Main KTX header. # Determine endianness, then check the rest of the header. 0 string \xABKTX\ 11\xBB\r\n\x1A\n Khronos KTX texture +!:mime image/ktx +!:ext ktx >12 ulelong 0x04030201 (little-endian) >>16 use khronos-ktx-endian-header >12 ubelong 0x04030201 (big-endian) @@ -2932,6 +3436,7 @@ # From: David Korth <gerbilsoft@gerbilsoft.com> # Based on draft19. # Reference: http://github.khronos.org/KTX-Specification/ +# https://www.iana.org/assignments/media-types/image/ktx2 # Supercompression enum. 0 name khronos-ktx2-supercompression @@ -3193,6 +3698,8 @@ # Main KTX2 header. 0 string \xABKTX\ 20\xBB\r\n\x1A\n Khronos KTX2 texture +!:mime image/ktx2 +!:ext ktx2 >20 ulelong x \b, %u >24 ulelong >1 x %u >28 ulelong >1 x %u @@ -3286,7 +3793,7 @@ # Microsoft Paint graphic # http://www.fileformat.info/format/mspaint/egff.htm -0 string DanM icrosoft Paint image data (version 1.x) +0 string DanM Microsoft Paint image data (version 1.x) >4 uleshort x (%d >>6 uleshort x x %d) 0 string LinS Microsoft Paint image data (version 2.0) @@ -3305,9 +3812,7 @@ >>>>33 string and >>>>>37 string layers >>>>>>43 ulelong x reMarkable tablet notebook lines, 1404 x 1872, %x page(s) - # newer per-page files for the reMarkable -0 string reMarkable >11 string .lines >>18 string file, >>>24 string version= @@ -3608,6 +4113,29 @@ # display ICC/ICM color profile by ./icc #>>>0x154 use color-profile +# URL: http://fileformats.archiveteam.org/wiki/CorelDRAW +# https://en.wikipedia.org/wiki/CorelDRAW +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cdr-gen.trid.xml +# Note: called "CorelDRAW drawing (generic)" by TrID +# version til 2 WL-based; from version 3 til 13 handled by ./riff and from 14 zip based handled by ./archive +0 ubelong&0xFFffF7ff 0x574C6500 Corel Draw Picture +#!:mime image/x-coreldraw +!:mime application/vnd.corel-draw +!:ext cdr +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cdr-corel-10.trid.xml +# Note: called "CorelDRAW drawing (v1.0)" by TrID and +# "CorelDraw Drawing" with version "1.0" by DROID via PUID fmt/467 +# only DROID fmt-467-signature-id-726.cdr example +>2 ubyte 0x65 \b, version 1.0 +#>>4 ubelong !0x45000000 \b, at 4 %#8.8x +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cdr-corel-20.trid.xml +# Note: called "CorelDRAW drawing (v2.0)" by TrID and +# "CorelDraw Drawing" with version "2.0" by DROID via PUID fmt/466 +>2 ubyte 0x6D \b, version 2.0 +# According to DROID 0xed080000 or 0x25050000 +#>>4 ubelong !0xed080000 +#>>>4 ubelong !0x25050000 \b, at 4 %#8.8x + # Type: Crunch compressed texture. # From: David Korth <gerbilsoft@gerbilsoft.com> # References: @@ -3679,9 +4207,9 @@ >>>13 ubyte x *bad colorspace %u* -# Type: Godot 3, 4 texture (pixel format) +# Type: Godot 3 texture (pixel format) # From: David Korth <gerbilsoft@gerbilsoft.com> -0 name godot-pixel-format +0 name godot-pixel-format-v3 >0 ulelong&0xFFFFF 0 L8 >0 ulelong&0xFFFFF 1 LA8 >0 ulelong&0xFFFFF 2 R8 @@ -3719,7 +4247,54 @@ >0 ulelong&0xFFFFF 34 ETC2_RGB8 >0 ulelong&0xFFFFF 35 ETC2_RGBA8 >0 ulelong&0xFFFFF 36 ETC2_RGB8A1 +# NOTE: This is a custom pixel format used by Sonic Colors Ultimate. +# Godot 4 later added its own ASTC format values. +>0 ulelong&0xFFFFF 37 ASTC_8x8 + +# Type: Godot 4 texture (pixel format) +# From: David Korth <gerbilsoft@gerbilsoft.com> +# NOTE: This is a custom pixel format used by Sonic Colors Ultimate. +# Godot 4 later added its own ASTC format values. +0 name godot-pixel-format-v4 +>0 ulelong&0xFFFFF 0 L8 +>0 ulelong&0xFFFFF 1 LA8 +>0 ulelong&0xFFFFF 2 R8 +>0 ulelong&0xFFFFF 3 RG8 +>0 ulelong&0xFFFFF 4 RGB8 +>0 ulelong&0xFFFFF 5 RGBA8 +>0 ulelong&0xFFFFF 6 RGBA4444 +>0 ulelong&0xFFFFF 7 RGB565 +>0 ulelong&0xFFFFF 8 RF +>0 ulelong&0xFFFFF 9 RGF +>0 ulelong&0xFFFFF 10 RGBF +>0 ulelong&0xFFFFF 11 RGBAF +>0 ulelong&0xFFFFF 12 RH +>0 ulelong&0xFFFFF 13 RGH +>0 ulelong&0xFFFFF 14 RGBH +>0 ulelong&0xFFFFF 15 RGBAH +>0 ulelong&0xFFFFF 16 RGBE9995 +>0 ulelong&0xFFFFF 17 DXT1 +>0 ulelong&0xFFFFF 18 DXT3 +>0 ulelong&0xFFFFF 19 DXT5 +>0 ulelong&0xFFFFF 20 RGTC_R +>0 ulelong&0xFFFFF 21 RGTC_RG +>0 ulelong&0xFFFFF 22 BPTC_RGBA +>0 ulelong&0xFFFFF 23 BPTC_RGBF +>0 ulelong&0xFFFFF 24 BPTC_RGBFU +>0 ulelong&0xFFFFF 25 ETC +>0 ulelong&0xFFFFF 36 ETC2_R11 +>0 ulelong&0xFFFFF 27 ETC2_R11S +>0 ulelong&0xFFFFF 28 ETC2_RG11 +>0 ulelong&0xFFFFF 29 ETC2_RG11S +>0 ulelong&0xFFFFF 30 ETC2_RGB8 +>0 ulelong&0xFFFFF 31 ETC2_RGBA8 +>0 ulelong&0xFFFFF 32 ETC2_RGB8A1 +>0 ulelong&0xFFFFF 33 ETC2_RA_AS_RG +>0 ulelong&0xFFFFF 34 DXT5_RA_AS_RG +>0 ulelong&0xFFFFF 35 ASTC_4x4 +>0 ulelong&0xFFFFF 36 ASTC_4x4_HDR >0 ulelong&0xFFFFF 37 ASTC_8x8 +>0 ulelong&0xFFFFF 38 ASTC_8x8_HDR # Type: Godot 3, 4 texture (rescale display, width) # From: David Korth <gerbilsoft@gerbilsoft.com> @@ -3791,7 +4366,7 @@ >16 ulelong&0x100000 0x100000 lossless encoding >16 ulelong&0x200000 0x200000 lossy encoding >16 ulelong&0x300000 0 ->>16 use godot-pixel-format +>>16 use godot-pixel-format-v3 # Type: Godot 4 texture # From: David Korth <gerbilsoft@gerbilsoft.com> @@ -3810,7 +4385,200 @@ >12 use godot-rescale-display-h >12 uleshort x \b, >0x2C ulelong >1 %u mipmaps, ->0x30 use godot-pixel-format +>0x30 use godot-pixel-format-v4 >0x24 ulelong 1 \b, embedded PNG image >0x24 ulelong 2 \b, embedded WebP image >0x24 ulelong 3 \b, Basis Universal + +# Summary: iCEDraw graphic *.IDF +# URL: http://fileformats.archiveteam.org/wiki/ICEDraw +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/idf-icedraw.trid.xml +# From: Joerg Jenderek +# Note: called "iCEDraw graphic" by TrID, "iCEDraw text" by FFmpeg and "iCE Draw" by Ansilove +# verified by FFmpeg command `ffprobe ICE-9605.IDF` and `ansilove -s SQ-FORCE.IDF` +0 string \0041.4\0\0\0\0O\0 iCEDraw graphic +#!:mime application/octet-stream +!:mime image/x-idf +!:ext idf + +# Type: ColoRIX VGA Paint Image File (.rix/.sci/.scX) +# From: Eddy Jansson <github.com/eloj> +# Reference: https://www.fileformat.info/format/rix/spec/ +# +0 name rix-header +>0 uleshort x \b, %u x +>2 uleshort x %u +# palette type: +# .. if direct color, low bits encode bpp +>4 ubyte&128 0 +>>4 ubyte&127 x \b %u bpp (direct color) +# .. else palette +>4 ubyte&128 128 +>>4 ubyte&7 0 \b x 2 +>>4 ubyte&7 1 \b x 4 +>>4 ubyte&7 2 \b x 8 +>>4 ubyte&7 3 \b x 16 +>>4 ubyte&7 4 \b x 32 +>>4 ubyte&7 5 \b x 64 +>>4 ubyte&7 6 \b x 128 +>>4 ubyte&7 7 \b x 256 +# storage type +#>5 ubyte&15 0 \b, Linear +>5 ubyte&15 1 \b, Planar (0213) +>5 ubyte&15 2 \b, Planar +>5 ubyte&15 3 \b, Text +>5 ubyte&15 4 \b, Planar lines +>5 ubyte&128 128 \b (compressed) +>5 ubyte&64 64 \b (extension) +>5 ubyte&32 32 \b (encrypted) + +0 string RIX3 ColoRIX Image +>4 use rix-header + +0 string RIX7 ColoRIX Slideshow + +# http://fileformats.archiveteam.org/wiki/PaperPort_(MAX) +0 string ViG Visioneer PaperPort +>3 string Ae 2 +>3 string Be 2 +>3 string Cj 3-4 +>3 string Em 5-7 +>3 string Fk 8-12 +>3 default x MAX + + +# https://teem.sourceforge.net/nrrd/index.html +# From: Quasar Jarosz <quasar@uams.edu>, 2023 +0 string NRRD000 NRRD imaging data +!:mime image/x.nrrd +!:ext nrrd +>7 string x \b, version %s +>0 search type: +>>&1 string x \b, type: %s +>0 search dimension: +>>&1 string x \b, dimensions: %s +>0 search sizes: +>>&1 string x \b, sizes: %s +>0 search encoding: +>>&1 string x \b, encoding: %s + +# From: Joerg Jenderek +# URL: http://justsolve.archiveteam.org/wiki/PICT +# https://en.wikipedia.org/wiki/PICT +# Reference: https://www.fileformat.info/format/macpict/egff.htm +# http://mark0.net/download/triddefs_xml.7z/defs/p/pict-v2.trid.xml +# Note: called "Macintosh Quickdraw/PICT drawing" by shared MIME-info database from freedesktop.org, +# "QuickDraw/PICT bitmap (v2)" by TrID and "Macintosh PICT Image" version 2.0 by DROID via PUID via fmt/341 +# verified by command like `deark -m pict -l -d2 flag_b24.pct` as PICT v2, +# partly by NetPBM `picttoppm venus.pct | file` as "Macintosh PICT", +# partly by ImageMagick `identify -verbose flag_b24.pct` as (Apple Macintosh QuickDraw/PICT) and +# partly by XnView `nconvert -fullinfo *.pict *.pic *.pct` as "Macintosh PICT 2" +# look for version operator (0011h) and version number (02FFh) +522 ubelong 0x001102ff +# 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) +!:strength +11 +# look for Version operator (0C00h) +>526 ubeshort 0x0c00 +# skip DROID fmt-341-signature-id-468.pct with invalid dimension x=0 +>>520 ubeshort !0 +# skip DROID variant fmt-341-signature-id-468.pct using 0xAB instead 0x0 +>>>0 long !0xABABABAB Macintosh QuickDraw PICT, version 2 +#!:mime application/octet-stream +!:mime image/x-pict +!:apple ????PICT +!:ext pict/pic/pct +# maybe also suffix pict2 https://www.xnview.com/de/image_formats/ +#!:ext pict2/pict/pic/pct +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pict.trid.xml +# Note: called "Macintosh Quickdraw/PICT Drawing" by TrID +# "real" content stored by opcode 0x8200 (CompressedQuickTime *.qtif) with none, cvid or JPEG compression +# look for LongText QuickTime followed by trademark character +>>>>554 search/691976/b QuickTime\252 \b, QuickTime +# look for LongText afterwards like "and a/None|Cinepak|Photo - JPEG decompressor/are needed to see this picture" +>>>>>&0 search/28/bs \040decompressor with decompressor +>>>>>>&-4 string None None +# Cinepak and "Compact Video decompressor" seems to be cvid +>>>>>>&-7 string Cinepak Cinepak +>>>>>>&-12 string Photo\040-\040JPEG JPEG +>>>>>>&-13 string Compact\040Video cvid +# case where decompression is not like: Cinepak None "Photo - JPEG" "Compact Video decompressor" +>>>>>>&-6 default x +>>>>>>>&0 string x "%0.6s" +# file size in bytes; not reliable sometimes 0 or little smaller than real size +#>>>>512 ubeshort x \b, size %u +# 8 bytes picFrame (rectangle); for most examples one corner is located at coordinates 0/0; except deark other tools fail when negative values +# GRR: samples with coordinates -1/-1 and Y=0x01??|0x00?? are interpreted as "Claris clip art" (strength=80 ./claris) +#>>>>518 ubeshort x Y=%#4.4x +>>>>520 ubeshort x \b, %u +>>>>>516 beshort !0 \b-%d +>>>>518 ubeshort x x %u +>>>>>514 beshort !0 \b-%d +# Note: at the beginning all zeros or information about the particular software like: PICT +>>>>0 long !0 \b, at 0 +>>>>>0 string x %.4s +# version 2.0 files also have a 26-byte header following the version information +# like: 0 FFFEh (freedesktop egff~Encyclopedia of Graphics File Formats) FFFFh (egff) +>>>>528 ubeshort x \b, at 528 %#4.4x +# 2nd opcode like: 0x0000~NOP 0x0001~Clip 0x00a0~ShortComment 0x00a1~LongComment 0x001e~DefHilite 0x001f~OpColor +>>>>552 ubeshort x \b, at 552 second opcode %#4.4x +# last opcode if not opEndPic (00FFh) +>>>>-2 ubeshort !0x00FF \b, at the end %#4.4x opcode +# Reference: http://web.archive.org/web/20010703041301/http://developer.apple.com/technotes/qd/qd_14.html +# http://mark0.net/download/triddefs_xml.7z/defs/p/pict-v1.trid.xml +# Note: called "QuickDraw/PICT bitmap (v1)" by TrID and "Macintosh PICT Image" version 1.0 by DROID via PUID via x-fmt/80 +# verified by command like `deark -m pict -l -d2 FC9.PCT` as PICT v1, +# by ImageMagick `identify -verbose *.pict` as PICT (Apple Macintosh QuickDraw/PICT) and +# by XnView `nconvert -fullinfo *.pict *.pct` as "Macintosh PICT" +# 1 byte opcode for picversion (11h); next byte version number (1) +522 ubeshort 0x1101 +# skip DROID x-fmt-80-signature-id-859.pct x-fmt-80-signature-id-860.pct without next opcode usually clipRgn (1h) +>524 ubyte =0x01 +>>0 use mac-pict1 +# display Macintosh PICT drawing version 1 information +0 name mac-pict1 +>520 ubeshort x Macintosh QuickDraw PICT, version 1 +#!:mime application/octet-stream +!:mime image/x-pict +!:apple ????PICT +!:ext pict/pct +# maybe also suffix pict1 and pic +#!:ext pict1/pict/pic/pct +# file size in bytes; not reliable sometimes 0 or smaller than real size +#>512 ubeshort x \b, size %u +# 8 bytes picFrame (rectangle) +>520 ubeshort x \b, %u +>516 ubeshort !0 \b-%u +>518 ubeshort x x %u +>514 ubeshort !0 \b-%u +# Note: According to DROID at the beginning all zeros or information about the particular software like DRWG(MD|D2) +>0 long !0 \b, at 0 +>>0 string x %.6s +>>0 ubelong x %#8.8x +>>4 ubeshort x \b%4.4x +# 2nd opcode if not clipRgn (1h) +>524 ubyte !0x01 \b, at 524 %#2.2x opcode +# last opcode if not opEndPic (FFh) +>-1 ubyte !0xFF \b, at the end %#2.2x opcode + +# https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md +20 ulelong 0 +>24 ulelong 0 +>>4 uleshort 0xA5E0 Aseprite asset file +!:ext aseprite +>>>0 ulelong x \b, size %u +>>>6 uleshort x \b, frames %u +>>>8 uleshort x \b, size %ux +>>>10 uleshort x \b%u +>>>12 uleshort 32 \b, RGBA +>>>12 uleshort 16 \b, Grayscale +>>>12 uleshort 8 \b, Indexed +>>>14 ulelong x \b, flags %#x +#>>>18 uleshort x \b, speed %u +>>>28 ubyte x \b, transparency index %u +>>>32 uleshort x \b, number of colors %u +>>>34 ubyte >0 \b, pixel ratio %u: +>>>>35 ubyte x \b%u +>>>36 leshort x \b, grid position (%d, +>>>38 leshort x \b%d) +>>>40 uleshort x \b, grid size %dx +>>>42 uleshort x \b%d |