Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/netpbm-10.35.58/userguide/ drwxr-xr-x |
Viewing file: infotopam.html (6.53 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | infotopamUpdated: 07 April 2004 NAMEinfotopam - convert Amiga .info icons to PAM SYNOPSISinfotopam [-forcecolor] [-numcolors numcolors] [-selected] [index color ...] [filename] Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value. EXAMPLESBy default, infotopam converts the first icon in a .info file: infotopam amiga.info > amiga.first.pam Use the -selected option to convert the second icon in a .info file. Here infotopam reads from Standard Input: infotopam -selected < amiga.info > amiga.second.pam Use the -forcecolor option to force color conversion for a 1 bit-plane .info file: infotopam -forcecolor bw.info > bw.pam Use -numcolors to override colors for indexes 0 and 3. Notice the two ways to specify the color: infotopam -numcolors 2 0 green 3 #FF0000 icon.info > icon.pam Since Amiga monitors do not use square pixels, some icons may appear squished. Filtering the output through pamscale can fix this: infotopam squish.info | pamtopnm | pamscale -yscale 1.7 > normal.pnm DESCRIPTIONThis program is part of Netpbm. infotopam converts an Amiga .info (icon) file to a PAM image. infotopam reads a .info file from filename, or from Standard Input if you do not specify a file name, and writes the converted PAM image to Standard Output. infotopam currently handles 1 and 2 bit-plane icons. If the .info icon only has 1 bit-plane, infotopam generates a bitmap (black&white) PAM image; otherwise it generates a color PAM image. You can force infotopam to convert 1 bit-plane images to color PAM images by using the -forcecolor option. OPTIONS
All options can be abbreviated to their shortest unique prefix. SEE ALSONOTESThanks to the following people on comp.sys.amiga.programmer for tips and pointers on decoding the info file format:
The format of the Amiga .info file is as follows: DiskObject header 78 bytes Optional DrawerData header 56 bytes First icon header 20 bytes First icon data Varies Second icon header 20 bytes Second icon data Varies The DiskObject header contains, among other things, the magic number (0xE310), the object width and height (inside the embedded Gadget header), and the version. Each icon header contains the icon width and height, which can be smaller than the object width and height, and the number of bit-planes. The icon data has the following format:
So if you have a 9x3x2 icon, the icon data will look like this: aaaa aaaa a000 0000 aaaa aaaa a000 0000 aaaa aaaa a000 0000 bbbb bbbb b000 0000 bbbb bbbb b000 0000 bbbb bbbb b000 0000 where a is a bit for the first bit-plane, b is a bit for the second bit-plane, and 0 is padding. Thanks again to Ben Hutchings for his very helpful post! HISTORYinfotopam was new in Netpbm 10.22 (April 2004). LIMITATIONSinfotopam currently only handles 1 and 2 bit-plane icons. There is no pamtoinfo command, since the .info files contain a lot more than just icon data, and mapping the colors would be difficult. AUTHORCopyright (C) 2000, 2004 by Richard Griswold. Table Of Contents |