1#/* 2# Configuration file for XV with recognition of 'Magic and Suffix' 3# 4# 5# $Id: xv_mgcsfx.sample,v 1.11 95/10/03 17:00:05 tin329 Exp Locker: tin329 $ 6# 7# Author: Tetsuya INOUE <tin329@chino.it.okayama-u.ac.jp> 8# 9# 10# MgcSfx definition should write in one line. 11# Format: 12# <desc>:<ms type>:<ofs>:<magic>:<suffix>:<in it>:<in c>:<out it>:<out c> 13# If you decide to not use preprocessor, comment style is allowed. 14# # <comment> 15# 16# <desc> Description of your recognized image format. 17# <ms type> Type ID for recognition. (You should use 'magic'.) 18# * magic Data of string style. 19# `\' escape for special characters: 20# \b \f \n \r \t \v \\ \' \" \a \? 21# \0 ...\377 octal value 22# \x0 ...\xff hexadecimal value 23# * suffix Suffix of file name. 24# This type check <suffix> instead 25# of <magic>. 26# * [b|l]eint16 2 byte integer of [big|little] endian. 27# * [b|l]eint32 4 byte integer of [big|little] endian. 28# <ofs> Offset of magic number in the target image file. 29# <magic> Data(magic number) of <ms type> to match at <ofs>. 30# <suffix> Suffix of filename with '.'start. 31# 32# <in it> Input image format type (output from <in c>). 33# * PNM (PPM, PGM, PBM) 34# * AUTO Recognized by xv management, and load. 35# This is different from others, because 36# this write file to temporary. 37# <out it> Output image format type (input to <out c>). 38# * PNM_RAW (PPM_RAW, PGM_RAW, PBM_RAW) 39# * PNM_ASCII (PPM_ASCII, PGM_ASCII, PBM_ASCII) 40# 41# <in c> Command to get the input image. 42# * Command mast read stdin or file(specified by 43# argument), and write to stdout. 44# * Use %s to represent the file name. Without %s, 45# get file on stdin. 46# <out c> Command to put the output image. 47# * Command mast read stdin and write to stdout. 48# 49# <comment> Any message. 50#*/ 51 52#/*############################################################################ 53# 54# definition of the rule with Magic and Suffix 55# 56#*/ 57 58# /* Canon View Station Image Format */ 59ViewStation(std):magic:0:VsStdImf V0.2:.vs:PNM:VStopnm %s:PNM_RAW:pnmtoVS 60ViewStation(obj):magic:0:VsObjFormat V1.0:.vs:PNM:VSobjtopnm -:PNM_RAW:pnmtoVSobj 61 62# /* CERN httpd cache */ 63# /* unchc skip header of CERN httpd cache file, and write data to stdout. */ 64CERN httpd cache:magic:0:HTTP/1.0::AUTO:unchc %s:: 65 66# /* XLD4(Q4) image format */ 67XLD(Q4):magic:11:MAJYO:.q4:PNM:q4toppm:: 68 69# /* ML1 image format */ 70ML1:magic:0:\1\0\0\x1a:.ml1:PNM:ml1toppm %s:: 71 72# /* Pict image format, 256 color only */ 73PICT:suffix:::.pict:PNM:picttoppm:PNM_RAW:ppmquant 256 | ppmtopict 74PICT(gzip):suffix:::.pict.gz:PNM:gzip -dc | picttoppm:PNM_RAW:ppmquant 256 | ppmtopict | gzip 75PICT(compress):suffix:::.pict.Z:PNM:compress -dc | picttoppm:PNM_RAW:ppmquant 256 | ppmtopict | compress 76 77# /* Tim image format(used by SONY PlayStation) */ 78TIM:magic:0:\x10\x00\x00\x00:.tim:PNM:timtoppm:: 79 80# /* Cam image format(used by CASIO QV-10) */ 81# /* CAM:magic:0:\x07\x20\x4d\x4d:.cam:AUTO:camtoppm -j:PNM_RAW */ 82CAM:magic:0:\x07\x20\x4d\x4d:.cam:PNM:camtoppm:: 83 84# /* Portable Network Graphics (PNG) format : magic is "0x89 PNG" */ 85PNG:magic:0:\x89\x50\x4e\x47:.png:PNM:pngtopnm %s:PNM_RAW:pnmtopng 86# /* PNG(interlace):magic:0:\x89\x50\x4e\x47:.png:PNM:pngtopnm %s:PNM_RAW:pnmtopng -interlace */ 87 88# /* DB-Z, SAURUS Freehand Memo, PV-F1 Action Board, Wiz Quick Memo format */ 89# /* Use xbm2free-1.10 or later. Old version is NOT a filter. */ 90# /* To show version of xbm2free, type "xbm2free" (with no argument). */ 91ZAURUS:magic:19:IMG1:.zau:PBM_ASCII:free2pbm:PBM:pbmtoxbm|xbm2free -s - 92DBZ:magic:19:IMG1:.dbz:::PBM:pbmtoxbm|xbm2free -d - 93PVF1:magic:12:IMG1:.pvf1:PBM_ASCII:free2pbm:PBM:pbmtoxbm|xbm2free -v - 94# /* WIZ:magic:19:IMG1:.wiz:::PBM:pbmtoxbm|xbm2free -w - */ 95 96 97 98# /* Compress:magic:0:\037\235:.Z:AUTO:uncompress %s:: */ 99# /* Gzip:magic:0:\037\213:.gz:AUTO:gunzip %s:: */ 100# /* Gzip(old):magic:0:\037\236:.z:AUTO:gunzip %s:: */ 101 102# /* MAKI:magic:0:MAKI01A\040:.mki:::: */ 103# /* MAKI:magic:0:MAKI01B\040:.mki:::: */ 104# /* MAG:magic:0:MAKI02\040\040:.mag:::: */ 105# /* Pi:magic:0:Pi:.pi:::: */ 106# /* PIC:magic:0:PIC:.pic:::: */ 107# /* PIC2:magic:0:P2DT:.p2:::: */ 108# /* PhotoCD:magic:0:\xff\xff\xff\xff:.pcd:::: */ 109 110# /* PBM(ascii):magic:0:P1:.pbm:::: */ 111# /* PGM(ascii):magic:0:P2:.pgm:::: */ 112# /* PPM(ascii):magic:0:P3:.ppm:::: */ 113# /* PBM(raw):magic:0:P4:.pbm:::: */ 114# /* PGM(raw):magic:0:P5:.pgm:::: */ 115# /* PPM(raw):magic:0:P6:.ppm:::: */ 116 117# /* Sun raster:magic:0:\131\246\152\225:.sun:::: */ 118# /* JFIF(JPEG):magic:0:\xff\xd8\xff:.jpg:::: */ 119# /* TIFF big-endian:magic:0:\115\115:.tif:::: */ 120# /* TIFF little-endian:magic:0:\111\111:.tif:::: */ 121# /* GIF(87):magic:0:GIF87a:.gif:::: */ 122# /* GIF(89):magic:0:GIF89a:.gif:::: */ 123# /* SGI(1):magic:0:\x01\xda:.rgb:::: */ 124# /* SGI(2):magic:0:\xda\x01:.rgb:::: */ 125# /* XWD:magic:0:\0\0\0\7: :::: */ 126