home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / alchemy / alchemy.doc next >
Text File  |  1993-09-16  |  391KB  |  12,981 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                                      Image Alchemy
  14.  
  15.  
  16.  
  17.  
  18.                                       Version 1.7
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.                                 Handmade Software, Inc.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.           Notice           Handmade Software, Inc. makes no warranty of any
  67.                            kind either expressed or implied.  In particular
  68.                            we make no warranty as to merchantability or
  69.                            fitness for a particular purpose.
  70.  
  71.  
  72.                            In no event shall Handmade Software, Inc. be
  73.                            liable for any errors contained herein or for
  74.                            incidental or consequential damages in connection
  75.                            with the furnishing, performance, or use of the
  76.                            Image Alchemy product or documentation.
  77.  
  78.  
  79.                            This document contains proprietary information
  80.                            which is protected by copyright.  No part of this
  81.                            document may be photocopied, reproduced, or
  82.                            translated without the prior written consent of
  83.                            Handmade Software, Inc.
  84.  
  85.  
  86.                            The information in this document is subject to
  87.                            change without notice.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.                            Copyright (c) 1990-1993 Handmade Software, Inc.
  105.  
  106.  
  107.                            All Rights Reserved
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.           ii
  121.  
  122.  
  123.  
  124.  
  125.  
  126.           Printing         This manual was created using Microsoft Word 5.1a
  127.           history          on a Macintosh II computer.  
  128.  
  129.                            First Printing
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.                            Handmade Software, Inc.
  152.                            48820 Kato Road, Suite 110
  153.                            Fremont, CA  94538
  154.                             1 800 358 3588
  155.                            +1 510 252 0101
  156.                            +1 510 252 0909 fax
  157.                            +1 510 252 0929 BBS
  158.  
  159.                            Internet:  hsi@netcom.COM
  160.                            CompuServe:  71330, 3136
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.                                                                           iii
  180.  
  181.  
  182.  
  183.  
  184.           Author credits
  185.  
  186.             Image Alchemy  Marcos H. Woehrmann
  187.            was written by  Allan N. Hessenflow
  188.                            David Kettmann
  189.                            Paul H. Yoshimune
  190.  
  191.  
  192.  
  193.           Other credits
  194.  
  195.  
  196.            Marc Schneider  Who provided assistance with the Sun
  197.                            implementation of Image Alchemy including Beta
  198.                            testing and answering questions about the internal
  199.                            format of Sun Raster files.
  200.  
  201.  
  202.  
  203.  
  204.               Jack, Norm,  Who proofread the manual (any remaining misteaks
  205.           Erwin, and Dave  are because we made changes after they read it for
  206.                            the final time).
  207.  
  208.  
  209.  
  210.  
  211.             Everyone Else  Who gave us advice and assistance and especially
  212.                            to those people who sent us sample image files.
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.           iv
  239.  
  240.  
  241.  
  242.  
  243.           Trademarks       Image Alchemy is a trademark of Handmade Software,
  244.                            Inc.
  245.  
  246.  
  247.  
  248.                            All other products or services mentioned in this
  249.                            manual, including: IBM PC, IBM PC AT, 80286,
  250.                            80386, 80486, VGA, 8514/A, Paradise, Everex,
  251.                            Trident, Video 7, Tseng Labs, Western Digital, MS-
  252.                            DOS, PC-DOS, SPARC, Sun, SPARCstation,
  253.                            SPARCserver, SunOS, Targa, PostScript, EPS,
  254.                            Encapsulated PostScript, GIF, ILBM, IFF,
  255.                            Macintosh, Silicon Graphics, SGI, PCX, TIFF,
  256.                            Windows, Windows BitMaP, EGA, PCL, HP, AI, PS/2,
  257.                            HAM, PC Paintbrush, MacBinary, PHIPS, NeXT, C-
  258.                            Cube, Storm Technology, Radius, ColorSqueeze,
  259.                            VFCtool, Amiga, CompuServe, LaserJet, Melior, and
  260.                            Gill Sans are trademarks, registered trademarks,
  261.                            service marks, or registered service marks of
  262.                            their respective companies or organizations.
  263.  
  264.  
  265.  
  266.                            Even though they are never mentioned in this
  267.                            document, you should know that Yellow Pages is a
  268.                            registered trademark in the United Kingdom of
  269.                            British Telecommunications plc., and may also be a
  270.                            trademark of various telephone companies around
  271.                            the world.
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.                                                                             v
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.           Contents
  310.           -------------------------------------------------------------------
  311.  
  312.  
  313.  
  314.           Chapter 0
  315.              Introduction..................................1
  316.              About This Manual.............................2
  317.              Pathnames.....................................3
  318.              Wildcard Expansion............................3
  319.  
  320.  
  321.           Chapter 1  Installation
  322.              Introduction..................................4
  323.  
  324.              MS-DOS
  325.                Required Equipment..........................5
  326.                Optional Equipment..........................6
  327.                Packing List................................7
  328.                Installation Instructions...................8
  329.  
  330.              386 for MS-DOS
  331.                Required Equipment.........................11
  332.                Packing List...............................12
  333.                Installation Instructions..................12
  334.  
  335.              Unix
  336.                Packing List...............................14
  337.                Installation Instructions..................14
  338.  
  339.  
  340.           Chapter 2  Introduction
  341.              Basic Instructions...........................16
  342.              Filename Limitations.........................17
  343.              Output Path Name.............................18
  344.              Option Files.................................29
  345.              Multiple Runs of Alchemy.....................21
  346.  
  347.  
  348.           Chapter 3  Graphical User Interface (MS-DOS Only)
  349.              Introduction.................................23
  350.              Menus
  351.                File.......................................24
  352.                Resize.....................................27
  353.  
  354.  
  355.           Contents                                                          1
  356.  
  357.  
  358.  
  359.  
  360.                Palette....................................27
  361.                Colors.....................................28
  362.                Dither.....................................28
  363.  
  364.  
  365.           Chapter 4  Output Options
  366.              Introduction.................................30
  367.              MacBinary....................................32
  368.              Other Information............................32
  369.  
  370.              Image File Formats
  371.                ADEX.......................................34
  372.                Alpha Microsystems BMP.....................35
  373.                Autologic..................................36
  374.                AVHRR......................................37
  375.                Binary Information File....................39
  376.                Calcomp CCRF...............................41
  377.                CALS.......................................42
  378.                Cubicomp PictureMaker......................43
  379.                Dr. Halo CUT...............................45
  380.                Encapsulated PostScript....................46
  381.                ER Mapper Raster...........................47
  382.                Erdas LAN/GIS..............................49
  383.                First Publisher ART........................50
  384.                Freedom of Press...........................51
  385.                GEM VDI Image File.........................52
  386.                GIF........................................54
  387.                GOES.......................................56
  388.                Hitachi Raster Format......................58
  389.                HP Printer Command Language................59
  390.                HP Raster Transfer Language................63
  391.                HP-48sx Graphic Object GROB................66
  392.                HSI JPEG...................................67
  393.                HSI Palette................................68
  394.                HSI Raw....................................69
  395.                IBM Picture Maker..........................70
  396.                IFF/ILBM...................................71
  397.                Img Software Set...........................72
  398.                JPEG/JFIF..................................73
  399.                Jovian VI..................................76
  400.                Lumena CEL.................................77
  401.                Macintosh PICT/PICT2.......................78
  402.                MacPaint...................................79
  403.                MTV Ray Tracer.............................80
  404.                Multi-Image Palette........................81
  405.                OS/2 Bitmap................................82
  406.                PCPAINT/Pictor Page Format.................83
  407.                PCX........................................85
  408.                PDS........................................88
  409.                Portable BitMap............................89
  410.                Puzzle.....................................91
  411.                Q0.........................................92
  412.  
  413.  
  414.           2    Contents
  415.  
  416.  
  417.  
  418.  
  419.                QDV........................................93
  420.                QRT........................................94
  421.                RIX........................................95
  422.                Scodl......................................96
  423.                Silicon Graphics Image.....................98
  424.                SPOT Image.................................99
  425.                Stork.....................................101
  426.                Sun Icon..................................102
  427.                Sun Raster................................103
  428.                Tagged Interchange File Format (TIFF).....105
  429.                Targa.....................................107
  430.                Utah Raster Toolkit.......................108
  431.                Vivid.....................................109
  432.                Windows Bitmap............................110
  433.                WordPerfect Graphic File..................113
  434.                XBM.......................................114
  435.                XPM.......................................115
  436.                XWD.......................................117
  437.  
  438.  
  439.           Chapter 5  General Options
  440.              Introduction................................118
  441.              Conserve Memory.............................119
  442.              Display Image Stats.........................120
  443.              Do Not Alter Output Filename................121
  444.              Help........................................122
  445.              Overwrite...................................123
  446.              Program Information.........................124
  447.              Quiet.......................................125
  448.              Warnings....................................126
  449.              Wildcard....................................127
  450.  
  451.  
  452.           Chapter 6  Colour and Palette Options
  453.              Introduction................................129
  454.              Black and White.............................130
  455.              Colours.....................................131
  456.              Dither......................................133
  457.              EGA Palette.................................135
  458.              False Colour................................136
  459.              Gamma Correction............................137
  460.              Match Palette...............................139
  461.              Negate......................................140
  462.              Palette.....................................141
  463.              Palette Selection...........................142
  464.              Spiff.......................................144
  465.              True Colour (15 bits).......................146
  466.              True Colour (16 bits).......................147
  467.              True Colour (24 bits).......................148
  468.              True Colour (32 bits).......................149
  469.              Undercolour Removal.........................150
  470.              Uniform Palette.............................151
  471.  
  472.  
  473.           Contents                                                          3
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.           Chapter 7  Scaling Options
  481.              Introduction................................152
  482.              Flip Image..................................153
  483.              Preserve Aspect Ratio.......................154
  484.              Scale Image Horizontally....................155
  485.              Scale Image Vertically......................157
  486.              Specify Image Aspect Ratio..................158
  487.              Specify Image Resolution....................160
  488.  
  489.  
  490.           Chapter 8  Viewing Options (MS-DOS Only)
  491.              Display Hardware............................162
  492.              Offset View.................................165
  493.              View Image..................................166
  494.              View Image in True Colour Mode..............167
  495.              View Scaled Image...........................168
  496.              View Scaled Image in True Colour Mode.......169
  497.  
  498.  
  499.           Chapter 9  Tutorial and Examples
  500.              Introduction................................170
  501.  
  502.  
  503.           Appendix A  Answers to Frequently Asked Questions
  504.                ..........................................173
  505.  
  506.  
  507.           Appendix B  Colour and Dithering
  508.                ..........................................183
  509.  
  510.  
  511.           Appendix C  JPEG Description
  512.                ..........................................187
  513.  
  514.  
  515.           Appendix D  Customer Support
  516.                ..........................................190
  517.  
  518.  
  519.           Appendix E  Binary Information Files (BIF)
  520.                ..........................................192
  521.  
  522.  
  523.           Appendix F  HSI Raw Files
  524.                ..........................................195
  525.  
  526.  
  527.           Appendix G  Undercolour Removal Files
  528.                ..........................................199
  529.  
  530.  
  531.  
  532.           4    Contents
  533.  
  534.  
  535.  
  536.  
  537.  
  538.           Appendix H  HSI PAL Files
  539.                ..........................................202
  540.  
  541.  
  542.           Appendix I  Acknowledgments
  543.                ..........................................203
  544.  
  545.  
  546.           Appendix J  Other Useful Software
  547.                ..........................................204
  548.  
  549.  
  550.           Glossary
  551.                ..........................................207
  552.  
  553.  
  554.           References
  555.                ..........................................209
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.           Contents                                                          5
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.                                                                             0
  600.  
  601.  
  602.  
  603.           Introduction to Image Alchemy
  604.           -------------------------------------------------------------------
  605.  
  606.  
  607.           What is Image    Image Alchemy is a software utility that
  608.           Alchemy?         manipulates computer image files.
  609.  
  610.  
  611.                            Primarily, Image Alchemy converts between various
  612.                            graphics file formats.  Image Alchemy can
  613.                            translate between a large variety of file formats
  614.                            including industry standards such as GIF and TIFF
  615.                            as well as vendor specific file formats such as
  616.                            Sun Raster and Scodl.  Currently Alchemy supports
  617.                            over 60 different formats, and new formats are
  618.                            always being added; in fact, our goal is to have
  619.                            Image Alchemy be able to read and write every
  620.                            graphics file in the world.
  621.  
  622.  
  623.                            Image Alchemy can also make changes in an image.
  624.                            For example, Image Alchemy can re-size an image,
  625.                            change the number of colours in an image, change
  626.                            an image from colour to black and white, and
  627.                            change the colour space an image uses.
  628.  
  629.  
  630.                            Finally, Image Alchemy performs JPEG compression.
  631.                            This is a standard for image compression that can
  632.                            achieve much higher compression ratios than
  633.                            conventional compression techniques.  It achieves
  634.                            this high compression ratio by not entirely
  635.                            preserving the original image (this is referred to
  636.                            as "lossy" compression).  For further information
  637.                            see Appendix C, "What is JPEG Compression".
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.                                                      Image Alchemy          1
  651.  
  652.  
  653.  
  654.  
  655.           About this       This manual is divided into 10 chapters, 11
  656.           manual           appendices, a glossary, references, and an index.
  657.  
  658.  
  659.                 Chapter 0  Introduction and Conventions
  660.                 Chapter 1  Installation Instructions
  661.                 Chapter 2  Introduction to Alchemy
  662.                 Chapter 3  Graphical User Interface
  663.                 Chapter 4  Output Options
  664.                 Chapter 5  General Options
  665.                 Chapter 6  Colour and Palette Options
  666.                 Chapter 7  Scaling Options
  667.                 Chapter 8  Viewing Options
  668.                 Chapter 9  Tutorial and Examples
  669.                Appendix A  Answers to Frequently Asked Questions
  670.                Appendix B  Colour and Dithering
  671.                Appendix C  JPEG Description
  672.                Appendix D  Customer Support
  673.                Appendix E  Binary Information Files (BIF)
  674.                Appendix F  HSI Raw Files
  675.                Appendix G  Undercolour Removal Files
  676.                Appendix H  PAL Files
  677.                Appendix I  Acknowledgments
  678.                Appendix J  Other Useful Software
  679.                Appendix K  Configuring DOS/4GW
  680.                  Glossary
  681.                References
  682.                     Index
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.           2          Image Alchemy
  710.  
  711.  
  712.  
  713.  
  714.  
  715.           Pathnames        Because the MS-DOS and UNIX operating systems use
  716.                            different conventions for path names, users of
  717.                            UNIX will have to substitute forward slashes, "/",
  718.                            for the back slashes, "\", found in the examples
  719.                            in this manual.
  720.  
  721.  
  722.  
  723.  
  724.           Unintentional    UNIX users should also be aware that the UNIX
  725.           wildcard         shell they are using may be performing wildcard
  726.           expansion        expansion on certain characters (generally "*" and
  727.                            "?").  Since these are options which Alchemy uses,
  728.                            they need to be escaped to prevent the wildcard
  729.                            substitution.  This is done by using a back slash,
  730.                            "\", before the character (so -? becomes -\?).
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.                                                      Image Alchemy          3
  769.  
  770.  
  771.  
  772.  
  773.                                                                             1
  774.  
  775.  
  776.  
  777.           Installing Image Alchemy
  778.           -------------------------------------------------------------------
  779.  
  780.  
  781.           Overview         Installation of Image Alchemy is simple; it
  782.                            involves copying the Alchemy program off of the
  783.                            floppy disk or tape onto your hard drive or
  784.                            network.
  785.  
  786.  
  787.                            You need to be familiar with the copy command if
  788.                            doing a DOS installation and the tar command if
  789.                            doing a UNIX installation.  If you are not
  790.                            familiar with these commands you may wish to read
  791.                            the manuals which came with your computer or ask
  792.                            someone to assist you.
  793.  
  794.  
  795.                            The installation instructions are divided into
  796.                            different sections for Image Alchemy for MS-DOS,
  797.                            Image Alchemy/386, and Image Alchemy for UNIX.
  798.                            Please refer to the section which corresponds to
  799.                            your hardware.
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.           4          Image Alchemy
  828.  
  829.  
  830.  
  831.  
  832.           Image Alchemy for MS-DOS
  833.           -------------------------------------------------------------------
  834.  
  835.  
  836.           Required         At a minimum you must have the following hardware
  837.           equipment        and software to run Image Alchemy.
  838.  
  839.  
  840.  
  841.  
  842.                  Computer  An MS-DOS computer equipped with an 80286, 80386,
  843.                            or 80486.
  844.  
  845.  
  846.                            Many of the conversions that Alchemy does are cpu
  847.                            intensive, so a faster computer is definitely an
  848.                            advantage.
  849.  
  850.  
  851.  
  852.  
  853.                    Memory  At least 400k of free memory.
  854.  
  855.  
  856.                            Some conversions and some images require even more
  857.                            memory (Alchemy will attempt to use all available
  858.                            system memory, so if you get out-of-memory errors
  859.                            or warnings try removing as many resident programs
  860.                            as you can (also, installing MS-DOS 5.0, MS-DOS
  861.                            6.0, or a 3rd party memory manager such as 386MAX
  862.                            or QEMM will free up more memory)).
  863.  
  864.  
  865.                            Alchemy makes use of extended, expanded, and xms
  866.                            memory while performing conversions.  This can
  867.                            greatly speed up the conversion process.  In
  868.                            general you will need as much memory as the size
  869.                            of the image, in pixels, being converted.  For
  870.                            example, a 640x480 true colour image will use 900k
  871.                            of memory).
  872.  
  873.                Hard drive  A hard drive with at least as much free space as
  874.                            four times the size of the image being converted
  875.                            (i.e. a 640x480 image will require approximately
  876.                            1.2 megabytes of free space).
  877.  
  878.  
  879.  
  880.  
  881.                   Display  A supported VGA, 8514/A, or XGA board, if you wish
  882.                            to view images.
  883.  
  884.  
  885.  
  886.                                                      Image Alchemy          5
  887.  
  888.  
  889.  
  890.  
  891.  
  892.                            Supported SVGA boards include those with a VESA
  893.                            driver or with the Paradise, Everex, Trident,
  894.                            Video 7, ATI, Ahead, NCR, or Tseng Labs chipsets.
  895.  
  896.  
  897.                            Supported 8514/A boards include IBM and those with
  898.                            the Western Digital chipset.
  899.  
  900.  
  901.  
  902.                 Operating  MS-DOS or PC-DOS 3.x or greater (because of the
  903.                    system  additional free memory available use of MS-DOS 5.0
  904.                            or MS-DOS 6.0 is highly recommended).
  905.  
  906.  
  907.  
  908.  
  909.           Optional         The following hardware and software is optional to
  910.           equipment        run Image Alchemy.
  911.  
  912.  
  913.  
  914.  
  915.            VESA VGA board  To get full use out of viewing images on a SVGA
  916.                            board a VESA driver is needed.  Without a VESA
  917.                            driver Alchemy is limited to displaying images in
  918.                            320x200x256, 360x480x256, and 640x400x256 modes
  919.                            (and 640x480x32768 if you SVGA board is capable of
  920.                            15 bit operation);  with a VESA driver the
  921.                            resolution is limited only by your SVGA board and
  922.                            monitor.  Resolutions up to 1280x1024x256 and
  923.                            1280x1024x16 million are possible.
  924.  
  925.  
  926.  
  927.                            The VESA driver is supplied by the manufacturer of
  928.                            your SVGA board.  It may already be included in
  929.                            the BIOS on your SVGA board, or it may have been
  930.                            shipped on a floppy disk with your SVGA board.
  931.                            Consult the documentation that came with the SVGA
  932.                            board.  If there is no mention of a VESA driver in
  933.                            the documentation contact your dealer or the
  934.                            manufacturer of your SVGA board; VESA drivers are
  935.                            currently available for VGA boards using chipsets
  936.                            from Cirrus Logic, ATI Technologies, Chips and
  937.                            Technologies, Everex Systems, Genoa Systems,
  938.                            Paradise Logic, Sigma Designs, STB Systems,
  939.                            Tecmar, Headland Technology (Video 7), Orchid
  940.                            Technology, Appian Technology, Trident
  941.                            Microsystems, and Oak Technology.
  942.  
  943.  
  944.  
  945.           6          Image Alchemy
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.                            Refer to your SVGA documentation on how to install
  953.                            the VESA driver.
  954.  
  955.  
  956.  
  957.  
  958.                      Math  A math coprocessor will not affect the speed of
  959.               coprocessor  most operations; the only operations that use much
  960.                            floating point math are scaling types c and d.
  961.  
  962.  
  963.  
  964.  
  965.           Packing list     The enclosed diskette contains the following
  966.                            files:
  967.  
  968.                            INSTALL.EXE  The Image Alchemy installation
  969.                                         program.
  970.  
  971.                            ALCHEMY.EXE  The Alchemy software.
  972.  
  973.                            GUI.EXE      The Alchemy menu interface.
  974.  
  975.                            READ.ME      A text document describing any last
  976.                                         minute revisions.
  977.  
  978.                            SAMPLES      A directory containing sample data
  979.                                         files and images.  See the READ.ME
  980.                                         file in this directory for further
  981.                                         information.
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.                                                      Image Alchemy          7
  1005.  
  1006.  
  1007.  
  1008.  
  1009.           Installation     1. Insert the appropriate floppy disk in your disk
  1010.           instructions        drive.
  1011.  
  1012.                            2. Change to the drive by typing either a: or b:.
  1013.  
  1014.                            3. Type install.  This will install Image Alchemy
  1015.                               in the c:\alchemy directory.
  1016.  
  1017.                               If you would like to install on a different
  1018.                               drive or a specific directory, you can do this
  1019.                               by typing install followed by the location
  1020.                               where you want Image Alchemy installed.
  1021.  
  1022.                               For example:  install d:\util\alchemy will
  1023.                               install the software in the d:\util\alchemy
  1024.                               directory.
  1025.  
  1026.                            5. You have now successfully installed Image
  1027.                               Alchemy.
  1028.  
  1029.                            6. The file read.me contains information which has
  1030.                               changed since the manual was printed.  To
  1031.                               display the read.me file type type read.me.
  1032.  
  1033.  
  1034.           Environment
  1035.           variable usage
  1036.  
  1037.  
  1038.            Temporary disk  Alchemy uses the environment variable TMP to
  1039.                     files  determine where to open its temporary files.  If
  1040.                            you have a big enough ram drive you will want to
  1041.                            specify it using the TMP variable.  Be aware that
  1042.                            Alchemy needs up to 4 times as much space on that
  1043.                            drive as the size of the image (a 640 by 480 image
  1044.                            requires up to 1.2 Megabytes).  An example of
  1045.                            setting the TMP variable to drive e: would be "set
  1046.                            TMP=e:".
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.           8          Image Alchemy
  1064.  
  1065.  
  1066.  
  1067.  
  1068.           Use of extended  If there is enough extended or expanded memory
  1069.              and expanded  available, Alchemy will use it instead of the
  1070.                    memory  temporary file it would otherwise use during some
  1071.                            conversions.  To use extended memory you must have
  1072.                            an XMS driver installed in the config.sys file
  1073.                            (such as HIMEM.SYS or 386MAX). To use expanded
  1074.                            memory you must have a LIM 3.2 or LIM 4.0 expanded
  1075.                            memory driver installed (such as EMM386, QEMM, or
  1076.                            386MAX).
  1077.  
  1078.                            Alchemy's use of extended/expanded memory can be
  1079.                            disabled.  To disable the use of extended and
  1080.                            expanded memory, set an environment variable
  1081.                            called 'alchemy' to 'x' (type "set alchemy=x" at
  1082.                            the DOS prompt).
  1083.  
  1084.                            Note that the availability of extended or expanded
  1085.                            memory will not allow you to convert larger
  1086.                            images, it will just increase the speed of
  1087.                            conversions.  If you need to convert very large
  1088.                            images we also have a 386 Enhanced version of
  1089.                            Image Alchemy, which will allow 80386 and 80486
  1090.                            users to make use of the linear addressing space
  1091.                            of those processors along with virtual memory to
  1092.                            convert images of up to 32000 x 32000 (assuming
  1093.                            you have enough disk space).  Please contact us if
  1094.                            you are running out of memory and are interested
  1095.                            in upgrading to Image Alchemy/386.
  1096.  
  1097.              Checking for  Alchemy will normally check to determine if there
  1098.             8514/A boards  is an 8514/A board installed in the computer when
  1099.                            viewing images.  However, this can cause problems
  1100.                            with some network boards, as they use the same I/O
  1101.                            addresses that 8514/A boards use.  To disable
  1102.                            8514/A checking, set the environment variable
  1103.                            called 'alchemy' to '8' (type "set alchemy=8" at
  1104.                            the DOS prompt).
  1105.  
  1106.  
  1107.                            Note that this can be combined with other options;
  1108.                            for example, to disable both 8514/A checking and
  1109.                            extended/expanded memory usage, use
  1110.                            "set alchemy=8x".
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.                                                      Image Alchemy          9
  1123.  
  1124.  
  1125.  
  1126.  
  1127.                  Limiting  Alchemy will automatically choose the lowest
  1128.           maximum display  resolution which will fit the entire image when
  1129.                resolution  viewing images without specifying a display
  1130.                            resolution with a VESA compatible VGA board.
  1131.                            However, depending on the monitor and VGA board
  1132.                            combination you have, this can be bad since the
  1133.                            monitor may not support the particular resolution
  1134.                            the SVGA board is trying to switch to.  To avoid
  1135.                            this problem, the environment variable 'alchemy'
  1136.                            may now be set to indicate the maximum display
  1137.                            resolution which Alchemy should use.  Set the
  1138.                            alchemy variable to the highest horizontal
  1139.                            resolution which your monitor is capable of.
  1140.                            Valid values are 1280, 1024, 800, and 640.  For
  1141.                            example, type "set alchemy=800" at the DOS prompt
  1142.                            if your monitor only supports 640x480 and 800x600
  1143.                            mode.
  1144.  
  1145.                            Note that this can be combined with other options;
  1146.                            for example, to disable 8514/A checking, disable
  1147.                            extended/expanded memory usage, and limit the
  1148.                            viewing resolution to 640x480 use
  1149.                            "set alchemy=8x640".  You can also place this line
  1150.                            in your autoexec.bat file.
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.           10          Image Alchemy
  1182.  
  1183.  
  1184.  
  1185.  
  1186.           Image Alchemy/386 for MS-DOS
  1187.           -------------------------------------------------------------------
  1188.  
  1189.  
  1190.           Required         At a minimum you must have the following hardware
  1191.           equipment        and software to run Image Alchemy/386.
  1192.  
  1193.  
  1194.  
  1195.                  Computer  An MS-DOS computer equipped with an 80386, 80486,
  1196.                            or other 32bit Intel processor.
  1197.  
  1198.                            Many of the conversions that Alchemy does are cpu
  1199.                            intensive, so a faster computer is definitely an
  1200.                            advantage.
  1201.  
  1202.  
  1203.  
  1204.                    Memory  At least 2MB of free memory.
  1205.  
  1206.  
  1207.  
  1208.                Hard drive  A hard drive with at least as much free space as
  1209.                            four times the size of the image being converted
  1210.                            (i.e. a 640x480 image will require approximately
  1211.                            1.2 megabytes of free space).
  1212.  
  1213.  
  1214.  
  1215.            Viewing Images  Alchemy/386 does not support viewing at this time.
  1216.  
  1217.  
  1218.  
  1219.                 Operating  MS-DOS or PC-DOS 3.x or greater (because of the
  1220.                    system  additional free memory available, use of MS-DOS
  1221.                            5.0 or MS-DOS 6.0 is highly recommended).
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.                      Math  A math coprocessor will not affect the speed of
  1228.               coprocessor  most operations; the only operations that use much
  1229.                            floating point math are scaling types c and d.
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.                                                     Image Alchemy          11
  1241.  
  1242.  
  1243.  
  1244.  
  1245.           Packing list     The enclosed diskettes contain the following
  1246.                            files:
  1247.  
  1248.                            INSTALL.EXE  The Image Alchemy installation
  1249.                                         program.
  1250.  
  1251.                            ALCH386.EXE  The 32bit version of Alchemy.
  1252.  
  1253.                            DOS4GW.EXE   The 32bit DOS extender used by
  1254.                                         Alchemy.
  1255.  
  1256.                            ALCHEMY.EXE  The real-mode Alchemy software.
  1257.  
  1258.                            READ.ME      A text document describing any last
  1259.                                         minute revisions.
  1260.  
  1261.                            SAMPLES      A directory containing sample data
  1262.                                         files and images.  See the READ.ME
  1263.                                         file in this directory for further
  1264.                                         information.
  1265.  
  1266.  
  1267.           Installation     1. Insert the appropriate floppy disk in your disk
  1268.           instructions        drive.
  1269.  
  1270.                            2. Change to the drive by typing either a: or b:.
  1271.  
  1272.                            3. Type install.  This will install Image Alchemy
  1273.                               in the c:\alchemy directory.
  1274.  
  1275.                               If you would like to install on a different
  1276.                               drive or a specific directory, you can do this
  1277.                               by typing install followed by the location
  1278.                               where you want Image Alchemy installed.
  1279.  
  1280.                               For example:  install d:\util\alchemy will
  1281.                               install the software in the d:\util\alchemy
  1282.                               directory.
  1283.  
  1284.                            4. You have now successfully installed Image
  1285.                               Alchemy.
  1286.  
  1287.                            5. The file read.me contains information which has
  1288.                               changed since the manual was printed.  To
  1289.                               display the read.me file type type read.me.
  1290.  
  1291.  
  1292.           Environment
  1293.           variable usage
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.           12          Image Alchemy
  1300.  
  1301.  
  1302.  
  1303.  
  1304.            Temporary disk  Alchemy uses the environment variable TMP to
  1305.                     files  determine where to open its temporary files.  If
  1306.                            you have a big enough RAM drive you will want to
  1307.                            specify it using the TMP variable.  Be aware that
  1308.                            Alchemy needs up to 4 times as much space on that
  1309.                            drive as the size of the image (a 640x480 image
  1310.                            requires up to 1.2 megabytes).  An example of
  1311.                            setting the TMP variable to drive e: would be "set
  1312.                            TMP=e:".
  1313.  
  1314.           DOS/4GW and      Please refer to Appendix K for information about
  1315.           Virtual Memory   configuring DOS/4GW and taking advantage of
  1316.                            virtual memory.
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.                                                     Image Alchemy          13
  1359.  
  1360.  
  1361.  
  1362.  
  1363.           UNIX Installation
  1364.           -------------------------------------------------------------------
  1365.  
  1366.  
  1367.           Packing list     The enclosed diskette or tape is in tar format and
  1368.                            contains the following files:
  1369.  
  1370.  
  1371.                            alchemy      The Alchemy program.
  1372.  
  1373.  
  1374.                            read.me      A text document describing any last
  1375.                                         minute revisions.
  1376.  
  1377.  
  1378.                            samples      A directory containing sample data
  1379.                                         files and images.  See the read.me
  1380.                                         file in this directory for further
  1381.                                         information.
  1382.  
  1383.  
  1384.  
  1385.           Installation     Use tar to copy the files from the distribution
  1386.           instructions     disk or tape to the current directory.
  1387.  
  1388.  
  1389.                            To install the software from diskette use:
  1390.  
  1391.                                 tar xvf /dev/fd0
  1392.  
  1393.  
  1394.                            For tape installation replace /dev/fd0 with the
  1395.                            name of the tape device.  The name of the tape
  1396.                            device varies between different models and
  1397.                            configurations of systems; ask your system
  1398.                            administrator if you don't know the name of your
  1399.                            tape device.
  1400.  
  1401.  
  1402.           Note to          Alchemy uses the environment variable TMPDIR to
  1403.           advanced users   determine where to put its temporary files.  This
  1404.                            is usually set to /usr/tmp or /tmp, but if you are
  1405.                            converting very large images there may not be
  1406.                            enough space available in the partition those
  1407.                            directories are on.  In that case you may want to
  1408.                            set the environment variable TMPDIR to a different
  1409.                            partition.  For example, to set the temporary file
  1410.                            directory to the directory /home/images use
  1411.                            "setenv TMPDIR /home/images".  Contact your system
  1412.                            administrator if you have problems with Alchemy
  1413.                            running out of disk space while converting images.
  1414.  
  1415.  
  1416.  
  1417.           14          Image Alchemy
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.                                                     Image Alchemy          15
  1477.  
  1478.  
  1479.  
  1480.  
  1481.                                                                             2
  1482.  
  1483.  
  1484.  
  1485.           Introduction
  1486.           -------------------------------------------------------------------
  1487.  
  1488.  
  1489.           Basic            Image Alchemy is a command-line driven program
  1490.           instructions     with an optional menu system.  Historically, Image
  1491.                            Alchemy has been exclusively command-line driven,
  1492.                            and a lot of information in this manual is
  1493.                            necessary for users who prefer the command-line
  1494.                            interface.
  1495.  
  1496.                            For those users who prefer the menu interface, we
  1497.                            have tried to indicate which sections are relevant
  1498.                            to you and which you may safely skip.
  1499.  
  1500.                            Chapter 3 is devoted entirely to the menu
  1501.                            interface (also called a Graphical User Interface,
  1502.                            or GUI), and explains how to use the interface as
  1503.                            well as how Image Alchemy manages both interfaces.
  1504.  
  1505.                   Options  Options are the commands that you give Alchemy so
  1506.                            that it knows what you want it to do.  So that
  1507.                            Alchemy can distinguish between options and file
  1508.                            names on the command line, options are preceded by
  1509.                            a dash ("-").
  1510.  
  1511.  
  1512.  
  1513.                            The only option that is required is the output
  1514.                            file format (or the viewing option, for MS-DOS
  1515.                            users).  Image Alchemy will make reasonable
  1516.                            decisions for all of the other options.
  1517.  
  1518.  
  1519.  
  1520.                            Some options take parameters.  The parameters may
  1521.                            immediately follow the option or be separated by a
  1522.                            space.  For example, either -c128 or -c 128 is
  1523.                            acceptable.
  1524.  
  1525.                            Information on selecting options from the main
  1526.                            menu is covered in Chapter 3.
  1527.  
  1528.  
  1529.  
  1530.                            The options themselves are documented in Chapters
  1531.                            4 through 8.
  1532.  
  1533.  
  1534.  
  1535.           16          Image Alchemy
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.                            Note that options can appear anywhere in the
  1543.                            command line and generally they can be in any
  1544.                            order (certain options take parameters; in those
  1545.                            cases the parameters must follow the option).  The
  1546.                            case of the options is significant.
  1547.  
  1548.  
  1549.             InputFileName  The inputFileName is any valid file name.  This is
  1550.                            the name of an existing image file that you are
  1551.                            converting from or viewing.  The inputFileName is
  1552.                            required.  It may include an optional drive and/or
  1553.                            path.
  1554.  
  1555.  
  1556.            OutputFileName  The outputFileName is the name of the file you are
  1557.                            converting the image to.  The outputFileName is
  1558.                            optional;  if it is not specified Image Alchemy
  1559.                            generates one by substituting an appropriate
  1560.                            extension to the input file name.  If you specify
  1561.                            an outputFileName and it does not include an
  1562.                            extension one will be added.  The outputFileName
  1563.                            may include an optional drive and/or path.  If you
  1564.                            do not supply a path the current directory will be
  1565.                            used as the destination directory.
  1566.  
  1567.  
  1568.            OutputPathName  The outputPathName is the location where you want
  1569.                            to put the output that Alchemy will create.  The
  1570.                            outputPathName is optional;  if it is not
  1571.                            specified Alchemy places the output in the current
  1572.                            directory or in the directory specified as part of
  1573.                            the outputFileName.
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.           Limitations on   Since on the command line Alchemy lets you
  1580.           filenames        optionally enter a space between an option and its
  1581.                            parameter it is possible to confuse Alchemy if one
  1582.                            of the filenames starts with a number.  In
  1583.                            particular, if you use an option which has an
  1584.                            optional parameter, you choose not to use the
  1585.                            parameter, and you follow that option immediately
  1586.                            with a filename which starts with a number,
  1587.                            Alchemy doesn't realize that the filename is not
  1588.                            the parameter.  While it sounds unlikely that this
  1589.                            would ever be a problem it actually happens quite
  1590.                            often.
  1591.  
  1592.  
  1593.  
  1594.                                                     Image Alchemy          17
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.                            For example, if you wanted to convert the file
  1602.                            12.gif to a Targa file with the name output.tga
  1603.                            you would have to be careful of the order in which
  1604.                            you specified things.
  1605.  
  1606.  
  1607.                            If you say
  1608.  
  1609.                                 alchemy -a 12.gif output.tga
  1610.  
  1611.                            Alchemy would misinterpret that as
  1612.  
  1613.                                 alchemy -a12 .gif output.tga
  1614.  
  1615.                            and would generate an error.
  1616.  
  1617.  
  1618.                            The easiest way around this problem is to always
  1619.                            put the filenames first
  1620.  
  1621.                                 alchemy 12.gif output.tga -a
  1622.  
  1623.                            or don't use filenames which begin with a number.
  1624.  
  1625.           Output path      The output path name is the location where Alchemy
  1626.                            will place its output.
  1627.  
  1628.                            The outputPathName can be specified on the command
  1629.                            line as part of the outputFileName if you are
  1630.                            specifying an outputFileName.
  1631.  
  1632.                            For example
  1633.  
  1634.                                 alchemy sample.jpg -g test.gif \images
  1635.  
  1636.                            is the same as
  1637.  
  1638.                                 alchemy sample.jpg -g \images\test.gif
  1639.  
  1640.                            However,
  1641.  
  1642.                                 alchemy sample.jpg -g
  1643.  
  1644.                            is not the same as
  1645.  
  1646.                                 alchemy sample.jpg -g \images
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.           18          Image Alchemy
  1654.  
  1655.  
  1656.  
  1657.  
  1658.                            When using the wildcard option, Alchemy allows
  1659.                            wildcards and multiple file names.  In this case
  1660.                            the use of an outputFileName is not allowed, but
  1661.                            the use of the outputPathName is.  See the
  1662.                            wildcard option for more information.
  1663.  
  1664.           Using option     Alchemy can read command line parameters from
  1665.           files            files.  Doing this is equivalent to typing the
  1666.                            options on the command line.  Lists of options are
  1667.                            useful when you have commonly used commands or
  1668.                            when you have long commands which would be hard to
  1669.                            remember or exceed the command line limits of your
  1670.                            operating system.
  1671.  
  1672.                            To use an option file you will have to create a
  1673.                            text file using a text editor.  This file can have
  1674.                            any name or extension you wish.  To pass this file
  1675.                            to Alchemy use the @ operator, followed
  1676.                            immediately by the name of the text file.
  1677.  
  1678.                            For example, if you frequently need to scale
  1679.                            images to be no larger than 640x480, using 'b'
  1680.                            quality scaling, and preserving aspect ratio, you
  1681.                            can make a text file which looks like this (called
  1682.                            SCALE, for purposes of this example):
  1683.  
  1684.                                 -Xb640 -Yb480 -+
  1685.  
  1686.  
  1687.                            You would then use this text file with Alchemy by
  1688.                            passing its name along with any other options
  1689.                            (including the output file type option).  For
  1690.                            example:
  1691.  
  1692.                                 alchemy @scale test.gif -g new.gif
  1693.  
  1694.                            would convert the GIF file test.gif to a GIF file
  1695.                            called new.gif, thus performing the desired
  1696.                            scaling operation.
  1697.  
  1698.                            It is also possible to place filenames and other
  1699.                            option lists in options lists.  For example, if
  1700.                            you want to convert  all of the .gif, .tif, and
  1701.                            .tga files to JPEG files you can create a text
  1702.                            file which looks like this (called FILES):
  1703.  
  1704.                                 *.gif
  1705.                                 *.tif
  1706.                                 *.tga
  1707.  
  1708.                            And then use this command line to convert those
  1709.                            files to JPEG files:
  1710.  
  1711.  
  1712.                                                     Image Alchemy          19
  1713.  
  1714.  
  1715.  
  1716.  
  1717.                                 alchemy @files -j
  1718.  
  1719.                            If you wanted to scale the images at the same time
  1720.                            you would add that option file to the command line
  1721.                            (using the SCALE text file created earlier):
  1722.  
  1723.                                 alchemy @files @scale -j
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.           20          Image Alchemy
  1772.  
  1773.  
  1774.  
  1775.  
  1776.           Using multiple   In general, Image Alchemy will perform equally
  1777.           runs of Alchemy  well regardless of how many steps it takes to
  1778.                            accomplish a command.  However, if you use
  1779.                            multiple steps, be careful of their order.
  1780.  
  1781.                            Sometimes you may know what you want to accomplish
  1782.                            but not how to specify the correct combination of
  1783.                            options.  For example, you may wish to re-size a
  1784.                            true colour Targa file that you have scanned and
  1785.                            convert it to a 16 colour GIF file.  Let's say
  1786.                            that the input file name is file.tga and you want
  1787.                            to generate a file with the name file.gif. In this
  1788.                            case you could type:
  1789.  
  1790.                                 alchemy file.tga -Xb640 -Yb480 -c16 -g
  1791.  
  1792.                            However, there would be no penalty in quality (and
  1793.                            little in speed) if you did things in two steps:
  1794.  
  1795.                                 alchemy file.tga -Xb640 -Yb480 -r temp.raw
  1796.  
  1797.                                 alchemy temp.raw -c16 -g file.gif
  1798.  
  1799.                            In this case you are telling Alchemy to use a
  1800.                            temporary raw file called temp.raw.  It turns out
  1801.                            that Alchemy would have automatically used a
  1802.                            temporary raw file in the first case.  So, except
  1803.                            for having to delete the file temp.raw, both uses
  1804.                            are identical.
  1805.  
  1806.                            The order of steps is important in many cases.
  1807.                            For example, reversing the order of the two
  1808.                            operations in the previous example:
  1809.  
  1810.                                 alchemy file.tga -c16 -g temp.raw
  1811.  
  1812.                                 alchemy temp.raw -Xb640 -Yb480 -g file
  1813.  
  1814.  
  1815.                            would give different results.  This is because the
  1816.                            scaling operation has to temporarily convert the
  1817.                            image to true colour, but the GIF file you are
  1818.                            generating has to be paletted, so the second
  1819.                            operation would re-dither the image.
  1820.  
  1821.  
  1822.                            Sometimes you will have to perform operations
  1823.                            using multiple steps because there are some
  1824.                            combinations of options that Alchemy explicitly
  1825.                            does not allow.  These combinations of options are
  1826.                            not allowed because the results would not be what
  1827.                            you expect.
  1828.  
  1829.  
  1830.                                                     Image Alchemy          21
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.                            For example, using the spiff option, -S, in
  1837.                            combination with the false colour option, -F,
  1838.                            would spiff the image first and then false colour
  1839.                            it, which would give the same results as just
  1840.                            using the false colour option.  Since that isn't
  1841.                            something that you would ever want to do, Alchemy
  1842.                            will complain if you specify both of those options
  1843.                            at the same time.
  1844.  
  1845.  
  1846.                            In this case you could false colour the image
  1847.                            first, generating a temporary image, and then
  1848.                            spiff that image.
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.           22          Image Alchemy
  1890.  
  1891.  
  1892.  
  1893.  
  1894.                                                                             3
  1895.  
  1896.  
  1897.  
  1898.           The Graphical User Interface (Menus)
  1899.           -------------------------------------------------------------------
  1900.  
  1901.  
  1902.           Introduction     Image Alchemy v1.7 is the first release to
  1903.                            incorporate a Graphical User Interface (GUI),
  1904.                            commonly referred to as a menu system. The GUI can
  1905.                            make using Alchemy much easier for casual or
  1906.                            infrequent users, since the various command-line
  1907.                            arguments do not need to be memorized or even
  1908.                            known.
  1909.  
  1910.                            The GUI is actually a separate program which gets
  1911.                            information about the conversion from the user,
  1912.                            builds a command line for Alchemy, and then calls
  1913.                            the actual Alchemy software.  In this way, users
  1914.                            who are familiar with the command-line structure
  1915.                            of Alchemy will not be hampered by the menu system
  1916.                            -- the software can be used exactly as with
  1917.                            previous versions.  The GUI will also let you view
  1918.                            the command line parameters it uses, so that
  1919.                            interested users can learn more about Alchemy
  1920.                            itself and the switches it requires to perform
  1921.                            various conversions.
  1922.  
  1923.           Starting the     After installing Image Alchemy (described in
  1924.           GUI              Chapter 1), the Alchemy executable as well as the
  1925.                            GUI should be on your working drive.  The GUI will
  1926.                            be able to find the Alchemy executable as long as
  1927.                            it is in either the current directory or the DOS
  1928.                            search path.
  1929.  
  1930.  
  1931.                            Once your path has been set, simply typing 'gui'
  1932.                            will start Alchemy's graphical user interface.
  1933.  
  1934.           The Main Screen  Upon starting the GUI, the screen will be mostly
  1935.                            blank, except for a menu bar across the top of the
  1936.                            screen, and two small windows at the bottom
  1937.                            informing you of the currently selected input file
  1938.                            and the output file type.
  1939.  
  1940.  
  1941.                            To access the pull-down menu system, type Alt-?,
  1942.                            where ? is the first character of the option.  For
  1943.                            example, typing Alt-F will bring down the File
  1944.                            sub-menu, and Alt-D will bring down the Dither
  1945.                            sub-menu.
  1946.  
  1947.  
  1948.                                                     Image Alchemy          23
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.                            As you move through various options in the sub-
  1956.                            menus, a short help message will appear on the
  1957.                            bottom status line, giving you further
  1958.                            information.
  1959.  
  1960.                            While in the menu system, pressing Esc will abort
  1961.                            the current menu; if you are being prompted for a
  1962.                            value in a dialog box, Esc will abort the input,
  1963.                            and retain the old value.
  1964.  
  1965.                            Note that some sub-menu entries may be dimmed;
  1966.                            this means that these options cannot be used at
  1967.                            this time.  This usually applies to the viewing
  1968.                            and conversion options, which cannot be chosen
  1969.                            without first selecting an input file.
  1970.  
  1971.                            Pressing and releasing the Alt key will take you
  1972.                            up to the menu bar and pull down the first entry
  1973.                            (the File sub-menu, in this case).  The left and
  1974.                            right arrow keys will move between the various
  1975.                            sub-menus.  At this point, the up and down arrow
  1976.                            keys can be used to highlight a specific option;
  1977.                            pressing Return will select that option.
  1978.  
  1979.  
  1980.                            If you have a mouse connected to your system, you
  1981.                            can point-and-click through the menuing system,
  1982.                            rather than using the keyboard.  Clicking an entry
  1983.                            on the menu bar will pull down that menu, and then
  1984.                            clicking on a specific option will actually choose
  1985.                            it.  Alternatively, you can move the mouse cursor
  1986.                            to the menu bar, click on a sub-menu category like
  1987.                            File, and while continuing to hold down the mouse
  1988.                            button, select a specific item.  When you release
  1989.                            the mouse button, that item will be chosen.
  1990.  
  1991.  
  1992.  
  1993.           Quitting the     To exit the GUI, select Quit from the File sub-
  1994.           GUI              menu.  Alternatively, Alt-X will immediately quit
  1995.                            the GUI without going through the menu system.
  1996.  
  1997.           The File
  1998.           Sub-Menu
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.           24          Image Alchemy
  2008.  
  2009.  
  2010.  
  2011.  
  2012.              Select Input  Choosing this option will bring up a listing of
  2013.                     Image  all the files in the current directory.  Using
  2014.                            either the keyboard or the mouse, you can select
  2015.                            the input file on which Alchemy will work on.
  2016.                            There are also listings for the parent directory
  2017.                            and various subdirectories (if any), which allow
  2018.                            you to move around on the drive.
  2019.  
  2020.  
  2021.                            Clicking on the Cancel button or hitting Esc will
  2022.                            abort the selection process, keeping the previous
  2023.                            input file name.
  2024.  
  2025.  
  2026.                            Note that the GUI cannot check for valid image
  2027.                            files, since it would be too time consuming to
  2028.                            have Alchemy process every file in the current
  2029.                            directory.  As such, it is possible for you to
  2030.                            select a file which Alchemy itself will not
  2031.                            recognize when a conversion or view is requested.
  2032.  
  2033.             Select Output  Selecting the Output Type will display a scrolling
  2034.                      Type  window containing the different image formats to
  2035.                            which Alchemy can output.  The up and down arrow
  2036.                            keys will move the highlight bar up and down one
  2037.                            try, and the PgUp and PgDn keys will move the
  2038.                            highlight bar up and down one page.  Pressing
  2039.                            Return selects the highlighted output type.  The
  2040.                            mouse can also be used to scroll through the
  2041.                            window: clicking on the up and down arrows will
  2042.                            move the highlight bar up and down one entry, and
  2043.                            clicking in the scroll bar above or below the
  2044.                            current location marker will page up and down
  2045.                            through the list.
  2046.  
  2047.  
  2048.  
  2049.                            If you select an output format that has further
  2050.                            options (such as compression type), a further pop-
  2051.                            up menu will ask you to pick an option.  Either
  2052.                            typing the highlighted key or clicking on the name
  2053.                            will select that option.
  2054.  
  2055.               Image Stats  After selecting an input file, selecting this
  2056.                            option will display various information for that
  2057.                            file, including the height and width, number of
  2058.                            colours, and compression ratio.  Other values may
  2059.                            be displayed, if they are available, such as dots
  2060.                            per inch (DPI), aspect ratio, and gamma.
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.                                                     Image Alchemy          25
  2067.  
  2068.  
  2069.  
  2070.  
  2071.                   Viewing  The next four options are for viewing the image
  2072.                            you have selected.  View Image will do a standard
  2073.                            8-bit view on an SVGA monitor, displaying only the
  2074.                            center portion of the image if it exceeds maximum
  2075.                            screen resolution.  Using the View Scaled option
  2076.                            will work similarly, except it will use Nearest
  2077.                            Neighbor scaling to make sure the entire image
  2078.                            fits on the screen.
  2079.  
  2080.  
  2081.  
  2082.                            If you have an SVGA board and monitor capable of
  2083.                            displaying images in true colour (15-, 16-, or 24-
  2084.                            bits), select View True Color to take advantage of
  2085.                            this.  This option will try to view in the highest
  2086.                            resolution possible, while displaying as much of
  2087.                            the image as possible.  Note, however, that size
  2088.                            will take priority over resolution.  For example,
  2089.                            if you have a 24-bit SVGA card with 1MB of memory,
  2090.                            you should be able to view in 24 bits at 640x480,
  2091.                            and 15 bits at 800x600.  So, assuming you have a
  2092.                            640x480 24-bit image, this option will view it in
  2093.                            24 bits.  If, however, you have a 700x490 24-bit
  2094.                            image, you will see the whole image, but dithered
  2095.                            to 15 bits.  Size takes priority over resolution.
  2096.  
  2097.                            If you have an image larger than what your
  2098.                            card/monitor can display in true colour, using the
  2099.                            View True Color Scaled option will scale the image
  2100.                            so you can view the entire image in true colour.
  2101.  
  2102.              Show Command  Choosing this option will display the parameters
  2103.                      Line  which will actually be passed to Alchemy if the
  2104.                            Convert! entry is chosen.  This allows you to see
  2105.                            what parameters need to be passed to Alchemy on
  2106.                            the command line to enable various options.
  2107.  
  2108.              Basic/Expert  This menu entry will change, depending on the
  2109.                     Menus  current status of the menu system.  When first
  2110.                            started, the GUI will default to Basic mode, which
  2111.                            will hide many of the more obscure options Alchemy
  2112.                            deals with.  Choosing this option will then force
  2113.                            the GUI to use the full, more advanced menus which
  2114.                            include all possible options.
  2115.  
  2116.  
  2117.  
  2118.                            When the Expert menus are being used, choosing
  2119.                            this option will switch back to the Basic menu
  2120.                            system.
  2121.  
  2122.  
  2123.  
  2124.  
  2125.           26          Image Alchemy
  2126.  
  2127.  
  2128.  
  2129.  
  2130.                  Convert!  This should be the last option you select when
  2131.                            converting an image; use it only after you have
  2132.                            selected all the options you need from the various
  2133.                            other menus.
  2134.  
  2135.  
  2136.                            After choosing this option, you will be prompted
  2137.                            for an output filename, with a default given based
  2138.                            on the output type chosen.  To accept, simply type
  2139.                            Return.  You may of course modify the default by
  2140.                            typing different names, drives, or directories.
  2141.  
  2142.  
  2143.                            The GUI will then run the Alchemy software,
  2144.                            passing along information about the various
  2145.                            options you have selected in the menu.  Since the
  2146.                            GUI swaps almost all of itself out of memory
  2147.                            before calling Alchemy, you do not need to worry
  2148.                            about not having enough memory available for a
  2149.                            particular conversion; if the GUI runs out of
  2150.                            memory, calling Alchemy directly from the command
  2151.                            line will also run out of memory.  If this is the
  2152.                            case, contact us about Alchemy/386, which runs in
  2153.                            32-bit protected mode, and hence does not have the
  2154.                            typical memory limitations associated with DOS
  2155.                            applications.
  2156.  
  2157.                      Quit  This option will end your GUI session, and return
  2158.                            you to the DOS prompt.
  2159.  
  2160.           The Resize       The options in this sub-menu allow you to control
  2161.           Sub-Menu         various aspects of the output image concerning its
  2162.                            pixel size and DPI information.  Along with being
  2163.                            able to specify a certain pixel size, you can also
  2164.                            tell Alchemy to make an image larger or smaller by
  2165.                            some factor.  Finally, you can specify the aspect
  2166.                            ratio and DPI information from within this menu.
  2167.  
  2168.                            For further information about the specific options
  2169.                            in this sub-menu, please see Chapter 6.
  2170.  
  2171.           The Palette      The entries in the palette sub-menu allow you to
  2172.           Sub-Menu         control various aspects of the palette and its
  2173.                            generation, including using Heckbert's algorithm,
  2174.                            a uniform palette, or a black and white/greyscale
  2175.                            palette.  You can also tell Alchemy to use a
  2176.                            palette from another image, or correct colours in
  2177.                            a CMYK format using an undercolor removal file.
  2178.  
  2179.                            For more detailed information about these topics,
  2180.                            please see Chapter 5.
  2181.  
  2182.  
  2183.  
  2184.                                                     Image Alchemy          27
  2185.  
  2186.  
  2187.  
  2188.  
  2189.           The Colors       The colors sub-menu primarily allows you to
  2190.           Sub-Menu         specify the number of colours to be used in the
  2191.                            output file.  You can also generate a photographic
  2192.                            negative of an image, as well as spiff it using
  2193.                            one of three different algorithms.  Finally, from
  2194.                            within this sub-menu, you can modify the input,
  2195.                            output, and palette gamma values.
  2196.  
  2197.                            Please again refer to Chapter 5 for complete
  2198.                            information about these topics.
  2199.  
  2200.           The Dither       The dither menu allows you to select the
  2201.           Sub-Menu         particular dithering algorithm to use.  You can
  2202.                            also specify whether you want a serpentine raster
  2203.                            or some amount of perturbation; both of these
  2204.                            options help break up visible patterns left by the
  2205.                            dithering.
  2206.  
  2207.  
  2208.                            For more information about the dithering options,
  2209.                            see Chapter 5.
  2210.  
  2211.           About The        The smooth graphical mouse cursor used in the GUI
  2212.           Graphical Mouse  was implemented with SMDKIT.  The Smooth Mouse
  2213.           Cursor           Driver is copyright 1992-1993 by Andy Hakim.  For
  2214.                            further information about this software, contact:
  2215.  
  2216.                            Andy Hakim
  2217.                            816 Pecore Street
  2218.                            Houston, TX  77009
  2219.                            USA
  2220.                            +1 713 880 3059
  2221.                            internet: ahakim@uh.edu
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.           28          Image Alchemy
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.                                                     Image Alchemy          29
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.                                                                             4
  2312.  
  2313.  
  2314.  
  2315.           Output Options
  2316.           -------------------------------------------------------------------
  2317.  
  2318.  
  2319.           Introduction     The one option which is always required when
  2320.                            running Image Alchemy is the output image file
  2321.                            type.  Even if you are just re-sizing an image, or
  2322.                            changing the number of colours in an image,
  2323.                            Alchemy needs to know what type of image you are
  2324.                            creating.
  2325.  
  2326.  
  2327.                            The file types that Image Alchemy supports are
  2328.                            listed below.  In addition to the syntax required
  2329.                            to generate the file, any known restrictions or
  2330.                            limitations are listed.  If you have trouble
  2331.                            reading an image in one of the file formats we
  2332.                            claim to support please contact us (see Appendix
  2333.                            D, Customer Support).
  2334.  
  2335.  
  2336.  
  2337.                            The common output options consist of a single
  2338.                            letter.  The option, like all Alchemy options, is
  2339.                            preceded by a dash, "-".  The less common output
  2340.                            options consist of a letter preceded by two
  2341.                            dashes, "--".
  2342.  
  2343.             With your GUI  If you are using the GUI, you can select your
  2344.                            output option from the File sub-menu as described
  2345.                            in Chapter 3.
  2346.  
  2347.  
  2348.                Variations  Some of the output formats have several
  2349.                            variations; in those cases you specify which
  2350.                            variation you want with an optional letter and/or
  2351.                            number after the output option.
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.           30          Image Alchemy
  2362.  
  2363.  
  2364.  
  2365.  
  2366.                   Example  The option to generate a Windows Bitmap file is -
  2367.                            w.  There are two types of Bitmap files:
  2368.                            uncompressed and Run-Length-Encoded (RLE).  To
  2369.                            write out an uncompressed Bitmap file use -w0; to
  2370.                            write out a RLE Bitmap file use -w1 (the default
  2371.                            Bitmap file is uncompressed, so a -w without any
  2372.                            parameter following it would also generate an
  2373.                            uncompressed Bitmap file).  Note that Alchemy
  2374.                            allows spaces between the option and parameter, so
  2375.                            typing -w 1 would be the same as -w1.
  2376.  
  2377.  
  2378.                Variations  Be aware that the other options specified on the
  2379.                            command line also affect the type of file that is
  2380.                            generated.
  2381.  
  2382.                   Example  Within the Windows Bitmap file type there are 1
  2383.                            bit, 4 bit, 8 bit, and 24 bit files.
  2384.  
  2385.  
  2386.                            Alchemy always generates a file using the best
  2387.                            match of the file type and the output image.  So,
  2388.                            in the case of Windows Bitmap files, if the output
  2389.                            image is black and white a 1 bit file is
  2390.                            generated.  If the output image is paletted with
  2391.                            16 colours or less a 4 bit file is generated.  If
  2392.                            the output image is paletted with more than 16
  2393.                            colours an 8 bit file is generated.  And if the
  2394.                            output image is true colour a 24 bit file is
  2395.                            generated.
  2396.  
  2397.  
  2398.                            You can explicitly force any of these file types
  2399.                            by using other Alchemy options.  For example, if
  2400.                            you wanted a 1 bit Windows Bitmap file you would
  2401.                            specify -c2 -b -w.  To force a 4 bit file use
  2402.                            -c16 -w.  To force an 8 bit file use -c256 -w.
  2403.                            And to force a true colour file use -24 -w.
  2404.  
  2405.  
  2406.           Identifying      Image Alchemy identifies the type of file being
  2407.           image files      read by checking various magic numbers and other
  2408.                            information that varies from format to format.
  2409.                            Unfortunately, some formats do not have a magic
  2410.                            number; in those cases Alchemy guesses as to the
  2411.                            image type.  It is possible for Image Alchemy to
  2412.                            incorrectly identify an image; if this happens
  2413.                            please contact us.
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.                                                     Image Alchemy          31
  2421.  
  2422.  
  2423.  
  2424.  
  2425.           MacBinary        When reading images, Alchemy automatically
  2426.                            recognizes and reads MacBinary II files (MacBinary
  2427.                            files are generated when you accidently leave
  2428.                            MacBinary mode on when transferring a file from a
  2429.                            Macintosh).
  2430.  
  2431.           Other            Alchemy will preserve as much information in each
  2432.           information      file as possible; this always includes the height
  2433.                            and width of the image and the number of colours
  2434.                            in the image.  Some file types include other data,
  2435.                            such as the name of the image, the aspect ratio of
  2436.                            the image, the date the image was created, etc.
  2437.                            Since most of these items are only supported by a
  2438.                            few file formats, Alchemy discards everything but
  2439.                            the height, width, number of colours, gamma,
  2440.                            aspect ratio, and resolution values.
  2441.  
  2442.           Output Options   The individual output options supported by Alchemy
  2443.                            are described in alphabetical order on the
  2444.                            following pages.  The descriptions follow the
  2445.                            template given overleaf.
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.           32          Image Alchemy
  2480.  
  2481.  
  2482.  
  2483.  
  2484.           Name of format                                       -option
  2485.  
  2486.  
  2487.                            Overview of file format.
  2488.  
  2489.           Syntax           Description of syntax.
  2490.  
  2491.           Parameter        Brief description of the parameters.  Those
  2492.                            parameters which require a detailed explaination
  2493.                            are further documented under the comments section
  2494.                            below.
  2495.  
  2496.           Extensions       The extensions commonly used for this image
  2497.                            format.  When multiple extensions are listed
  2498.                            Alchemy writes files using the first one, but will
  2499.                            check for files using all extensions (in the order
  2500.                            listed).  Four letter extensions are skipped on
  2501.                            MS-DOS systems.
  2502.  
  2503.           Creator          The company or individual who created this image
  2504.                            format.  Please contact them for more information
  2505.                            on the format.
  2506.  
  2507.           Used by          Programs or types of software that use this image
  2508.                            format.
  2509.  
  2510.           Variations       A list of the variations supported by Image
  2511.                            Alchemy.
  2512.  
  2513.           Limitations      Any known limitations that Image Alchemy has when
  2514.                            reading or writing this image format.
  2515.  
  2516.           Comments         Miscellaneous things of which you should be aware.
  2517.  
  2518.           Related options  Other Alchemy options that affect the reading or
  2519.                            writing of this image format.  Note that -8, -24
  2520.                            (and, for some formats, -15, -16, and -32), -c,
  2521.                            and -b options have an effect for most image
  2522.                            formats and are not listed explicitly.
  2523.  
  2524.           Example          Sample conversions involving this image format.
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.                                                     Image Alchemy          33
  2539.  
  2540.  
  2541.  
  2542.  
  2543.           ADEX                                                     --A
  2544.  
  2545.  
  2546.                            ADEX files are used by the ADEX Corporation
  2547.                            ChromaGraph series of graphics cards.
  2548.  
  2549.           Syntax           --A compressionType
  2550.  
  2551.           Parameter        compressionType:
  2552.                                 0:None
  2553.                                 1:Run Length Coded
  2554.                            The default is None.
  2555.  
  2556.           Extensions       .img
  2557.                            .rle
  2558.  
  2559.           Creator          ADEX Corporation
  2560.  
  2561.           Used by          ADEX ChromaGraph cards.
  2562.  
  2563.           Variations       4 bit and 8 bit images.
  2564.  
  2565.           Comments         Some ADEX files don't contain a palette; in those
  2566.                            cases there's usually a second ADEX file which
  2567.                            contains the palette to be used.  To read those
  2568.                            images that don't have palettes, use the -F false
  2569.                            colour option to read the palette from a separate
  2570.                            file.
  2571.  
  2572.           Related options  -F   False colour
  2573.  
  2574.           Example          Convert the file test.gif to an uncompressed ADEX
  2575.                            file called test.img:
  2576.  
  2577.                                 alchemy --A test.gif
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.           34          Image Alchemy
  2598.  
  2599.  
  2600.  
  2601.  
  2602.           Alpha Microsystems BMP                                    -M
  2603.  
  2604.  
  2605.                            Alpha Microsystems BMP files are used by Alpha
  2606.                            Microsystems.
  2607.  
  2608.           Syntax           -M compressionType
  2609.  
  2610.           Parameter        compressionType:
  2611.                                 0:None
  2612.                                 1:Packed
  2613.                            The default is None.
  2614.  
  2615.           Extension        .bmp
  2616.  
  2617.           Creator          Alpha Microsystems.
  2618.  
  2619.           Used by          Alpha Microsystems workstations.
  2620.  
  2621.           Variations       Reads and writes 1, 4, 8, and 24 bit unpacked and
  2622.                            packed (run-length encoded) RGB images.
  2623.  
  2624.           Limitations      Reading and writing HLS images is not supported.
  2625.  
  2626.           Comments         When reading an image without a palette Alchemy
  2627.                            will generate a gray-scale palette.
  2628.  
  2629.           Examples         Convert the GIF file, bigpict.gif, to an
  2630.                            uncompressed Alpha Microsystems BMP file:
  2631.  
  2632.                                 alchemy bigpict.gif -M
  2633.  
  2634.                            Do the same thing, but force a 24 bit image, and
  2635.                            compress the image:
  2636.  
  2637.                                 alchemy bigpict.gif -M1 -24
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.                                                     Image Alchemy          35
  2657.  
  2658.  
  2659.  
  2660.  
  2661.           Autologic                                                --a
  2662.  
  2663.  
  2664.                            Autologic files are black and white or gray-scale
  2665.                            files for use with Autologic typesetting
  2666.                            equipment.
  2667.  
  2668.           Syntax           --a
  2669.  
  2670.           Extensions       .gm
  2671.                            .gm2
  2672.                            .gm4
  2673.  
  2674.           Creator          Autologic, Incorporated
  2675.  
  2676.           Used by          Autologic typesetting equipment.
  2677.  
  2678.           Variations       Graphics modes 2 (black/white) and 4 (gray-scale)
  2679.                            are supported.
  2680.  
  2681.           Limitations      Only the High Speed Interface inline format is
  2682.                            supported.
  2683.  
  2684.                            When reading, images must be preceded by a
  2685.                            Graphics Parameter Block.
  2686.  
  2687.           Examples         Convert the file input.tif to a GM4 file called
  2688.                            output.gm4:
  2689.  
  2690.                                 alchemy --a -b input.tif output.gm4
  2691.  
  2692.                            Convert the file input.tif to a GM2 file called
  2693.                            output.gm2:
  2694.  
  2695.                                 alchemy --a -b -c2 input.tif output.gm2
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.           36          Image Alchemy
  2716.  
  2717.  
  2718.  
  2719.  
  2720.           AVHRR                                                    --R
  2721.  
  2722.  
  2723.                            AVHRR files are used for satellite image data.
  2724.  
  2725.           Syntax           --R outputType
  2726.  
  2727.           Parameter        outputType
  2728.                                 1:IDIDAS Uncompressed
  2729.                                 2:IDIDAS Compressed type 1
  2730.                            The default is 1 (IDIDAS Uncompressed).
  2731.  
  2732.           Extension        .sst
  2733.  
  2734.           Creators         National Oceanic and Atmospheric Administration
  2735.                            (NOAA)
  2736.                            National Environmental Satellite Data Information
  2737.                            Service (NESDIS)
  2738.  
  2739.           Used by          IDIDAS
  2740.                            SSTMAP
  2741.                            IMGMAP
  2742.  
  2743.           Variations       Reads 8 and 11 bits per pixel IDIDAS AVHRR files.
  2744.  
  2745.                            Writes 11 bits per pixel IDIDAS AVHRR files.
  2746.  
  2747.           Limitations      Level 1B AVHRR files will be supported at a later
  2748.                            date; please contact us for more information.
  2749.  
  2750.  
  2751.                            Alchemy discards all but the top 8 bits when
  2752.                            reading 11 bit AVHRR files.  When writing, the
  2753.                            bottom 3 bits are padded with 0.
  2754.  
  2755.  
  2756.                            Any graphics information is discarded when reading
  2757.                            the file.
  2758.  
  2759.  
  2760.                            Since AVHRR images are always grayscale, Alchemy
  2761.                            assumes the use of the -b and -8 options when
  2762.                            writing a AVHRR file.
  2763.  
  2764.           Comments         AVHRR images contain a lot of information which is
  2765.                            not part of the image data.  This information
  2766.                            includes the time and date the image was captured,
  2767.                            the satellite which captured the image, the type
  2768.                            of instrumentation used, etc.  When reading AVHRR
  2769.                            images this information is discarded; when writing
  2770.                            AVHRR images 0 is written for all values for which
  2771.                            data is unavailable.
  2772.  
  2773.  
  2774.                                                     Image Alchemy          37
  2775.  
  2776.  
  2777.  
  2778.  
  2779.           Example          Convert the GOES file, florida.goe, to an
  2780.                            uncompressed IDIDAS AVHRR file:
  2781.  
  2782.                                 alchemy --R1 florida.goe
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.           38          Image Alchemy
  2834.  
  2835.  
  2836.  
  2837.  
  2838.           Binary Information Files (BIF)                            -B
  2839.  
  2840.  
  2841.                            There are quite a few programs which produce image
  2842.                            files which contain just pixel data.  These image
  2843.                            files do not have a header and hence do not
  2844.                            include enough information to allow Alchemy to
  2845.                            read them.
  2846.  
  2847.                            BIF files are a method which can be used to allow
  2848.                            Alchemy to read these images.  BIF files can also
  2849.                            be created to allow images to be read by software
  2850.                            which expects images to be just pixels.  Since
  2851.                            required information, such as the height and width
  2852.                            of the image, are not present in these files you
  2853.                            must supply it.
  2854.  
  2855.           Syntax           -B
  2856.  
  2857.           Extensions       .bif For ASCII file describing image.
  2858.                            .raw For actual image data.
  2859.  
  2860.           Creator          Handmade Software, Inc.
  2861.  
  2862.           Used by          Image Alchemy
  2863.                            Various image processing software
  2864.  
  2865.           Variations       24 bit true colour, 8 bit gray-scale, and 1 bit
  2866.                            black and white.
  2867.  
  2868.           Limitations      Paletted files cannot be read in (a work around is
  2869.                            to generate a .PAL file and then false colour the
  2870.                            gray-scale image using the -F option).
  2871.  
  2872.           Comments         BIF files are used to read and write files which
  2873.                            consist entirely of image data.  You have to
  2874.                            generate a text file which describes the format of
  2875.                            the data you are trying to read in.  This file is
  2876.                            called a BIF file.  The format of BIF files is
  2877.                            documented in Appendix E, Binary Information
  2878.                            Files.  You then instruct Alchemy to read the
  2879.                            image data by giving it the name of the .BIF file.
  2880.  
  2881.           Related options  -F   False colour
  2882.  
  2883.           Examples         Convert the file data to a GIF file:
  2884.  
  2885.                                 alchemy data.bif -g
  2886.  
  2887.                            Convert the image helen.pcx to a Binary file (this
  2888.                            will create two files:  helen.raw and helen.bif):
  2889.  
  2890.  
  2891.  
  2892.                                                     Image Alchemy          39
  2893.  
  2894.  
  2895.  
  2896.  
  2897.                                 alchemy helen.pcx -B
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.           40          Image Alchemy
  2952.  
  2953.  
  2954.  
  2955.  
  2956.           Calcomp CCRF                                             --l
  2957.  
  2958.  
  2959.                            Calcomp raster files are used by Calcomp thermal
  2960.                            transfer printers, and Calcomp CCRF files are used
  2961.                            by Calcomp electrostatic printers.
  2962.  
  2963.           Syntax           --l type (lower case l)
  2964.  
  2965.           Parameter        type:
  2966.                                Thermal Transfer Printer:
  2967.                                 0:Uncompressed
  2968.                                 1:White Space Suppression
  2969.                                 2:Run Length Compression
  2970.                                Electrostaic plotter (CCRF):
  2971.                                 6:8 bit bytes, 8 bit compression units
  2972.                                 7:8 bit bytes, 16 bit compression units
  2973.                                 8:8 bit bytes, 32 bit compression units
  2974.                            The default is Thermal transfer, uncompressed.
  2975.  
  2976.           Extensions       .crf
  2977.                            .ccrf
  2978.                            .prn
  2979.  
  2980.           Creator          Calcomp
  2981.  
  2982.           Used by          Calcomp thermal printers and Electrostatic
  2983.                            plotters.
  2984.  
  2985.           Variations       Black and white or CMYK.
  2986.  
  2987.           Comments         If there is only black and white in the image, a 1
  2988.                            bit file will be generated.  For colour images,
  2989.                            the black plane will be omitted if it is empty.
  2990.                            See the appendix on undercolour removal files for
  2991.                            information on how to control the black content of
  2992.                            an image.
  2993.  
  2994.           Example          Convert the Targa file image1.tga to a CCRF file
  2995.                            using 16 bit compression units:
  2996.  
  2997.                                 alchemy page1.tif --l7
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.                                                     Image Alchemy          41
  3011.  
  3012.  
  3013.  
  3014.  
  3015.           CALS                                                     --c
  3016.  
  3017.  
  3018.                            Computer-aided Acquisition and Logistics Support
  3019.                            (CALS) files are black and white images used by
  3020.                            the US Government as part of their transition to
  3021.                            electronic media.
  3022.  
  3023.           Syntax           --c
  3024.  
  3025.           Extension        .cal
  3026.  
  3027.           Creator          Defense Logistics Agency (DLA)
  3028.  
  3029.           Used by          Department of Defense (DoD)
  3030.  
  3031.           Variations       Reads and writes type 1 (Group 4 raster) CALS
  3032.                            images.
  3033.  
  3034.           Limitations      Document labels, such as document ID and figure
  3035.                            ID, are ignored.
  3036.  
  3037.           Comments         Since CALS files are always black and white,
  3038.                            Alchemy assumes the use of the -b, -8, and -c2
  3039.                            options when writing CALS files.
  3040.  
  3041.  
  3042.                            CALS images are Fax Group IV compressed and are
  3043.                            therefore a good way of storing black and white
  3044.                            line drawings and scans.
  3045.  
  3046.           Example          Convert the TIFF file page1.tif to a CALS file:
  3047.  
  3048.                                 alchemy page1.tif --c
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.           42          Image Alchemy
  3070.  
  3071.  
  3072.  
  3073.  
  3074.           CubicompPictureMaker                                     --P
  3075.  
  3076.  
  3077.                            Cubicomp PictureMaker files are used in broadcast-
  3078.                            quality three dimensional modelling and animation.
  3079.  
  3080.           Syntax           --P type
  3081.  
  3082.           Parameter        type:
  3083.                                 0:  allow any size image
  3084.                                 1:  adjust image to 512 x 488
  3085.                            The default is 0.
  3086.  
  3087.           Extension        .r8 (Red channel image data)
  3088.                            .g8 (Green channel image data)
  3089.                            .b8 (Blue channel image data)
  3090.                            .a8 (Alpha channel image data [optional)
  3091.  
  3092.           Creator          Cubicomp Corp.
  3093.  
  3094.           Used by          Cubicomp PictureMaker
  3095.  
  3096.           Variations       Reads and writes 24 bit true colour images.
  3097.  
  3098.           Limitations      If an alpha channel exists, it will be ignored.
  3099.  
  3100.  
  3101.                            8-bit paletted PictureMaker files are unsupported.
  3102.  
  3103.           Comments         This format is not the same as IBM Picture Maker.
  3104.  
  3105.                            The option for adjusting the image size to 512 x
  3106.                            488 was added because Cubicomp PictureMaker does
  3107.                            not work with images which are not of this exact
  3108.                            size.  If either the X or Y dimension is larger
  3109.                            than 512 or 488, respectively, that dimension will
  3110.                            be truncated.  If either dimension is smaller than
  3111.                            512 or 488, the image will be padded on the right-
  3112.                            hand side or bottom, as necessary, with black.
  3113.  
  3114.  
  3115.                            PictureMaker images have either three or four
  3116.                            separate files per image: a red, green, blue, and
  3117.                            optional alpha channel.  You specify the name of
  3118.                            the .r8 file and Alchemy automatically generates
  3119.                            the name of the .g8 and .b8 files
  3120.  
  3121.                            When writing a PictureMaker file Alchemy will
  3122.                            overwrite, without warning, existing .g8 and .b8
  3123.                            files.
  3124.  
  3125.  
  3126.  
  3127.  
  3128.                                                     Image Alchemy          43
  3129.  
  3130.  
  3131.  
  3132.  
  3133.           Example          Convert the 24-bit JPEG image stones.jpg to
  3134.                            PictureMaker files:
  3135.  
  3136.                                 alchemy --P stones.jpg
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.           44          Image Alchemy
  3188.  
  3189.  
  3190.  
  3191.  
  3192.           Dr. Halo CUT                                             --C
  3193.  
  3194.  
  3195.                            Dr. Halo CUT files are used by various MS-DOS
  3196.                            based paint software.
  3197.  
  3198.           Syntax           --C
  3199.  
  3200.           Extension        .pal (palette and header)
  3201.                            .cut (pixel data)
  3202.  
  3203.           Creator          Media Cybernetics
  3204.  
  3205.           Used by          Dr. HALO III Paint Package
  3206.                            HALO Desktop Imager
  3207.  
  3208.           Variations       8 bits per pixel
  3209.  
  3210.           Comments         Dr. Halo CUT images are actually two files.  You
  3211.                            specify the name of the .cut file and Alchemy
  3212.                            automatically generates the name of the .pal file.
  3213.  
  3214.                            When writing a Dr. Halo CUT file Alchemy will
  3215.                            overwrite, without warning, existing .pal files.
  3216.  
  3217.           Examples         Convert the image test.pcx to a Dr. Halo CUT file:
  3218.  
  3219.                                 alchemy test.pcx --C
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.                                                     Image Alchemy          45
  3247.  
  3248.  
  3249.  
  3250.  
  3251.           Encapsulated PostScript (EPS)                             -e
  3252.  
  3253.  
  3254.                            EPS files are a subset of PostScript; they may be
  3255.                            included by other PostScript files without
  3256.                            requiring that the importing software be able to
  3257.                            interpret the file.
  3258.  
  3259.           Syntax           -e previewType
  3260.  
  3261.           Parameter        previewType:
  3262.                                 0:None
  3263.                                 1:Device independent
  3264.                                 2:TIFF
  3265.                            The default is device independent.
  3266.  
  3267.           Extensions       .epsi
  3268.                            .epi
  3269.  
  3270.           Creator          Adobe Systems, Inc.
  3271.  
  3272.           Used by          PostScript printers
  3273.  
  3274.           Variations       Gray-scale, RGB, and indexed images.
  3275.  
  3276.           Limitations      Alchemy can only write, not read, EPS images.
  3277.  
  3278.           Comments         If the output is gray-scale, it will work with any
  3279.                            PostScript device.  If it's true colour, then the
  3280.                            CMYK extensions or a level 2 device is required.
  3281.                            For paletted files, a level 2 device is always
  3282.                            required.
  3283.  
  3284.           Examples         Convert the file input.gif to a colour EPS file
  3285.                            called input.eps which will not require level 2
  3286.                            PostScript (but will require CMYK extensions),
  3287.                            with no preview:
  3288.  
  3289.                                 alchemy -e0 -24 input.gif
  3290.  
  3291.  
  3292.  
  3293.                            Convert the file input.gif to a gray-scale EPS
  3294.                            file called gray.eps, with a device independent
  3295.                            preview:
  3296.  
  3297.                                 alchemy -e -b input.gif gray.eps
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.           46          Image Alchemy
  3306.  
  3307.  
  3308.  
  3309.  
  3310.           ER Mapper Raster                                         --m
  3311.  
  3312.  
  3313.                            ER Mapper files are used by ER Mapper satellite
  3314.                            image analysis software.
  3315.  
  3316.           Syntax           --m
  3317.  
  3318.           Extensions       .ers for header data
  3319.                            .    for pixel data
  3320.  
  3321.           Creator          Earth Resource Mapping
  3322.  
  3323.           Used by          ER Mapper
  3324.  
  3325.           Variations       Reads and writes single channel and 3 channel
  3326.                            images.
  3327.  
  3328.           Limitations      Alchemy cannot read 2 channel or 4 or more channel
  3329.                            images without using the -Z option (see the
  3330.                            comments section below for more information).
  3331.  
  3332.           Comments         ER Mapper files are actually two files, one with
  3333.                            the extension .ers and the other without any
  3334.                            extension.  The .ers file contains header
  3335.                            information and the non-extensioned file contains
  3336.                            the actual image data.  You specify the name of
  3337.                            the .ers file and Alchemy automatically generates
  3338.                            the name of the other file.
  3339.  
  3340.                            When writing a ER Mapper file Alchemy will
  3341.                            overwrite, without warning, existing ER Mapper
  3342.                            image data files.
  3343.  
  3344.                            Using the -Z option it is possible to select a
  3345.                            single channel or 3 channels when reading a multi-
  3346.                            channel ER Mapper image.  To use the -Z option
  3347.                            follow it with a single number to indicate which
  3348.                            channel is to be read as a grey-scale image or
  3349.                            three numbers to indicate which channels are to be
  3350.                            read as 24 bit colour image.  See the example
  3351.                            section below for details.
  3352.  
  3353.           Example          Convert the Sun Raster file earth.ras to an ER
  3354.                            Mapper file:
  3355.  
  3356.                                 alchemy earth.ras --m
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.                                                     Image Alchemy          47
  3365.  
  3366.  
  3367.  
  3368.  
  3369.                            The ER Mapper file Landsat_TM_year_1991.ers
  3370.                            contains 7 bands these examples show various ways
  3371.                            to read selected bands out of the image:
  3372.  
  3373.                            Convert the first band in the image to a
  3374.                            grayscale Sun Raster file.
  3375.  
  3376.                                 alchemy Landsat_TM_year_1991.ers -Z 1 -s
  3377.  
  3378.                            Convert the fifth band in the image to a
  3379.                            grayscale Sun Raster file.
  3380.  
  3381.                                 alchemy Landsat_TM_year_1991.ers -Z 5 -s
  3382.  
  3383.                            Convert the the image to a  24 bit, colour Sun
  3384.                            Raster file, using band 2 as the red channel, band
  3385.                            7 as the green chanel, and band 3 as the blue
  3386.                            channel.
  3387.  
  3388.                                 alchemy Landsat_TM_year_1991.ers -Z 2 7 3 -s
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.           48          Image Alchemy
  3424.  
  3425.  
  3426.  
  3427.  
  3428.           Erdas LAN/GIS                                            --e
  3429.  
  3430.  
  3431.                            Erdas files are used by Erdas image processing
  3432.                            software.
  3433.  
  3434.           Syntax           --e
  3435.  
  3436.           Extensions       .lan
  3437.                            .gis
  3438.  
  3439.           Creator          Erdas Inc.
  3440.  
  3441.           Used by          Erdas remote sensing software.
  3442.  
  3443.           Variations       Reads and writes 1 and 3 band files.
  3444.  
  3445.                            Reads 4, 8, and 16 bit files.  Writes 8 bit files.
  3446.  
  3447.           Limitations      When writing Erdas files Alchemy does not change
  3448.                            the extension depending on the number of bands in
  3449.                            the image; according to the specification gray-
  3450.                            scale files should have the extension .gis and
  3451.                            true colour files should have the extension .lan.
  3452.                            Alchemy always uses .lan.
  3453.  
  3454.           Comments         1 band files are read in as gray-scale images.
  3455.  
  3456.                            3 band files are read in as true colour images.
  3457.                            The colour mapping between RGB and bands 1, 2, and
  3458.                            3 is Red=Band 1, Green=Band 2, and Blue=Band 3.
  3459.  
  3460.           Examples         Convert the GIS file texas.gis to a Sun raster
  3461.                            file:
  3462.  
  3463.                                 alchemy texas.gis -s
  3464.  
  3465.                            Convert the file satellite.image to a GIS file.
  3466.  
  3467.                                 alchemy -b --e satellite.image satellite.gis
  3468.  
  3469.                            Convert the file satellite.image to a LAN file.
  3470.  
  3471.                                 alchemy --e satellite.image satellite.lan
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.                                                     Image Alchemy          49
  3483.  
  3484.  
  3485.  
  3486.  
  3487.           First Publisher ART                                      --F
  3488.  
  3489.  
  3490.                            First Publisher ART files are black and white
  3491.                            images used as clip art by First Publisher.
  3492.  
  3493.           Syntax           --F
  3494.  
  3495.           Extension        .art
  3496.  
  3497.           Creator          Software Publishing Corp.
  3498.  
  3499.           Used by          First Publisher
  3500.  
  3501.           Variations       Black and white, 1 bit per pixel.
  3502.  
  3503.           Comments         Since ART files are always black and white, 1 bit
  3504.                            per pixel, Alchemy assumes use of the -c2 and -b
  3505.                            options when writing them.
  3506.  
  3507.           Examples         Convert the image scan.pcx to a First Publisher
  3508.                            ART file:
  3509.  
  3510.                                 alchemy scan.pcx --F
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.           50          Image Alchemy
  3542.  
  3543.  
  3544.  
  3545.  
  3546.           Freedom of Press                                         --f
  3547.  
  3548.  
  3549.                            Freedom of Press is a PostScript interpreter from
  3550.                            Custom Applications that converts PostScript files
  3551.                            to raster files.  The Freedom of Press format is
  3552.                            one of the file types it can create.
  3553.  
  3554.           Syntax           --f
  3555.  
  3556.           Extension        .fop
  3557.  
  3558.           Creator          Custom Applications
  3559.  
  3560.           Limitations      Output only.
  3561.  
  3562.                            Only CMYK 1 bit per component per pixel supported.
  3563.  
  3564.           Comments         Freedom of Press images are actually two files, a
  3565.                            data file and an info file.  You specify the name
  3566.                            of the data file and Alchemy automatically
  3567.                            generates the name of the info file.  The output
  3568.                            file is normally output.001, output.002, etc.
  3569.                            Alchemy will strip the first part of the name and
  3570.                            replace it with 'info', so if you specified an
  3571.                            output filename of output.005 there will be
  3572.                            another file created called info.005.  If you
  3573.                            don't specify an extension, Alchemy will use .fop,
  3574.                            so you'll get two files named filename.fop and
  3575.                            info.fop.  Alchemy will overwrite info files
  3576.                            without warning.
  3577.  
  3578.           Related options  -C   Undercolour removal
  3579.  
  3580.           Example          Convert the file image.tga to a Freedom of Press
  3581.                            image called output.003 and info.003, controlling
  3582.                            the undercolour removal process using sample.ucr,
  3583.                            scaling the image to 2500 pixels across (and
  3584.                            scaling proportionately vertically) using nearest
  3585.                            neighbor scaling, and conserving memory:
  3586.  
  3587.                                 alchemy --f -Csample.ucr -X2500 -+ -$
  3588.                                 image.tga output.003
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.                                                     Image Alchemy          51
  3601.  
  3602.  
  3603.  
  3604.  
  3605.           GEM VDI Image File                                       --g
  3606.  
  3607.  
  3608.                            VDI files are files that were developed by Digital
  3609.                            Research to use with GEM.
  3610.  
  3611.           Syntax           --g
  3612.  
  3613.           Extension        .img
  3614.  
  3615.           Creator          Digital Research Inc.
  3616.  
  3617.           Used by          GEM
  3618.  
  3619.           Variations       Reads 1-8 bit grayscale and 3 and 4 bit colour
  3620.                            files.
  3621.  
  3622.  
  3623.                            Writes 1, 3, and 4 bit grayscale and 3 and 4 bit
  3624.                            colour files.
  3625.  
  3626.           Limitations      The support for colour and multiple bit grayscale
  3627.                            GEM files is not very universal.  Therefore make
  3628.                            sure the application you are using to read the GEM
  3629.                            files can in fact handle them.
  3630.  
  3631.  
  3632.                            Alchemy defaults to writing out a 1 bit, black and
  3633.                            white GEM file.  You can explicitly force a 3
  3634.                            plane colour file by use of the -c8 option and a 4
  3635.                            plane colour file by use of the -c16 option (you
  3636.                            may add a -b to write a grayscale file instead of
  3637.                            a colour file).
  3638.  
  3639.           Comments         Because colour GEM files have only 3 or 4 bits of
  3640.                            information and no palette support the quality is
  3641.                            generally not very good for scanned images.  The
  3642.                            GEM format seems to have been designed for line
  3643.                            drawings.
  3644.  
  3645.  
  3646.  
  3647.           Examples         Convert the image scan.pcx to a black and white
  3648.                            GEM file:
  3649.  
  3650.                                 alchemy scan.pcx --g
  3651.  
  3652.                            Convert the image bigscan.tga to a 640x480, 8
  3653.                            colour GEM file, using nearest neighbor scaling
  3654.                            and type 2 dithering:
  3655.  
  3656.  
  3657.  
  3658.  
  3659.           52          Image Alchemy
  3660.  
  3661.  
  3662.  
  3663.  
  3664.                                 alchemy -c 8 --g bigscan.tga -X640
  3665.                                   -Y480 -d2
  3666.  
  3667.                            Do the same thing but write an 8 shade grayscale
  3668.                            file with no dithering:
  3669.  
  3670.                                 alchemy -c 8 --g bigscan.tga -X640
  3671.                                   -Y480 -d -b
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718.                                                     Image Alchemy          53
  3719.  
  3720.  
  3721.  
  3722.  
  3723.           GIF                                                       -g
  3724.  
  3725.  
  3726.                            GIF files were originally developed by CompuServe
  3727.                            as a machine independent image file format.  GIF
  3728.                            files are clearly the most popular way of storing
  3729.                            8 bit, scanned or digitized images.  In addition
  3730.                            the compression ratio achieved by GIF files is
  3731.                            usually better than any other 8 bit format in
  3732.                            common use.  GIF89A files were introduced in 1990
  3733.                            as a method for including text and simple
  3734.                            animations.
  3735.  
  3736.           Syntax           -g version
  3737.  
  3738.           Parameter        version:
  3739.                                 0:  GIF87A
  3740.                                 1:  GIF89A
  3741.                            The default is GIF87A.
  3742.  
  3743.           Extension        .gif
  3744.  
  3745.           Creator          CompuServe, Incorporated
  3746.  
  3747.           Used by          CompuServe
  3748.                            Everyone
  3749.  
  3750.           Variations       Reads 1 through 8 bit GIF87A and GIF89A
  3751.                            interleaved and non-interleaved files.
  3752.  
  3753.                            Writes 1 through 8 bit GIF87A and GIF89A non-
  3754.                            interleaved files.
  3755.  
  3756.           Limitations      When reading GIF89A files only the first image in
  3757.                            the file is read.  Any text, overlays, pauses,
  3758.                            palette changes, etc. are ignored.
  3759.  
  3760.  
  3761.                            Because GIF files only store the size of the
  3762.                            palette to the nearest power of 2 the exact
  3763.                            palette size is lost when converting to and from
  3764.                            GIF files.  For example, if you convert a 240
  3765.                            colour Sun Raster file to a GIF file and back to a
  3766.                            Sun Raster file the resulting Sun Raster file will
  3767.                            have 256 colours.
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.           54          Image Alchemy
  3778.  
  3779.  
  3780.  
  3781.  
  3782.           Comments         When writing a file you probably want to use the
  3783.                            GIF87A variation, since the GIF89A extensions
  3784.                            aren't necessary to store single images and a lot
  3785.                            of other software still can't read GIF89A images.
  3786.                            The only advantage to GIF89A is that the aspect
  3787.                            ratio of the image is preserved (GIF87A does not
  3788.                            have a provision for storing aspect ratio).
  3789.  
  3790.  
  3791.                            The GIF format includes a field for storing the
  3792.                            colour to be used for the background when viewing
  3793.                            files.  Alchemy does not make use of this value.
  3794.                            Alchemy sets the background colour to the darkest
  3795.                            colour in the palette when viewing files and
  3796.                            organizes the palette such that the first colour
  3797.                            is the darkest colour when writing GIF files, if
  3798.                            the palette is created by Alchemy (you can
  3799.                            override this by using the -z option).
  3800.  
  3801.           Related options  -z   Palette Selection
  3802.  
  3803.           Examples         Convert the image test.pcx to a GIF87A image.
  3804.  
  3805.                                 alchemy test.pcx -g
  3806.  
  3807.                            Convert the file input.tga to a 16 colour GIF89A
  3808.                            file:
  3809.  
  3810.                                 alchemy input.tga -c16 -g1
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.                                                     Image Alchemy          55
  3837.  
  3838.  
  3839.  
  3840.  
  3841.           GOES                                                     --G
  3842.  
  3843.  
  3844.                            GOES files are used for satellite image data.
  3845.  
  3846.           Syntax           --G goesType
  3847.  
  3848.           Parameter        goesType:
  3849.                                 0:GARS format
  3850.                                 1:McIDAS format
  3851.                            The default is 0 (GARS format).
  3852.  
  3853.           Extension        .goe
  3854.  
  3855.           Creators         The University of Wisconsin
  3856.                            National Oceanic and Atmospheric Administration
  3857.                            (NOAA)
  3858.                            National Environmental Satellite Data Information
  3859.                            Service (NESDIS)
  3860.  
  3861.           Used by          Various satellite image processing software,
  3862.                            including the McIDAS system.
  3863.  
  3864.           Variations       Reads 8, 16, and 32 bits per pixel GOES images.
  3865.  
  3866.                            Writes 8 bits per pixel images.
  3867.  
  3868.           Limitations      When reading 16 and 32 bit images Alchemy discards
  3869.                            all but the top 8 bits of data.
  3870.  
  3871.  
  3872.                            Alchemy discards any calibration data and level
  3873.                            maps when reading images.
  3874.  
  3875.  
  3876.                            Because of difficulty in getting a sufficient
  3877.                            number of test images in the GOES format
  3878.                            (especially the PUT format) reading GOES images
  3879.                            has not been thoroughly tested.  If you have any
  3880.                            GOES images  which Alchemy does not read correctly
  3881.                            please contact us.
  3882.  
  3883.           Comments         The GARS format is a 7680 bytes per block,
  3884.                            Motorola byte-order, EBCDIC format; the MCIDAS
  3885.                            format is a continuous data, Intel byte-order,
  3886.                            ASCII format.
  3887.  
  3888.  
  3889.                            Since GOES images are always grayscale, Alchemy
  3890.                            assumes the use of the -b and -8 options when
  3891.                            writing a GOES file.
  3892.  
  3893.  
  3894.  
  3895.           56          Image Alchemy
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.                            GOES images contain a lot of information which is
  3902.                            not part of the image data.  This information
  3903.                            includes the time and date the image was captured,
  3904.                            the satellite which captured the image, the type
  3905.                            of instrumentation used, etc.  When reading a GOES
  3906.                            image this information is discarded; when writing
  3907.                            a GOES image 0 is written for all values for which
  3908.                            data is unavailable.
  3909.  
  3910.           Examples         Convert the Erdas file, florida.gis, into a GOES
  3911.                            GARS image:
  3912.  
  3913.                                 alchemy --G0 florida.gis
  3914.  
  3915.                            Do the same thing, but write out a GOES McIDAS
  3916.                            image:
  3917.  
  3918.                                 alchemy --G1 florida.gis
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.                                                     Image Alchemy          57
  3955.  
  3956.  
  3957.  
  3958.  
  3959.           Hitachi Raster Format                                    --h
  3960.  
  3961.  
  3962.                            Hitachi Raster Format (HRF) files are black and
  3963.                            white images used by CADCore.
  3964.  
  3965.           Syntax           --h
  3966.  
  3967.           Extension        .hrf
  3968.  
  3969.           Creator          Hitachi Software Engineering Co., Ltd.
  3970.  
  3971.           Used by          Information and Graphics Systems, Inc. (IGS)
  3972.  
  3973.           Comments         Since HRF files are always black and white,
  3974.                            Alchemy assumes the use of the -b, -8, and -c2
  3975.                            options when writing HRF files.
  3976.  
  3977.  
  3978.           Example          Convert the TIFF file page1.tif to a HRF file:
  3979.  
  3980.                                 alchemy page1.tif --h
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.           58          Image Alchemy
  4014.  
  4015.  
  4016.  
  4017.  
  4018.           HP Printer Command Language (PCL)                         -P
  4019.  
  4020.  
  4021.                            HP PCL files are used by HP LaserJets and
  4022.                            compatible printers.
  4023.  
  4024.           Syntax           -P compressionType
  4025.  
  4026.           Parameter        compressionType:
  4027.                                 0:  Uncompressed
  4028.                                 1:  RLE compressed
  4029.                                 2:  TIFF compressed
  4030.                                 3:  Delta Row compressed
  4031.  
  4032.                                 10:Landscape, Uncompressed
  4033.                                 11:Landscape, RLE compressed
  4034.                                 12:Landscape, TIFF compressed
  4035.                                 13:Landscape, Delta Row compressed
  4036.  
  4037.                                 100:LaserJet 4, Uncompressed
  4038.                                 101:LaserJet 4, RLE compressed
  4039.                                 102:LaserJet 4, TIFF compressed
  4040.                                 103:LaserJet 4, Delta Row compressed
  4041.  
  4042.                                 110:LaserJet 4, Landscape, Uncompressed
  4043.                                 111:LaserJet 4, Landscape, RLE compressed
  4044.                                 112:LaserJet 4, Landscape, TIFF compressed
  4045.                                 113:LaserJet 4, Landscape, Delta Row
  4046.                            compressed
  4047.                            The default is uncompressed.
  4048.  
  4049.           Extension        .pcl
  4050.  
  4051.           Creator          Hewlett-Packard Company
  4052.  
  4053.           Used by          HP LaserJet printers
  4054.                            HP compatible laser printers
  4055.  
  4056.           Variations       PCL files are always 1 bit per pixel, black and
  4057.                            white.
  4058.  
  4059.  
  4060.                            Reads and writes uncompressed, RLE compressed,
  4061.                            TIFF compressed, and Delta Row Compressed files.
  4062.  
  4063.                            Reads and writes portrait and landscape files.
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.                                                     Image Alchemy          59
  4073.  
  4074.  
  4075.  
  4076.  
  4077.           Limitations      In addition to raster images, PCL files can
  4078.                            include text and vector graphics information.
  4079.                            When reading Alchemy only pays attention to raster
  4080.                            images in the file and attempts to skip everything
  4081.                            else.  See Appendix A, Answers to Frequently Asked
  4082.                            Questions, for further discussion of this.
  4083.  
  4084.  
  4085.                            The only resolutions allowed in PCL files are
  4086.                            75 DPI, 100 DPI, 150 DPI, and 300 DPI (and, in the
  4087.                            case of LaserJet 4 type files, 200 DPI, and
  4088.                            600 DPI )
  4089.  
  4090.  
  4091.                            The X and Y resolution must be the same.
  4092.  
  4093.  
  4094.                            If you specify a non-allowable resolution Alchemy
  4095.                            automatically alters the resolution to the next
  4096.                            higher resolution.  For example, if you specify
  4097.                            250 DPI Alchemy will write a 300 DPI PCL file
  4098.  
  4099.  
  4100.                            If no resolution is specified either on the
  4101.                            command line or in the input file Alchemy
  4102.                            automatically choses the smallest resolution which
  4103.                            will allow the entire image to fit on the page.
  4104.  
  4105.           Comments         Since PCL files are always 1 bit, black and white
  4106.                            files, Alchemy assumes the use of the -b, -c2, and
  4107.                            -8 options.
  4108.  
  4109.  
  4110.                            When converting colour or gray-scale images to PCL
  4111.                            you will probably want to scale the output so the
  4112.                            image will be larger than the input image.  This
  4113.                            will allow the dithering to preserve more detail
  4114.                            in the image.
  4115.  
  4116.  
  4117.                            PCL files can be used to generate output which can
  4118.                            be printed on HP LaserJet and compatible printers.
  4119.                            The easiest method is to simply generate a .PCL
  4120.                            file and then copy it to the printer by using the
  4121.                            copy command (when using the copy command from MS-
  4122.                            DOS you will have to use a /B to make sure the
  4123.                            entire file is copied to the printer; see the
  4124.                            example below for more information).
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.           60          Image Alchemy
  4132.  
  4133.  
  4134.  
  4135.  
  4136.                            Not all PCL compatible printers can print all
  4137.                            types of compressed PCL file.  Specifically,
  4138.                            LaserJet II, IID, and earlier printers can print
  4139.                            only uncompressed PCL files.  LaserJet IIp
  4140.                            printers can print only uncompressed and RLE
  4141.                            compressed files.  LaserJet III, IIID, IIIp,
  4142.                            IIIsi, and 4 printers can print all types of
  4143.                            compressed PCL files.
  4144.  
  4145.                            In general, the higher the compression type, the
  4146.                            better the compression ratio.
  4147.  
  4148.                            The Landscape option can be used to write a
  4149.                            landscape PCL file.  Because of changes in the PCL
  4150.                            format, only LaserJet III and newer printers can
  4151.                            print Alchemy produced landscape PCL files.
  4152.  
  4153.                            It is now possible to write a PCL file directly to
  4154.                            a HP LaserJet or compatible printer.  If you use
  4155.                            the name of the device as the output file name
  4156.                            Alchemy will redirect output to that device (for
  4157.                            example, use prn: as the output file name if your
  4158.                            LaserJet is attached to the prn: port) .
  4159.  
  4160.           Examples         Convert the image image.gif to a HP PCL file,
  4161.                            using no compression:
  4162.  
  4163.                                 alchemy image.gif -P
  4164.  
  4165.  
  4166.  
  4167.                            Convert the image small.gif to a HP PCL file
  4168.                            called out.pcl with dimensions of 2000 by 2000 at
  4169.                            300 DPI:
  4170.  
  4171.                                 alchemy small.gif -P -X2000 -Y2000
  4172.                                 -D 300 300 out
  4173.  
  4174.                            Print the image generated by the previous example
  4175.                            (for MS-DOS machines only).  The /B is necessary
  4176.                            to tell the copy command that the file is a binary
  4177.                            file:
  4178.  
  4179.                                 copy /B out.pcl prn:
  4180.  
  4181.                            Convert the image small.gif to a HP PCL file
  4182.                            called out2.pcl with dimensions of 2000 by 2000 at
  4183.                            300 DPI, using TIFF compression:
  4184.  
  4185.                                 alchemy small.gif -P2 -X2000 -Y2000
  4186.                                 -D 300 300 out2
  4187.  
  4188.  
  4189.  
  4190.                                                     Image Alchemy          61
  4191.  
  4192.  
  4193.  
  4194.  
  4195.                            To print the print the image madonna.gif directly
  4196.                            to your Laserjet 4 at the largest resolution,
  4197.                            using Delta Row compression with dithering type
  4198.                            22:
  4199.  
  4200.                                 alchemy madonna.gif -P104 -D600 600 -Xb4800 -
  4201.                                 YB6600 -+ -d22 prn:
  4202.  
  4203.                            To print the print all the TIFF files in the
  4204.                            current directory directly to a LaserJet 2:
  4205.  
  4206.                                 alchemy *.tif -P prn:
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.           62          Image Alchemy
  4250.  
  4251.  
  4252.  
  4253.  
  4254.           HP Raster Transfer Language (RTL)                        --r
  4255.  
  4256.  
  4257.                            RTL files are used by HP colour raster printers
  4258.                            and plotters.
  4259.  
  4260.           Syntax           --r type
  4261.  
  4262.           Parameter        type:
  4263.                                 0:  PaintJet
  4264.                                 1:  HP7600 uncompressed
  4265.                                 2:  HP7600 PackBits compression
  4266.                                 3:  HP7600 planar uncompressed
  4267.                                 4:  HP7600 planar PackBits compression
  4268.                                 5:  HP7600 planar Group III compression
  4269.                                 6:  on the fly uncompressed
  4270.                                 7:  on the fly rle
  4271.                                 10:  NovaJet
  4272.                            The default is HP7600 PackBits compression.
  4273.  
  4274.           Extension        .rtl
  4275.  
  4276.           Creator          Hewlett-Packard Company
  4277.  
  4278.           Used by          HP raster plotters and printers including
  4279.                            PaintJets and HP 7600 Series plotters.
  4280.  
  4281.           Variations       CMYK, 1 bit per component per pixel.
  4282.  
  4283.                            Blake and white, 1 bit per pixel.
  4284.  
  4285.           Limitations      Output only.
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.                                                     Image Alchemy          63
  4309.  
  4310.  
  4311.  
  4312.  
  4313.           Comments         Compression types 6 and 7 are equivalent to types
  4314.                            1 and 2 except they tell the plotter it may plot
  4315.                            the data as received instead of waiting for the
  4316.                            entire image.  This is useful on the DesignJet
  4317.                            plotters which have small buffers compared to the
  4318.                            imageable area.
  4319.  
  4320.                            The NovaJet option cause Alchemy to create RTL
  4321.                            files which are compatible with NovaJet plotters.
  4322.  
  4323.                            Alchemy will generate a colour RTL file unless the
  4324.                            input file is black and white or grayscale or the
  4325.                            -b option is specified as part of the conversion.
  4326.  
  4327.                            RTL files can be used to produce output which can
  4328.                            be printed on HP colour printers and raster
  4329.                            plotters.  The file can be printed by sending the
  4330.                            file to the plotter.  There is no additional setup
  4331.                            required for the PaintJet.  HP7600 series plotters
  4332.                            should be in HP-GL/2 mode best results will
  4333.                            generally be achieved with compensation off.  To
  4334.                            get colour plots from the HP7600 series the
  4335.                            plotter must be in 4 or 5 pass mode.  The file
  4336.                            must be sent to the printer/plotter in binary mode
  4337.                            (for MS-DOS systems, use the /B option with the
  4338.                            copy command).
  4339.  
  4340.                            If the input is black and white, you probably want
  4341.                            to do the conversion without an undercolour
  4342.                            removal file and with dithering off.  See below
  4343.                            for an example.
  4344.  
  4345.  
  4346.                            If the input is gray-scale, you probably do want
  4347.                            to use an undercolour removal file to perform
  4348.                            density correction, but with 100% black removal
  4349.                            (the black removal tables should contain 0 through
  4350.                            255, increasing by one each line) so that the
  4351.                            output won't contain cyan, magenta, or yellow.
  4352.                            The sample directory on the distribution diskette
  4353.                            has a UCR file called gray.ucr which has 100%
  4354.                            black removal.
  4355.  
  4356.           Related options  -C   Undercolour Removal File
  4357.                            -d   Specify dither type
  4358.  
  4359.           Examples         Convert the black and white image test.wpg to a
  4360.                            RTL file for a PaintJet called test.rtl, not using
  4361.                            a UCR file and with dithering off:
  4362.  
  4363.                                 alchemy --r0 -d0 test.wpg
  4364.  
  4365.  
  4366.  
  4367.           64          Image Alchemy
  4368.  
  4369.  
  4370.  
  4371.  
  4372.                            Convert the file image.tga to a RTL file for a
  4373.                            PaintJet called image.rtl, using the undercolour
  4374.                            removal file sample.ucr:
  4375.  
  4376.                                 alchemy --r0 -Csample.ucr image.tga
  4377.  
  4378.                            Convert the file image.tga to a planar RTL file
  4379.                            called image.rtl using PackBits compression,
  4380.                            controlling the undercolour removal process using
  4381.                            sample.ucr, scaling the image to 3000 pixels
  4382.                            across using good quality scaling, preserving the
  4383.                            aspect ratio (by proportionately scaling the image
  4384.                            vertically), and conserving memory:
  4385.  
  4386.                                 alchemy --r4 -Csample.ucr -Xb3000 -+ -$
  4387.                                 image.tga
  4388.  
  4389.                            Plot the image generated by the previous example
  4390.                            (for MS-DOS machines with the plotter connected to
  4391.                            a port which is mapped to prn:):
  4392.  
  4393.                                 copy /b image.rtl prn:
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.                                                     Image Alchemy          65
  4427.  
  4428.  
  4429.  
  4430.  
  4431.           HP-48sx Graphic Object (GROB)                            --H
  4432.  
  4433.  
  4434.                            Graphic Object files are used by HP-48sx
  4435.                            calculators.
  4436.  
  4437.           Syntax           --H type
  4438.  
  4439.           Parameter        type:
  4440.                                 0:  Binary
  4441.                                 1:  ASCII
  4442.                            The default is Binary.
  4443.  
  4444.           Extension        .grb
  4445.                            .asc
  4446.  
  4447.           Creator          Hewlett-Packard Company
  4448.  
  4449.           Used by          HP -48sx calculators.
  4450.  
  4451.           Variations       Black and white, 1 bit per pixel.
  4452.  
  4453.           Examples         Convert the image madonna.gif to a ASCII HP-48sx
  4454.                            GROB file
  4455.  
  4456.                                 alchemy madonna.gif --H 1
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.           66          Image Alchemy
  4486.  
  4487.  
  4488.  
  4489.  
  4490.           HSI JPEG                                                 --j
  4491.  
  4492.  
  4493.                            The HSI JPEG format is a variation of the JPEG
  4494.                            format that was designed by Handmade Software to
  4495.                            better compress paletted images.  Paletted images
  4496.                            often have large areas where the image consists of
  4497.                            1 or 2 colours; JPEG compression does a poor job
  4498.                            on these sections when compared to LZW
  4499.                            compression.  HSI JPEG files are a combination of
  4500.                            JPEG and LZW compression.
  4501.  
  4502.           Syntax           --j
  4503.  
  4504.           Extension        .jpg
  4505.  
  4506.           Creator          Handmade Software, Inc.
  4507.  
  4508.           Used by          Image Alchemy
  4509.                            GIF2JPG (another Handmade Software product)
  4510.  
  4511.           Variations       8 bit paletted
  4512.  
  4513.           Comments         HSI JPEG files are not compatible with JPEG or
  4514.                            JFIF files.  If you intend to transfer files to
  4515.                            other systems do not use this format, use the
  4516.                            standard JPEG format instead (using the -j
  4517.                            option).
  4518.  
  4519.           Example          Convert the file madonna.gif to a HSI JPEG file:
  4520.  
  4521.                                 alchemy --j madonna.gif
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.                                                     Image Alchemy          67
  4545.  
  4546.  
  4547.  
  4548.  
  4549.           HSI Palette                                               -l
  4550.  
  4551.  
  4552.                            PAL files are palettes which are ASCII files that
  4553.                            can be edited with a text editor.
  4554.  
  4555.           Syntax           -l (lower case L)
  4556.  
  4557.           Extension        .pal
  4558.  
  4559.           Creator          Handmade Software, Inc.
  4560.  
  4561.           Used by          Image Alchemy
  4562.  
  4563.           Variations       Palette files are always ASCII files.
  4564.  
  4565.           Limitations      .PAL files contain only a palette.
  4566.  
  4567.           Comments         The format of PAL files is described in
  4568.                            Appendix H.
  4569.  
  4570.           Related options  -f   Match image to specified palette
  4571.                            -F   False colour with specified palette
  4572.  
  4573.           Examples         Extract the palette from the GIF file madonna.gif:
  4574.  
  4575.                                 alchemy madonna.gif -l
  4576.  
  4577.                            Convert the file image.tga to a GIF file, matching
  4578.                            the palette found in standard.pal:
  4579.  
  4580.                                 alchemy image.tga -g -f standard.pal
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.           68          Image Alchemy
  4604.  
  4605.  
  4606.  
  4607.  
  4608.           HSI Raw                                                   -r
  4609.  
  4610.  
  4611.                            HSI Raw files are used internally by Image Alchemy
  4612.                            when converting between certain combinations of
  4613.                            image formats.  If you are interested in
  4614.                            converting custom format images to be used with
  4615.                            Image Alchemy we suggest using HSI Raw Files.
  4616.  
  4617.           Syntax           -r
  4618.  
  4619.           Extension        .raw
  4620.  
  4621.           Creator          Handmade Software Inc.
  4622.  
  4623.           Used by          Image Alchemy
  4624.  
  4625.           Variations       8 bit paletted and 24 bit true colour,
  4626.                            uncompressed, not packed.
  4627.  
  4628.           Comments         This format is used internally as temporary files
  4629.                            by Alchemy when doing certain image conversions;
  4630.                            it can also be explicitly read and written.  This
  4631.                            format is described in Appendix F.
  4632.  
  4633.           Examples         Convert the file test.lbm to a raw file:
  4634.  
  4635.                                 alchemy test.lbm -r
  4636.  
  4637.                            Convert the raw file, test.raw, to a 24 bit Targa
  4638.                            file called output.tga:
  4639.  
  4640.                                 alchemy -24 -a test.raw output.tga
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.                                                     Image Alchemy          69
  4663.  
  4664.  
  4665.  
  4666.  
  4667.           IBM Picture Maker                                        --i
  4668.  
  4669.  
  4670.                            IBM Picture Maker files are used by IBM
  4671.                            presentation software.
  4672.  
  4673.           Syntax           --i
  4674.  
  4675.           Extension        .pic
  4676.  
  4677.           Creator          IBM
  4678.  
  4679.           Used by          IBM Storyboard Live!
  4680.  
  4681.           Variations       Reads and writes 256 colour Picture Maker files.
  4682.  
  4683.           Limitations      16 colour Picture Maker files are not supported.
  4684.                            Picture Maker images cannot be larger than
  4685.                            640x480.
  4686.  
  4687.           Comments         This is not the same format as Cubicomp
  4688.                            PictureMaker.
  4689.  
  4690.  
  4691.                            256 colour Picture Maker files may be either
  4692.                            320x200 or 640x480.  Image Alchemy will write the
  4693.                            smallest variation that the image will fit in,
  4694.                            with the image centered; the borders will be
  4695.                            filled with colour 0.
  4696.  
  4697.           Examples         Convert the PCX file, giraffe.pcx, into an IBM
  4698.                            Picture Maker file:
  4699.  
  4700.                                 alchemy --i giraffe.pcx
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.           70          Image Alchemy
  4722.  
  4723.  
  4724.  
  4725.  
  4726.           IFF/ILBM                                                  -i
  4727.  
  4728.  
  4729.                            IFF (Interchange File Format) files are used by
  4730.                            Amiga computers for storing a number of types of
  4731.                            data, including images, text, and music; ILBM
  4732.                            (InterLeaved BitMap) is a type of IFF file used to
  4733.                            store images.
  4734.  
  4735.           Syntax           -i
  4736.  
  4737.           Extensions       .lbm
  4738.                            .iff
  4739.                            .ilbm
  4740.  
  4741.           Creator          Commodore-Amiga Corp.
  4742.  
  4743.           Used by          Amiga
  4744.                            Deluxe Paint
  4745.  
  4746.           Variations       Reads 1 through 8 bit, 24 bit, HAM, and PBM images
  4747.  
  4748.                            Writes 1 through 8 bit and 24 bit images.
  4749.  
  4750.           Limitations      Dynamic Hi-Res images are not supported.
  4751.  
  4752.                            Does not write images in any of the Amiga specific
  4753.                            display modes.
  4754.  
  4755.           Comments         If you're writing an ILBM file for use on an
  4756.                            Amiga, you probably want to write either a
  4757.                            paletted file with 32 colours or a 24 bit file.
  4758.                            24 bit ILBM files can then be converted to one of
  4759.                            the Amiga specific display modes with various
  4760.                            third-party utilities.
  4761.  
  4762.           Example          Convert the file input.pcx to an IFF/ILBM file
  4763.                            called output.lbm with 32 colours:
  4764.  
  4765.                                 alchemy -i -c32 input.pcx output.lbm
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.                                                     Image Alchemy          71
  4781.  
  4782.  
  4783.  
  4784.  
  4785.           Img Software Set                                         --Q
  4786.  
  4787.  
  4788.                            The Img Software Set  is a collection of tools for
  4789.                            manipulating graphic images freely available for
  4790.                            various UNIX workstations (see Appendix J for
  4791.                            information on how to get a copy of the Img
  4792.                            Software Set).
  4793.  
  4794.           Syntax           --Q
  4795.  
  4796.           Extensions       .img
  4797.                            .p
  4798.                            .a
  4799.  
  4800.           Creator          Paul Raveling
  4801.  
  4802.           Used by          Img Software Set
  4803.  
  4804.           Variations       Reads and writes 8 bit paletted and 24 bit images.
  4805.  
  4806.           Limitations      Alchemy does not read nor write compressed (.Z)
  4807.                            images.  Use the UNIX supplied uncompress program
  4808.                            to decompress those images before reading with
  4809.                            Alchemy.
  4810.  
  4811.           Example          Convert the Sun Raster file test.ras to an Img
  4812.                            Software Set file:
  4813.  
  4814.                                 alchemy test.ras --Q
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.           72          Image Alchemy
  4840.  
  4841.  
  4842.  
  4843.  
  4844.           JPEG/JFIF                                                 -j
  4845.  
  4846.  
  4847.                            JPEG is a new type of image file format that uses
  4848.                            a lossy compression technique to achieve high
  4849.                            compression ratios.  See Appendix C, JPEG
  4850.                            Compression, for more information.
  4851.  
  4852.           Syntax           -j[coding] quality
  4853.  
  4854.           Parameters       coding:
  4855.                                 Specify the type of entropy coding to
  4856.                            perform.
  4857.                                    none:  default Huffman coding
  4858.                                    a:  arithmetic coding
  4859.                                    h:  optimum Huffman coding
  4860.                            quality:
  4861.                                 1 through 100 (larger is higher quality)
  4862.                            The default quality is 32.
  4863.  
  4864.           Extension        .jpg
  4865.  
  4866.           Creator          Joint Photographic Experts Group (JPEG)
  4867.  
  4868.           Used by          Lossy compression of photographic images.
  4869.  
  4870.           Variations       Gray-scale images are saved as single channel JPEG
  4871.                            files; colour images are saved as three channel
  4872.                            JPEG files.
  4873.  
  4874.                            Reads and writes baseline JPEG with CCIR-601 YCbCr
  4875.                            colour space, interleaved components, Huffman or
  4876.                            arithmetic coded.
  4877.  
  4878.                            Alchemy can read files with any component sub-
  4879.                            sampling up to 4x4; it always writes 2h:1v 1h:1v
  4880.                            1h:1v.
  4881.  
  4882.                            Alchemy Huffman coded JPEG files comply with the
  4883.                            industry standard `JFIF' interchange format.
  4884.  
  4885.           Limitations      JPEG files are always lossy, which means that the
  4886.                            compressed image is not identical to the original
  4887.                            image.  At high quality factors (32 and above)
  4888.                            this loss is generally so slight as to be barely
  4889.                            noticeable.  There is no quality factor which is
  4890.                            guaranteed to be lossless.
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.  
  4897.  
  4898.                                                     Image Alchemy          73
  4899.  
  4900.  
  4901.  
  4902.  
  4903.           Comments         By default, Image Alchemy uses a fixed set of
  4904.                            Huffman tables to compress an image.  If the -j is
  4905.                            immediately followed by an 'h', Alchemy will
  4906.                            generate a set of custom tables optimized for the
  4907.                            image and quality factor.  This usually produces
  4908.                            5-20% better compression (depending on the image
  4909.                            content and quality factor) but requires an
  4910.                            additional pass over the image data, so it takes a
  4911.                            little longer to compress (there's no effect on
  4912.                            the decompression time).  Alchemy can also use
  4913.                            arithmetic coding (by specifying an 'a' after the
  4914.                            -j); this will produce 10-20% better compression;
  4915.                            this is at the expense of JFIF compatibility and
  4916.                            it takes a little longer to both compress and
  4917.                            decompress than Huffman coded files.
  4918.  
  4919.                            Quality may vary between 1 and 100; the default is
  4920.                            32.  The higher the number the higher the quality
  4921.                            of the image and the lower the compression ratio.
  4922.                            Quality factors below 10 will produce images with
  4923.                            significant loss of quality.
  4924.  
  4925.                            JPEG files are based on the Joint Photographic
  4926.                            Experts Group (JPEG) CD 10918-1 draft standard.
  4927.  
  4928.                            Since JPEG compression was designed for use with
  4929.                            continuous tone images (such as those produced by
  4930.                            a scanner or digitizer), poor results can be
  4931.                            expected when compressing line drawings.
  4932.  
  4933.  
  4934.           Related options  -q   Apply Smoothing when decompressing a JPEG
  4935.                            image.
  4936.  
  4937.                            Because JPEG compression works on 8x8 pixel blocks
  4938.                            there may be discontinuities at the edges of these
  4939.                            blocks producing block artifacts.  Smoothing
  4940.                            attempts to reduce these artifacts.  Smoothing is
  4941.                            really only necessary at very low quality settings
  4942.                            (less than 10); even then the effects of smoothing
  4943.                            are not particularly significant.
  4944.  
  4945.           Examples         Convert the file photo.tga to a JPEG file called
  4946.                            photo.jpg, using a high quality setting:
  4947.  
  4948.                                 alchemy -j70 photo.tga
  4949.  
  4950.                            Convert the file photo.tga to a JPEG file called
  4951.                            photo.jpg, using a low quality setting and
  4952.                            generating optimum Huffman tables:
  4953.  
  4954.                                 alchemy -jh10 photo.tga
  4955.  
  4956.  
  4957.           74          Image Alchemy
  4958.  
  4959.  
  4960.  
  4961.  
  4962.                            Convert the JPEG file, lores.jpg, to a PCX file
  4963.                            using smoothing:
  4964.  
  4965.                                 alchemy lores.jpg -p -q
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.  
  5015.  
  5016.                                                     Image Alchemy          75
  5017.  
  5018.  
  5019.  
  5020.  
  5021.           Jovian VI                                                --J
  5022.  
  5023.  
  5024.                            Jovian VI files are created by the Jovian Logic
  5025.                            video capture boards.
  5026.  
  5027.           Syntax           --J
  5028.  
  5029.           Extensions       .vi
  5030.  
  5031.           Creator          Jovian Logic Corp.
  5032.  
  5033.           Used by          Jovian Logic
  5034.  
  5035.           Variations       Reads 1, 4, 6, and 8 bit gray-scale images, 4 and
  5036.                            8 bit colour paletted images, and 16 and 24 bit
  5037.                            true colour images.
  5038.  
  5039.                            Writes 8 bit gray-scale, 4 and 8 bit colour
  5040.                            paletted images, and 16 and 24 bit true colour
  5041.                            images.
  5042.  
  5043.           Limitations      Reads files with 6 and 8 bit palettes, always
  5044.                            writes 6 bit palettes.
  5045.  
  5046.                            Gray-scale files are always 8 bit.
  5047.  
  5048.           Comments         When writing a VI file the palette always starts
  5049.                            at 0, but will not necessarily be black (which is
  5050.                            the way that Jovian VI files are written).
  5051.  
  5052.           Example          Convert the GIF file, test.gif, to a 16 colour VI
  5053.                            file:
  5054.  
  5055.                                 alchemy test.gif --J -c16
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.           76          Image Alchemy
  5076.  
  5077.  
  5078.  
  5079.  
  5080.           Lumena CEL                                               --L
  5081.  
  5082.  
  5083.                            Lumena CEL files are used by Time Arts software.
  5084.  
  5085.           Syntax           --L
  5086.  
  5087.           Extension        .cel
  5088.  
  5089.           Creator          Time Arts
  5090.  
  5091.           Used by          Lumena
  5092.  
  5093.           Variations       Reads and writes 15 and 32 bit images.
  5094.  
  5095.           Limitations      The Alpha channel in 32 bit images is ignored.
  5096.  
  5097.           Example          Convert the file test.tga to a Lumena CEL file:
  5098.  
  5099.                                 alchemy --L test.tga
  5100.  
  5101.  
  5102.  
  5103.  
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.                                                     Image Alchemy          77
  5135.  
  5136.  
  5137.  
  5138.  
  5139.           Macintosh PICT/PICT2                                      -m
  5140.  
  5141.  
  5142.                            PICT files were created by Apple Computer as a
  5143.                            common format for Macintosh applications to use.
  5144.                            Virtually every Macintosh application can use PICT
  5145.                            files.
  5146.  
  5147.           Syntax           -m macBinary
  5148.  
  5149.           Parameters       macBinary:
  5150.                                 0:do not write a MacBinary file
  5151.                                 1:write a MacBinary file
  5152.                            The default is to not write a MacBinary file.
  5153.  
  5154.           Extensions       .pict
  5155.                            .pic
  5156.  
  5157.           Creator          Apple Computer, Inc.
  5158.  
  5159.           Used by          Macintosh computers
  5160.  
  5161.           Variations       Reads 1, 2, 4, 8, 16, and 32 bit PICT and PICT2
  5162.                            images
  5163.  
  5164.                            Writes 1, 2, 4, 8, and 32 bit PICT2 images.
  5165.  
  5166.           Limitations      Only pays attention to pixMaps in the image;
  5167.                            attempts to skip everything else.
  5168.  
  5169.           Comments         Due to the enormous number of options allowed in
  5170.                            PICT files, reading PICTs may not always work.
  5171.                            See Appendix A, Answers to Frequently Asked
  5172.                            Questions, for more information.
  5173.  
  5174.                            Adding a MacBinary header to a MacPaint file is
  5175.                            useful if transfering the file to a Macintosh
  5176.                            computer over by modem.  The MacBinary header will
  5177.                            allow the Macintosh to automatically recognize the
  5178.                            file as a MacPaint file.
  5179.  
  5180.           Example          Convert the file input1.gif to a Mac PICT file
  5181.                            called input1.pic:
  5182.  
  5183.                                 alchemy -m input1.gif
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.           78          Image Alchemy
  5194.  
  5195.  
  5196.  
  5197.  
  5198.           MacPaint                                                 --t
  5199.  
  5200.  
  5201.                            MacPaint files are black and white images used by
  5202.                            Macintosh computers.
  5203.  
  5204.           Syntax           --tmacBinary
  5205.  
  5206.           Parameters       macBinary:
  5207.                                 0:do not write a MacBinary file
  5208.                                 1:write a MacBinary file
  5209.                            The default is to not write a MacBinary file.
  5210.  
  5211.           Extensions       .mac
  5212.  
  5213.           Creator          Apple Computer, Inc.
  5214.  
  5215.           Used by          Macintosh computers
  5216.  
  5217.           Variations       1 bit, black and white.
  5218.  
  5219.           Limitations      MacPaint images are always 576x720 pixels.  If you
  5220.                            attempt to write a MacPaint image which is larger,
  5221.                            Alchemy will report this as an error.  If you
  5222.                            write an image which is smaller Alchemy will pad
  5223.                            the image with white space along the right-hand
  5224.                            side and bottom.
  5225.  
  5226.                            Because MacPaint images are always black and
  5227.                            white, the -c2, -8, and -b options are assumed
  5228.                            when writing an image.
  5229.  
  5230.           Comments         Adding a MacBinary header to a MacPaint file is
  5231.                            useful if transfering the file to a Macintosh
  5232.                            computer over by modem.  The MacBinary header will
  5233.                            allow the Macintosh to automatically recognize the
  5234.                            file as a MacPaint file.
  5235.  
  5236.           Example          Convert the file input1.gif to a MacPaint file
  5237.                            called input1.pic:
  5238.  
  5239.                                 alchemy --t input1.gif
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.                                                     Image Alchemy          79
  5253.  
  5254.  
  5255.  
  5256.  
  5257.           MTV Ray Tracer                                           --M
  5258.  
  5259.  
  5260.                            MTV files are used by the MTV RayTracer, a public
  5261.                            domain ray tracer for Suns and other workstations.
  5262.  
  5263.           Syntax           --M
  5264.  
  5265.           Extension        .mtv
  5266.  
  5267.           Creator          Mark T. VandeWettering
  5268.  
  5269.           Used by          MTV Raytracer
  5270.  
  5271.           Variations       24 bit true colour.
  5272.  
  5273.           Comments         MTV is a public domain ray-tracer available free
  5274.                            of charge via anonymous ftp from
  5275.                            drizzle.cs.uoregon.edu or via floppy disk from us.
  5276.  
  5277.           Example          Convert the file spheres.img to a MTV file:
  5278.  
  5279.                                 alchemy spheres.img --M
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.           80          Image Alchemy
  5312.  
  5313.  
  5314.  
  5315.  
  5316.           Multi-Image Palette                                       -L
  5317.  
  5318.  
  5319.                            This option will generate an optimum palette for a
  5320.                            variable number of images.  This is useful for
  5321.                            finding a common palette where multiple images are
  5322.                            used (animations, for instance), without resorting
  5323.                            to a uniform palette.
  5324.  
  5325.           Syntax           -L filename
  5326.  
  5327.           Parameters       filename is the name of the palette file which
  5328.                            will contain the optimized palette for all of the
  5329.                            images.
  5330.  
  5331.           Extension        .pal
  5332.  
  5333.           Creator          Handmade Software, Inc.
  5334.  
  5335.           Used by          Image Alchemy
  5336.  
  5337.           Variations       Palette files are always ASCII files.
  5338.  
  5339.           Limitations      .PAL files contain only a palette.
  5340.  
  5341.           Comments         The format of PAL files is described in
  5342.                            Appendix H.
  5343.  
  5344.           Related options  -f   Match image to specified palette
  5345.                            -F   False colour with specified palette
  5346.  
  5347.           Examples         Generate an optimum palette for all GIF files in
  5348.                            the current directory:
  5349.  
  5350.                                 alchemy *.gif -L
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.                                                     Image Alchemy          81
  5371.  
  5372.  
  5373.  
  5374.  
  5375.           OS/2 Bitmap (BMP)                                         -O
  5376.  
  5377.  
  5378.                            OS/2 BMP files are used by IBM OS/2 2.0.
  5379.  
  5380.           Syntax           -O compressionType (Uppercase letter o)
  5381.  
  5382.           Parameter        compressionType:
  5383.                                 0:None
  5384.                                 1:RLE
  5385.                            The default is none.
  5386.  
  5387.           Extension        .bmp
  5388.  
  5389.           Creator          IBM Corp.
  5390.  
  5391.           Used by          OS/2 2.0
  5392.  
  5393.           Variations       Reads 1, 4, 8, and 24 bit RGB (raw), RLE4, and
  5394.                            RLE8 files.
  5395.  
  5396.                            Writes 1, 4, 8, and 24 bit RGB (raw), RLE4, and
  5397.                            RLE8 files.
  5398.  
  5399.           Comments
  5400.  
  5401.  
  5402.           Examples         Convert the image test.jpg to a OS/2 BMP file:
  5403.  
  5404.                                 alchemy test.jpg -O
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.           82          Image Alchemy
  5430.  
  5431.  
  5432.  
  5433.  
  5434.           PCPAINT/Pictor Page Format                                -A
  5435.  
  5436.  
  5437.                            The Pictor format was designed so that an image
  5438.                            could be loaded into an IBM graphics adapter very
  5439.                            quickly; it does this by almost exactly
  5440.                            duplicating the organization of the graphics
  5441.                            adapter memory.  This makes the format hardware
  5442.                            dependent.
  5443.  
  5444.           Syntax           -A type
  5445.  
  5446.           Parameter           type:
  5447.                                    0:320x200x4 CGA*
  5448.                                    1:320x200x16 PCjr/Tandy*
  5449.                                    2:640x200x2 CGA*
  5450.                                    3:640x200x16 EGA
  5451.                                    4:640x350x2 EGA
  5452.                                    5:640x350x4 EGA
  5453.                                    6:640x350x16 EGA
  5454.                                    7:720x348x2 Hercules*
  5455.                                    8:640x350x16 VGA
  5456.                                    9:320x200x16 EGA
  5457.                                    10:640x400x2 AT&T/Toshiba*
  5458.                                    11:320x200x256 VGA/MCGA
  5459.                                    12:640x480x16 VGA
  5460.                                    13:720x348x16 Hercules InColor*
  5461.                                    14:640x480x2 VGA/MCGA
  5462.                                    15:800x600x2 EGA/VGA
  5463.                                    16:800x600x16 EGA/VGA
  5464.                                    17:640x400x256 SVGA
  5465.                                    18:640x480x256 SVGA
  5466.                                    19:800x600x256 SVGA
  5467.  
  5468.  
  5469.  
  5470.                                    20:1024x768x2 SVGA
  5471.                                    21:1024x768x16 SVGA
  5472.                                    22:360x480x256 VGA
  5473.                                    23:1024x768x256 SVGA
  5474.                               The default is 640x480x256 SVGA.
  5475.                               *These modes are not yet supported.
  5476.  
  5477.           Extension        .pic
  5478.                            .clp
  5479.  
  5480.           Creator          John Bridges
  5481.  
  5482.           Used by          PCPAINT
  5483.                            GRASP
  5484.  
  5485.  
  5486.  
  5487.  
  5488.                                                     Image Alchemy          83
  5489.  
  5490.  
  5491.  
  5492.  
  5493.           Variations       There are variations for most IBM and third party
  5494.                            graphics adapter display modes.
  5495.  
  5496.           Limitations      Only the EGA and VGA modes are supported at this
  5497.                            time.  Text modes are not supported.
  5498.  
  5499.           Comments         Some Pictor files do not contain palettes.  For
  5500.                            those files Alchemy will default to using a
  5501.                            standard palette appropriate to the display mode
  5502.                            the file was saved in.  However, the image may not
  5503.                            use the default palette; in that case you can read
  5504.                            the palette from another file with the -F false
  5505.                            colour option.
  5506.  
  5507.           Related options  -F   False colour
  5508.  
  5509.           Example          Convert the file image.pcx to a Pictor file called
  5510.                            image.pic, for 800x600x256 SVGA mode:
  5511.  
  5512.                                 alchemy -A19 image.pcx
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.           84          Image Alchemy
  5548.  
  5549.  
  5550.  
  5551.  
  5552.           PCX                                                       -p
  5553.  
  5554.  
  5555.                            PCX files are used extensively by MS-DOS machines.
  5556.                            Originally created by ZSoft for use by their paint
  5557.                            packages, PCX files can be read and written by
  5558.                            almost all MS-DOS paint software and desktop
  5559.                            publishing software.
  5560.  
  5561.                            A new variation of PCX file, DCX, is used by many
  5562.                            MS-DOS fax boards.
  5563.  
  5564.                            PCX files suffer from two problems:  the
  5565.                            compression ratio is poor for 8 and 24 bit images
  5566.                            and PCX files are often written out incorrectly;
  5567.                            see the Limitations section below for details.
  5568.  
  5569.           Syntax           -p type
  5570.  
  5571.           Parameter        type:
  5572.                                 0:Standard PCX
  5573.                                 1:DCX
  5574.                                 2:PCJ
  5575.                            The default is standard PCX.
  5576.  
  5577.           Extension        .pcx
  5578.  
  5579.           Creator          ZSoft Corporation
  5580.  
  5581.           Used by          PC Paint
  5582.                            Publisher's Paintbrush
  5583.                            Most paint and desktop publishing software can
  5584.                            read and write PCX files.
  5585.                            Fax board software uses the DCX variation of PCX.
  5586.  
  5587.           Variations       1, 4, 8, and 24 bits per pixel for standard PCX
  5588.                            files.
  5589.                            1 bit per pixel for DCX files.
  5590.                            8 bits per pixel for PCJ files.
  5591.  
  5592.           Limitations      PCX format files are often written out
  5593.                            incorrectly; Alchemy attempts to figure out what
  5594.                            is wrong and make intelligent decisions (things
  5595.                            Alchemy can deal with include PCX files without
  5596.                            palettes, files missing the last line of image
  5597.                            data, and files with illegal (and incorrect)
  5598.                            combinations of bits per pixel and planes).
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.                                                     Image Alchemy          85
  5607.  
  5608.  
  5609.  
  5610.  
  5611.                            24 bit PCX files are very new and most other
  5612.                            software cannot read them.  Therefore, unless you
  5613.                            are sure that the software you are using can read
  5614.                            a 24 bit PCX file, you probably want to use the -8
  5615.                            option to force Alchemy to write a paletted file
  5616.                            when generating a PCX file.
  5617.  
  5618.  
  5619.                            DCX files are multiple page PCX images which are
  5620.                            used by various manufacturers of fax boards and
  5621.                            fax software.  Alchemy only reads the first page
  5622.                            of a DCX file.  Alchemy always writes single page
  5623.                            DCX files which are black and white.
  5624.  
  5625.           Comments         Because so many software packages can read and
  5626.                            write PCX files we are especially interested in
  5627.                            supporting as many variations as possible.  If you
  5628.                            have any PCX files which Alchemy does not read
  5629.                            correctly please contact us.
  5630.  
  5631.  
  5632.                            Since DCX files are always 1 bit, black and white
  5633.                            images, Alchemy assumes the use of -b -c2 -8 when
  5634.                            writing the DCX variation of PCX.
  5635.  
  5636.  
  5637.                            ZSoft recently changed some of the information in
  5638.                            the header of PCX files so they now include image
  5639.                            resolution.  Some fax board software makes use of
  5640.                            this information when transmitting PCX or DCX
  5641.                            files as faxes.  See the example section below for
  5642.                            an example of how to specify image resolution when
  5643.                            writing a PCX file.
  5644.  
  5645.                            PCJ files are a variation of 256 colour PCX files
  5646.                            which have the palette in a separate file.  The
  5647.                            palette file has the extension .p13.  Alchemy will
  5648.                            automatically look for the palette file in the
  5649.                            same directory as the PCJ file when reading.
  5650.  
  5651.           Related options  -D   Specify image resolution.
  5652.  
  5653.           Example          Convert the GIF file, lush.gif, to a PCX file:
  5654.  
  5655.                                 alchemy lush.gif -p
  5656.  
  5657.                            Convert the scanned image, page1.tif, to a DCX
  5658.                            file:
  5659.  
  5660.                                 alchemy -p1 page1.tif
  5661.  
  5662.  
  5663.  
  5664.  
  5665.           86          Image Alchemy
  5666.  
  5667.  
  5668.  
  5669.  
  5670.                            Convert the scanned image, page2.tif, to a DCX
  5671.                            file, specifying an image resolution of 200x100 (a
  5672.                            common resolution for fax images):
  5673.  
  5674.                                 alchemy -p1 page2.tif -D 200 100
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.                                                     Image Alchemy          87
  5725.  
  5726.  
  5727.  
  5728.  
  5729.           PDS                                                      --p
  5730.  
  5731.  
  5732.                            PDS labeled images are used by NASA for planetary
  5733.                            images.
  5734.  
  5735.           Syntax           --p
  5736.  
  5737.           Extensions       .ibg
  5738.                            .imq
  5739.  
  5740.           Creator          NASA
  5741.  
  5742.           Used by          NASA distributes collections of planetary images
  5743.                            on CD-ROM in PDS format.
  5744.  
  5745.           Variations       Reads 1 and 8 bit uncompressed and 8 bit first
  5746.                            difference Huffman compressed files.
  5747.  
  5748.  
  5749.                            Writes 8 bit gray-scale uncompressed PDS files.
  5750.  
  5751.           Limitations      PDS images must begin with either an "SFDU_LABEL"
  5752.                            or a "FILE_TYPE" record for Alchemy to be able to
  5753.                            identify it.
  5754.  
  5755.  
  5756.                            Occasionally a PDS labeled image has a palette.
  5757.                            There doesn't seem to be any standard format for
  5758.                            the palette; Image Alchemy handles the palettes
  5759.                            we've encountered.
  5760.  
  5761.  
  5762.                            Any portions of the PDS labels not required to
  5763.                            extract the image, such as longitude and latitude,
  5764.                            are ignored.
  5765.  
  5766.           Comments         Since Image Alchemy only writes gray-scale PDS
  5767.                            images, Alchemy assumes the use of the -b option
  5768.                            when writing PDS files.
  5769.  
  5770.  
  5771.                            Some PDS images actually consist of two files, a
  5772.                            label file and a data file.  To read that type
  5773.                            image you should use the name of the label file
  5774.                            and Alchemy will find the data file.
  5775.  
  5776.           Examples         Convert the GOES file, phoenix.goe, into a PDS
  5777.                            labeled image:
  5778.  
  5779.                                 alchemy --p phoenix.goe
  5780.  
  5781.  
  5782.  
  5783.           88          Image Alchemy
  5784.  
  5785.  
  5786.  
  5787.  
  5788.           Portable BitMap (PBM)                                     -k
  5789.  
  5790.  
  5791.                            The Portable BitMap format was developed by Jef
  5792.                            Poskanzer to allow the transferring of black and
  5793.                            white image files between different workstations.
  5794.                            The PBM format has grown to include black and
  5795.                            white, gray-scale, and true colour images, a large
  5796.                            set of programs to convert various other image
  5797.                            formats to and from PBM, and a set of image
  5798.                            manipulation tools.  The PBM tools are available
  5799.                            free of charge (unfortunately, due to their memory
  5800.                            requirements, many are not useable on MS-DOS
  5801.                            machines).
  5802.  
  5803.           Syntax           -k
  5804.  
  5805.           Extensions       .pnm Portable aNyMap (Any of those below)
  5806.                            .pbm Portable BitMap (Black and white)
  5807.                            .pgm Portable GrayMap (Gray-scale)
  5808.                            .ppm Portable PixelMap (True colour)
  5809.  
  5810.           Creator          Jef Poskanzer
  5811.  
  5812.           Used by          Portable BitMap Package
  5813.                            Various workstation graphic programs
  5814.  
  5815.           Variations       Reads and writes 1, 8, and 24 bit RAWBITS (binary)
  5816.                            images.
  5817.  
  5818.                            To write out a PBM file use -b -c2.
  5819.                            To write out a PGM file use -b -c256.
  5820.                            To write out a PPM file use -24.
  5821.  
  5822.           Limitations      When writing a PBM file Alchemy always uses the
  5823.                            .pnm extension (the extension should be changed
  5824.                            based on the type of file being written).
  5825.  
  5826.           Comments         The PBM package is a set of image manipulation
  5827.                            tools which run on various workstations.  The
  5828.                            software is available for free via anonymous ftp
  5829.                            from expo.lcs.mit.edu as contrib/pbmplus.tar.Z,
  5830.                            ftp.ee.lbl.gov as pbmplus.tar.Z, or via floppy
  5831.                            disk from us.
  5832.  
  5833.           Examples         Convert the file sun.im32 to a PBM file:
  5834.  
  5835.                                 alchemy sun.im32 -k -b -c2
  5836.  
  5837.                            Convert the file sun.im32 to a PGM file,
  5838.                            overwriting any existing sun.pnm file:
  5839.  
  5840.  
  5841.  
  5842.                                                     Image Alchemy          89
  5843.  
  5844.  
  5845.  
  5846.  
  5847.                                 alchemy sun.im32 -k -b -c256 -o
  5848.  
  5849.                            Convert the file sun.im32 to a PPM file called
  5850.                            image77:
  5851.  
  5852.                                 alchemy sun.im32 -k -24 image77 -.
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.  
  5898.  
  5899.  
  5900.  
  5901.           90          Image Alchemy
  5902.  
  5903.  
  5904.  
  5905.  
  5906.           Puzzle                                                   --U
  5907.  
  5908.  
  5909.                            The Puzzle format is used by the UNIX supplied
  5910.                            Puzzle program
  5911.  
  5912.           Syntax           --U
  5913.  
  5914.           Extensions       .pzl.puzzle
  5915.                            .cm
  5916.  
  5917.           Creator          Unknown
  5918.  
  5919.           Used by          The puzzle program.
  5920.  
  5921.           Variations       8 bits per pixel
  5922.  
  5923.           Example          Convert the file einstein.im8 to a Q0 file:
  5924.  
  5925.                                 alchemy einstein.im8 --q
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.  
  5959.  
  5960.                                                     Image Alchemy          91
  5961.  
  5962.  
  5963.  
  5964.  
  5965.           Q0                                                       --q
  5966.  
  5967.  
  5968.                            The Q0 format is apparently commonly used by
  5969.                            various Japanese scanning, painting, and viewing
  5970.                            software to store 24 bit images.  Handmade
  5971.                            Software has no information other than a basic
  5972.                            description of the format and some sample images;
  5973.                            if you have further information on the Q0 format
  5974.                            please contact us.
  5975.  
  5976.           Syntax           --q
  5977.  
  5978.           Extensions       .q0  For pixel data
  5979.                            .rgb For pixel data
  5980.                            .fal For image header information
  5981.  
  5982.           Creator          Unknown
  5983.  
  5984.           Used by          Various Japanese image processing software.
  5985.  
  5986.           Variations       24 bits per pixel
  5987.  
  5988.           Comments         Q0 files are actually two files, one with the
  5989.                            extension .rgb or .q0 and the other with the
  5990.                            extension .fal.  The .rgb or .q0 file contains the
  5991.                            actual image data and the .fal file contains the
  5992.                            header information (primarily the height and width
  5993.                            of the image).  You specify the name of the .rgb
  5994.                            or .q0 file and Alchemy automatically generates
  5995.                            the name of the .fal file.
  5996.  
  5997.                            When writing a Q0 file Alchemy will overwrite,
  5998.                            without warning, existing .fal files.
  5999.  
  6000.           Example          Convert the file dogcow.gif to a Q0 file:
  6001.  
  6002.                                 alchemy dogcow.gif --q
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.           92          Image Alchemy
  6020.  
  6021.  
  6022.  
  6023.  
  6024.           QDV                                                      --D
  6025.  
  6026.  
  6027.                            The QDV format is used by Giffer, a Macintosh
  6028.                            program which displays and converts image files.
  6029.  
  6030.           Syntax           --D
  6031.  
  6032.           Extension        .qdv
  6033.  
  6034.           Creator          Steve Blackstock
  6035.  
  6036.           Used by          Giffer
  6037.  
  6038.           Variations       QDV files are always 8 bits per pixel.
  6039.  
  6040.           Comments         Giffer is a great shareware (Beerwaretm, actually)
  6041.                            program for the Macintosh that converts between
  6042.                            various image file formats and allows viewing of
  6043.                            graphics files.
  6044.  
  6045.                            Since QDV files are always paletted, Alchemy
  6046.                            assumes the use of the -8 option when writing QDV
  6047.                            files.
  6048.  
  6049.           Example          Convert the file input.tga to a qdv file:
  6050.  
  6051.                                 alchemy input.tga --D
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.                                                     Image Alchemy          93
  6079.  
  6080.  
  6081.  
  6082.  
  6083.           QRT                                                      --T
  6084.  
  6085.  
  6086.                            QRT files are generated by the QRT Ray Tracer, a
  6087.                            public domain ray-tracer for Amiga, Macintosh, and
  6088.                            IBM PC computers.
  6089.  
  6090.           Syntax           --T
  6091.  
  6092.           Extension        .raw
  6093.  
  6094.           Creator          Steve Korn
  6095.  
  6096.           Used by          QRT Ray Tracer
  6097.  
  6098.           Variations       24 bits per pixel
  6099.  
  6100.           Comments         Since QRT files are always true colour, Alchemy
  6101.                            assumes use of the -24 option.
  6102.  
  6103.           Example          Convert the file spheres.gif to a QRT file called
  6104.                            spheres.raw:
  6105.  
  6106.                                 alchemy --T spheres.gif
  6107.  
  6108.  
  6109.  
  6110.  
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.           94          Image Alchemy
  6138.  
  6139.  
  6140.  
  6141.  
  6142.           RIX                                                       -R
  6143.  
  6144.  
  6145.                            RIX files are colour files developed by ColoRIX to
  6146.                            use with their paint software.
  6147.  
  6148.           Syntax           -R
  6149.  
  6150.           Extension        .scx
  6151.                            .rix
  6152.  
  6153.           Creator          RIX Softworks, Inc.
  6154.  
  6155.           Used by          ColoRIX software
  6156.  
  6157.           Variations       Reads and writes Type 0 (8 bits per pixel) and
  6158.                            Type 4 (4 bits per pixel) images.
  6159.  
  6160.           Limitations      We would like to add support for Type 1 and Type 2
  6161.                            images but we haven't been able to find any; if
  6162.                            you have some please contact us.
  6163.  
  6164.           Comments         A type 0 file will be written if there are more
  6165.                            than 16 colours in the image; otherwise a type 4
  6166.                            file will be written.
  6167.  
  6168.           Examples         Convert the file test.gif to a RIX file:
  6169.  
  6170.                                 alchemy test.gif -R
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.                                                     Image Alchemy          95
  6197.  
  6198.  
  6199.  
  6200.  
  6201.           Scodl                                                    --s
  6202.  
  6203.  
  6204.                            Scodl files are used by Agfa/Matrix slide
  6205.                            recorders.
  6206.  
  6207.           Syntax           --s
  6208.  
  6209.           Extension        .scd type
  6210.  
  6211.           Parameter        type:
  6212.                                 0:  Non-scalable image (pre MVP version 4.2)
  6213.                                 1:  Scalable image (MVP version 4.2 or later)
  6214.                            The default is 0 (Non-scalable).
  6215.  
  6216.           Creator          Agfa Corporation / Matrix Instruments Inc.
  6217.  
  6218.           Used by          Agfa/Matrix slide recorders
  6219.  
  6220.           Variations       Writes 8 and 24 bit run-length coded (RLC) images.
  6221.  
  6222.           Limitations      Output only.
  6223.  
  6224.           Comments         Agfa/Matrix made significant changes to the Scodl
  6225.                            file format when they introduced version 4.2 of
  6226.                            the MVP and Conductor software in 1992.  Old
  6227.                            version Scodl files could not be scaled by the MVP
  6228.                            software; new version Scodl files can be scaled
  6229.                            but only work the newer version of the MVP and
  6230.                            Conductor software.
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.           96          Image Alchemy
  6256.  
  6257.  
  6258.  
  6259.  
  6260.                            Scalable Scodl images have the advantages that
  6261.                            they do not have to be scaled to a specific output
  6262.                            resolution and are therefore generally smaller
  6263.                            than pre-scaled Scodl images.  They will can also
  6264.                            be imaged on a film recorder with any output
  6265.                            resolution or previewed on a monitor.
  6266.  
  6267.                            The disadvantage of scalable Scodl images is that
  6268.                            you must be using at least Scodl MVP version 4.2
  6269.                            and the Scodl MVP software does not perform very
  6270.                            high-quality scaling.  In particular, the MVP
  6271.                            software only does pixel replication scaling when
  6272.                            increasing the size of an image (this corresponds
  6273.                            to type 'a' scaling in Alchemy) and pixel
  6274.                            averaging when reducing the size of an image
  6275.                            (corresponding to Alchemy 'b' scaling).
  6276.  
  6277.                            Note that Alchemy pays attention to the aspect
  6278.                            ratio or dots per inch information specified as
  6279.                            part to command line or present in the original
  6280.                            image when converting to a Scodl scalable image.
  6281.                            Therefore you should insure that this information
  6282.                            is correct when writing a Scodl scalable image.
  6283.  
  6284.                            When writing Pre 4.2 Scodl files the image should
  6285.                            be scaled up to either 2000x1366 or 4000x2732 to
  6286.                            fill the slide.
  6287.  
  6288.                            There are some limitations with the current
  6289.                            version of the MVP software driver supplied by
  6290.                            Agfa/Matrix:
  6291.  
  6292.                            24 bit Scodl files are not correctly interpreted
  6293.                            by the MVP driver version 4.1 and earlier.  8 bit
  6294.                            images are correctly interpreted.
  6295.  
  6296.                            When sending very large images to the background
  6297.                            MVP driver you must be using version 4.0 or later
  6298.                            and have lots of EMS memory (4 Megabytes is
  6299.                            recommended).  When using the foreground MVP
  6300.                            program turning on disk caching is necessary.
  6301.  
  6302.  
  6303.           Example          Convert the file picture.im32 to a Scodl file
  6304.                            using high quality scaling and preserving the
  6305.                            aspect ratio:
  6306.  
  6307.                                 alchemy --s -Xc2000 -Yc1366 -+ picture.im32
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.                                                     Image Alchemy          97
  6315.  
  6316.  
  6317.  
  6318.  
  6319.           Silicon Graphics Image (SGI)                              -n
  6320.  
  6321.  
  6322.                            Silicon Graphics Image files are used by Silicon
  6323.                            Graphics workstations.
  6324.  
  6325.           Syntax           -n compressionType
  6326.  
  6327.           Parameter        compressionType:
  6328.                                 0:Verbatim (uncompressed)
  6329.                                 1:RLE compressed
  6330.                            The default is 0 (Verbatim).
  6331.  
  6332.           Extension        .sgi
  6333.  
  6334.           Creator          Silicon Graphics, Inc.
  6335.  
  6336.           Used by          Silicon Graphics workstations.
  6337.  
  6338.           Variations       Reads and writes 1, 8 (gray-scale), and 24 bit
  6339.                            verbatim (uncompressed) and RLE files.
  6340.  
  6341.           Comments         Only gray-scale images may be 8 bit files.
  6342.                            Alchemy will automatically switch to 24 bit mode
  6343.                            when writing a colour image.
  6344.  
  6345.           Example          Convert the Sun raster file sun.im8 to a SGI file
  6346.                            called sgiout:
  6347.  
  6348.                                 alchemy -n sun.im8 sgiout -.
  6349.  
  6350.                            Do the same thing, but write out a RLE compressed
  6351.                            SGI file:
  6352.  
  6353.                                 alchemy -n1 sun.im8 sgiout -.
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.           98          Image Alchemy
  6374.  
  6375.  
  6376.  
  6377.  
  6378.           SPOT Image                                               --S
  6379.  
  6380.  
  6381.                            SPOT Image files are high-resolution satellite
  6382.                            images produced by SPOT Image Corporation.
  6383.  
  6384.           Syntax           --S
  6385.  
  6386.           Extensions       For GIS (tape) format:
  6387.                                 .hdr (For image header information)
  6388.                                 .bil (For pixel data)
  6389.                                 .clr (For palette data [optional])
  6390.  
  6391.                            For CCT (CD-ROM) format:
  6392.                                 .dat
  6393.  
  6394.           Creator          SPOT Image Corp.
  6395.  
  6396.           Used by          SPOT Image Corp.
  6397.  
  6398.           Variations       8 bits per pixel for GIS (tape) format files
  6399.  
  6400.                            8 and 24 bits per pixel for CCT (CD-ROM) format
  6401.                            files
  6402.  
  6403.           Limitations      Only GIS (tape) format images are written.
  6404.  
  6405.           Comments         SPOT Image GIS (tape) images are actually three
  6406.                            files.  You specify the name of the .hdr file and
  6407.                            Alchemy automatically generates the name of the
  6408.                            .bil and .clr files.
  6409.  
  6410.  
  6411.                            If no palette file (.clr file) exists Alchemy will
  6412.                            assume the image is grayscale.
  6413.  
  6414.  
  6415.                            There may also be a statistics file with a .stx
  6416.                            extension, but Alchemy ignores this file.
  6417.  
  6418.  
  6419.                            When writing a SPOT file Alchemy will overwrite,
  6420.                            without warning, existing .bil and .clr files.
  6421.  
  6422.  
  6423.                            When reading a CCT (CD-ROM) format image specify
  6424.                            the complete path and name of the image file.  For
  6425.                            example:  alchemy l:\scene04\imag_04.dat -g will
  6426.                            convert the scene 4 image to a .gif file.
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.                                                     Image Alchemy          99
  6433.  
  6434.  
  6435.  
  6436.  
  6437.           Examples         Convert the Erdas file, phoenix.lan, to a SPOT
  6438.                            Image file:
  6439.  
  6440.                                 alchemy --S phoenix.lan
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.           100          Image Alchemy
  6492.  
  6493.  
  6494.  
  6495.  
  6496.           Stork                                                     -K
  6497.  
  6498.  
  6499.                            Stork files are CMYK images used by Stork's colour
  6500.                            proofing machines.
  6501.  
  6502.           Syntax           -K compressionType
  6503.  
  6504.           Parameter        compressionType:
  6505.                                 0:None
  6506.                                 1:Run length coded
  6507.                            The default is none.
  6508.  
  6509.           Extensions       .idx Index file
  6510.                            .pre Image data
  6511.                            .tab Colour lookup table
  6512.  
  6513.           Creator          Stork Colorproofing B.V.
  6514.  
  6515.           Used by          Stork Colorproofing machines
  6516.  
  6517.           Variations       Reads and writes 32 KCMY, 32 KCMY RLC, 16 CLU, and
  6518.                            16 CLU RLC images (type 100, 101, 300, and 301,
  6519.                            respectively).
  6520.  
  6521.           Limitations      Alchemy can't write paletted files with more than
  6522.                            256 colours.
  6523.  
  6524.                            When reading paletted files with more than 256
  6525.                            colours they are treated as true colour.
  6526.  
  6527.           Comments         Stork images are stored in two or three files
  6528.                            (depending on whether or not there's a colour
  6529.                            lookup table associated with the image).  The
  6530.                            filename given to Alchemy should be the name of
  6531.                            the data file (normally with a suffix of .pre);
  6532.                            Alchemy will generate the names of the other files
  6533.                            by stripping the extension and appending .idx for
  6534.                            the index file and .tab for the colour lookup
  6535.                            table (if any).  Alchemy will overwrite existing
  6536.                            .idx and .tab files without warning when creating
  6537.                            Stork files.
  6538.  
  6539.           Related options  -C   Undercolour Removal File
  6540.  
  6541.           Example          Convert the file image.tga to an uncompressed
  6542.                            Stork image called image.pre and image.idx, using
  6543.                            the undercolour removal file sample.ucr:
  6544.  
  6545.                                 alchemy -K -Csample.ucr image.tga
  6546.  
  6547.  
  6548.  
  6549.  
  6550.                                                    Image Alchemy          101
  6551.  
  6552.  
  6553.  
  6554.  
  6555.           Sun Icon                                                 --N
  6556.  
  6557.  
  6558.                            Sun Icon files are used by Sun Microsystems
  6559.                            workstations.
  6560.  
  6561.           Syntax           --N
  6562.  
  6563.           Extensions       .icon
  6564.                            .ico
  6565.  
  6566.           Creator          Sun Microsystems, Inc.
  6567.  
  6568.           Used by          Sun workstations
  6569.  
  6570.           Variations       1 bit, black and white.
  6571.  
  6572.  
  6573.           Example          Convert the sun raster file icon.im1 to a sun icon
  6574.                            file called program.ico:
  6575.  
  6576.                                 alchemy -s icon.im1 program.ico
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.           102          Image Alchemy
  6610.  
  6611.  
  6612.  
  6613.  
  6614.           Sun Raster                                                -s
  6615.  
  6616.  
  6617.                            Sun Raster files are used by Sun Microsystems
  6618.                            workstations.
  6619.  
  6620.           Syntax           -s compressionType
  6621.  
  6622.           Parameter        compressionType:
  6623.                                 0:None
  6624.                                 1:Run length compression
  6625.                            The default is None.
  6626.  
  6627.           Extensions       .rast
  6628.                            .ras
  6629.                            .im
  6630.                            .im1
  6631.                            .im8
  6632.                            .im24
  6633.                            .im32
  6634.  
  6635.           Creator          Sun Microsystems, Inc.
  6636.  
  6637.           Used by          Sun workstations
  6638.  
  6639.           Variations       Reads 1, 8, 24, and 32 bit Standard, BGR, RGB, and
  6640.                            Byte Encoded (RLE) files.
  6641.  
  6642.                            Writes 1, 8, 24, and 32 bit Standard files, and 1
  6643.                            and 8 bit Byte Encoded (RLE) files.
  6644.  
  6645.           Limitations      For a short time a version of the PBM toolkit
  6646.                            wrote Sun Raster files which had the wrong RGB
  6647.                            order.  Unfortunately there seem to be many images
  6648.                            which were generated with this incorrect RGB
  6649.                            order.  Please be aware that Alchemy's Sun Raster
  6650.                            reading and writing capability has been
  6651.                            extensively tested and compared to various other
  6652.                            tools; the RGB order we use is correct.
  6653.  
  6654.           Comments         Sun Raster files are normally not compressed and
  6655.                            so take up lots of disk space.
  6656.  
  6657.  
  6658.                            There is no standard extension for Sun Raster
  6659.                            files; the extensions that Alchemy uses seem to be
  6660.                            the most common.
  6661.  
  6662.           Example          Convert the SGI file sgiout to a sun raster file
  6663.                            called sun.im8:
  6664.  
  6665.                                 alchemy -s sgiout sun.im8
  6666.  
  6667.  
  6668.                                                    Image Alchemy          103
  6669.  
  6670.  
  6671.  
  6672.  
  6673.                            Do the same thing, but write out a compressed sun
  6674.                            raster file:
  6675.  
  6676.                                 alchemy -s1 sgiout sun.im8
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682.  
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.           104          Image Alchemy
  6728.  
  6729.  
  6730.  
  6731.  
  6732.           Tagged Interchange File Format (TIFF)                     -t
  6733.  
  6734.  
  6735.                            TIFF is designed to be a universal raster image
  6736.                            format.  It's very popular with desktop publishing
  6737.                            packages.
  6738.  
  6739.           Syntax           -t compressionType
  6740.  
  6741.           Parameter        compressionType:
  6742.                                 0:None
  6743.                                 1:LZW
  6744.                                 2:PackBits
  6745.                                 3:Group III Fax
  6746.                                 4:Group IV Fax
  6747.                                 5:CCITT RLE
  6748.                            The default is LZW Compression.
  6749.  
  6750.           Extensions       .tiff
  6751.                            .tif
  6752.  
  6753.           Creator          Aldus Corp.
  6754.                            Microsoft Corp.
  6755.  
  6756.           Used by          Various desktop publishing and scanning software.
  6757.  
  6758.           Variations       Reads TIFF class B, G, R, and most class P files.
  6759.  
  6760.                            Reads 1, 4, 8, 12, 24, and 32 bit images (ignoring
  6761.                            the alpha channel for 32 bit images).
  6762.  
  6763.                            Input compression types supported are raw, LZW,
  6764.                            PackBits, Group III fax, Group IV fax, CCITT RLE
  6765.                            (byte and word aligned), NeXT, Thunderscan, PICIO,
  6766.                            and SGI RLE.
  6767.  
  6768.  
  6769.                            Writes class B, G, P, and R files, depending on
  6770.                            the input file and options specified.
  6771.  
  6772.                            Writes 1, 4, 8, and 24 bit images.
  6773.  
  6774.           Limitations      Class P TIFF files can only be read if they have
  6775.                            1, 4, or 8 bits per pixel.
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.                                                    Image Alchemy          105
  6787.  
  6788.  
  6789.  
  6790.  
  6791.           Comments         1,4, and 8 bit output files are paletted unless
  6792.                            the palette is all gray, in which case the output
  6793.                            is a gray-scale file.
  6794.  
  6795.                            If you have TIFF files with 3, 5, 6, or 7 bits per
  6796.                            pixel please contact us.
  6797.  
  6798.                            When writing TIFF files using any of the fax
  6799.                            compression types (Group III, Group IV and CCITT
  6800.                            RLE), Alchemy uses a photometric interpretation of
  6801.                            minIsWhite.
  6802.  
  6803.           Example          Convert the file input.gif to an uncompressed
  6804.                            gray-scale TIFF file called output.tif:
  6805.  
  6806.                                 alchemy -t0 -b input.gif output.tif
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.  
  6845.           106          Image Alchemy
  6846.  
  6847.  
  6848.  
  6849.  
  6850.           Targa                                                     -a
  6851.  
  6852.  
  6853.                            Targa files were created to support the line of
  6854.                            Targa graphics cards.  The Targa format is popular
  6855.                            with scanners and high end paint packages.
  6856.  
  6857.           Syntax           -a outputType
  6858.  
  6859.           Parameter        outputType:
  6860.                                 0:uncompressed
  6861.                                 1:Run Length Coded
  6862.                                 10:uncompressed, no footer
  6863.                                 11:Run Length Coded, no footer
  6864.                            The default is 0 (uncompressed).
  6865.  
  6866.           Extension        .tga
  6867.  
  6868.           Creator          Truevision, Inc.
  6869.  
  6870.           Used by          Various scanning and paint software.
  6871.  
  6872.           Variations       Reads 8, 15, 16, 24, and 32 bit images, ignoring
  6873.                            the alpha channel for 32 bit images.
  6874.  
  6875.                            Writes 8, 15, 16, 24, and 32 bit images, writing
  6876.                            an empty alpha channel for 32 bit images.
  6877.  
  6878.           Comments         15 and 16 bit output are actually the same except
  6879.                            for one field in the header.
  6880.  
  6881.                            Targa files allow a footer containing additional
  6882.                            information such as aspect ratio.  However some
  6883.                            software is unable to read Targa files which have
  6884.                            a footer, so Alchemy allows all valid combinations
  6885.                            to be written.  The most common variant for
  6886.                            software to be able to read is 24 bit uncompressed
  6887.                            (specify -a0 and -24).
  6888.  
  6889.           Example          Convert the file input.tif to an uncompressed 24
  6890.                            bit Targa file:
  6891.  
  6892.                                 alchemy input.tif -a -24
  6893.  
  6894.                            Convert the file input.tif to an uncompressed 15
  6895.                            bit Targa file called output.tga with no footer:
  6896.  
  6897.                                 alchemy -a10 -15 input.tif output.tga
  6898.  
  6899.  
  6900.  
  6901.  
  6902.  
  6903.  
  6904.                                                    Image Alchemy          107
  6905.  
  6906.  
  6907.  
  6908.  
  6909.           Utah Raster Toolkit (RLE)                                --u
  6910.  
  6911.  
  6912.                            The Utah Raster Toolkit is a set of public domain
  6913.                            utilities for manipulating and converting images
  6914.                            for various workstations.  The source code is
  6915.                            freely available (see below).
  6916.  
  6917.           Syntax           --u
  6918.  
  6919.           Extension        .rle
  6920.  
  6921.           Creator          The University of Utah
  6922.                            The University of Michigan
  6923.  
  6924.           Used by          Utah RLE toolkit
  6925.  
  6926.           Variations       Reads and writes 1 and 3 channel 8 bits per pixel
  6927.                            files; the Alpha Channel is ignored during
  6928.                            reading.
  6929.  
  6930.           Limitations      While reading, files which are 1 channel and have
  6931.                            either no colour map or a single channel colour
  6932.                            map are assumed to be gray-scale images.  The
  6933.                            colour map, if present, will be used as a gamma
  6934.                            correction table.
  6935.  
  6936.                            Files which are 1 channel and have a 3 channel
  6937.                            colour map are assumed to be paletted colour
  6938.                            files.
  6939.  
  6940.                            Files which are 3 channel are assumed to be true
  6941.                            colour.
  6942.  
  6943.                            When writing RLE files Alchemy will generate a 1
  6944.                            channel file with a 3 channel colour map for
  6945.                            paletted images and a 3 channel file with no
  6946.                            colour map for true colour images.
  6947.  
  6948.           Comments         The Utah Raster Toolkit is available free of
  6949.                            charge as pub/urt-3.0.tar.Z via anonymous ftp from
  6950.                            cs.utah.edu, weedeater.math.yale.edu, or
  6951.                            freebie.engin.umich.edu or via floppy disk from
  6952.                            us.
  6953.  
  6954.           Example          Convert the PBM file, image.ppm, to a Utah RLE
  6955.                            file:
  6956.  
  6957.                                 alchemy image.ppm --U
  6958.  
  6959.  
  6960.  
  6961.  
  6962.  
  6963.           108          Image Alchemy
  6964.  
  6965.  
  6966.  
  6967.  
  6968.           Vivid                                                    --I
  6969.  
  6970.  
  6971.                            Vivid is a shareware ray-tracer for MS-DOS
  6972.                            computers.
  6973.  
  6974.           Syntax           --I (upper case i)
  6975.  
  6976.           Extension        .img
  6977.  
  6978.           Creator          Steven B. Coy
  6979.  
  6980.           Used by          Vivid Ray Tracer
  6981.  
  6982.           Variations       Reads and writes 24 bit RLE files.
  6983.  
  6984.           Comments         The Vivid Ray Tracer is a shareware program for
  6985.                            PCs and is available from
  6986.                                 Stephen Coy
  6987.                                 15205 NE 13th Pl., #2904
  6988.                                 Bellevue, WA  98007
  6989.  
  6990.           Example          Convert the file spheres.qrt to a Vivid file:
  6991.  
  6992.                                 alchemy spheres.qrt --I
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.  
  7021.  
  7022.                                                    Image Alchemy          109
  7023.  
  7024.  
  7025.  
  7026.  
  7027.           Windows Bitmap (BMP)                                      -w
  7028.  
  7029.  
  7030.                            Windows BMP files are used by Microsoft Windows.
  7031.  
  7032.           Syntax           -w compressionType
  7033.  
  7034.           Parameter        compressionType:
  7035.                                 0:None
  7036.                                 1:RLE
  7037.                                 10:Write an ICOn file
  7038.                            The default is none.
  7039.  
  7040.           Extension        .bmp
  7041.  
  7042.           Creator          Microsoft Corp.
  7043.  
  7044.           Used by          Microsoft Windows
  7045.  
  7046.           Variations       Reads 1, 4, 8, and 24 bit RGB (raw), RLE4, and
  7047.                            RLE8 files.
  7048.  
  7049.                            Writes 1, 4, 8, and 24 bit RGB (raw), RLE4, and
  7050.                            RLE8 files.
  7051.  
  7052.           Limitations      Several of the programs which claim to read and
  7053.                            write RLE files do not do so correctly; we do not
  7054.                            recommend writing RLE files unless you have
  7055.                            verified that they work with your intended
  7056.                            application.
  7057.  
  7058.           Comments         Microsoft supplied Windows utilities cannot read
  7059.                            nor write RLE4 or RLE8 files.
  7060.  
  7061.  
  7062.                            If you are converting an image to use as wallpaper
  7063.                            on a 16 colour display you will want to match the
  7064.                            palette of the output image to one of the existing
  7065.                            16 colour BMP images supplied with Windows
  7066.                            (chess.bmp, for example).  If you do not do this
  7067.                            the wallpaper will not be loaded correctly.  See
  7068.                            the example section below.
  7069.  
  7070.  
  7071.                            If you are converting an image to use as wallpaper
  7072.                            on a 256 colour Windows 3.1 display you will want
  7073.                            to reserve the first 8 colours.  Use the -c 256 8
  7074.                            option to do this (see below for an example).
  7075.                            This will force the first 8 colours of the palette
  7076.                            to be the standard Windows colours.
  7077.  
  7078.  
  7079.  
  7080.  
  7081.           110          Image Alchemy
  7082.  
  7083.  
  7084.  
  7085.  
  7086.                            If you are writing a Windows icon (.ico) file you
  7087.                            must scale the image to a width and a height of
  7088.                            16, 32, or 64 pixels (32 being the best choice,
  7089.                            since Windows displays all icons as 32x32).  Also,
  7090.                            Windows seems to remap all icons to the standard
  7091.                            16 colours, so the best results can be obtained if
  7092.                            you match the palette of your icons to an existing
  7093.                            icon (see the -f option).  If you don't have any
  7094.                            other icons you can also match to one of the 16
  7095.                            colour wallpaper files supplied with Windows.
  7096.  
  7097.  
  7098.                            Alchemy can write a BMP file which contains an
  7099.                            identity palette as specified in the Microsoft
  7100.                            Multimedia Development Kit.  These images provide
  7101.                            for quicker bitmap loading when used with the
  7102.                            Multimedia Extensions.  A palette identity file
  7103.                            has the first and last 10 palette entries reserved
  7104.                            for 20 system defined colours.  Alchemy will write
  7105.                            such an image if you specify -c 246 10 as part of
  7106.                            the command line.  Note that ordinarily this would
  7107.                            produce a file which has 246 palette entries, but
  7108.                            in this special case the file will have 256
  7109.                            palette entries (20 fixed by the Windows
  7110.                            specifications and 236 chosen by Alchemy).  Note
  7111.                            that you can also specify a number smaller than
  7112.                            246, but the palette will always have 256 colours
  7113.                            (since the last 10 have to occupy positions 246
  7114.                            through 255).
  7115.  
  7116.           Related options  -c   Specify number of colours
  7117.                            -f   Match to existing palette
  7118.  
  7119.           Examples         Convert the image test.gif to a Windows BMP file:
  7120.  
  7121.                                 alchemy test.gif -w
  7122.  
  7123.                            Convert the image test.gif to a 16 colour Windows
  7124.                            BMP file to be used as wallpaper (the file
  7125.                            chess.bmp is supplied with Windows 3.0 (substitute
  7126.                            leaves.bmp when using Windows 3.1); this example
  7127.                            assumes that it is in the current directory):
  7128.  
  7129.                                 alchemy test.gif -f chess.bmp -w
  7130.  
  7131.                            Convert the image test.gif to a 256 colour Windows
  7132.                            BMP file to be used as wallpaper with Windows 3.1:
  7133.  
  7134.                                 alchemy test.gif -c256 8 -w
  7135.  
  7136.                            Convert the image test.gif to an icon file for use
  7137.                            with Windows 3.1:
  7138.  
  7139.  
  7140.                                                    Image Alchemy          111
  7141.  
  7142.  
  7143.  
  7144.  
  7145.                                 alchemy test.gif -Xb32 -Yb32 -w 10
  7146.                                    -f leaves.bmp
  7147.  
  7148.                            Convert the image test.gif to an identity palette
  7149.                            BMP file:
  7150.  
  7151.                                 alchemy test.gif -w -c 246 10
  7152.  
  7153.  
  7154.  
  7155.  
  7156.  
  7157.  
  7158.  
  7159.  
  7160.  
  7161.  
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199.           112          Image Alchemy
  7200.  
  7201.  
  7202.  
  7203.  
  7204.           WordPerfect Graphic File                                  -W
  7205.  
  7206.  
  7207.                            WordPerfect files are images which can be imported
  7208.                            into WordPerfect and various other word processors
  7209.                            and desktop publishing programs.
  7210.  
  7211.           Syntax           -W
  7212.  
  7213.           Extension        .wpg
  7214.  
  7215.           Creator          WordPerfect Corp.
  7216.  
  7217.           Used by          WordPerfect
  7218.  
  7219.           Variations       1 through 8 bits per pixel are supported.
  7220.  
  7221.           Comments         In addition to raster images WordPerfect files may
  7222.                            contain vectors and text information.  Such
  7223.                            information is lost when reading WordPerfect
  7224.                            files.
  7225.  
  7226.           Example          Convert the image, newpict.pcx, to a black and
  7227.                            white WPG file:
  7228.  
  7229.                                 alchemy newpict.pcx -b -c2 -W
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.                                                    Image Alchemy          113
  7259.  
  7260.  
  7261.  
  7262.  
  7263.           XBM                                                      --b
  7264.  
  7265.  
  7266.                            XBM files are used by the X Windowing System.  XBM
  7267.                            files are C source code files which can be read
  7268.                            and written by various X utilities and are
  7269.                            designed to be included in C source code for use
  7270.                            as icons and other bit-mapped graphic images.
  7271.  
  7272.           Syntax           --b
  7273.  
  7274.           Extensions       .xbm
  7275.                            .bm
  7276.  
  7277.           Creator          MIT
  7278.  
  7279.           Used by          The X Windowing system
  7280.  
  7281.           Variations       1 bit per pixel
  7282.  
  7283.           Limitations      Because .xbm files are actually C source code
  7284.                            files there can be many variations of .xbm files.
  7285.                            Since adding a C preprocessor to Alchemy to handle
  7286.                            all the theoretically allowable .xbm files is
  7287.                            impractical we have instead designed Alchemy to
  7288.                            interchange .xbm files with the PBM utilities and
  7289.                            the X supplied utilities, and to read the sample
  7290.                            .xbm files from Sun Microsystems.  If you run
  7291.                            across any .xbm files which Alchemy cannot read
  7292.                            please contact us.
  7293.  
  7294.                            The hotspot field is ignored when reading .xbm
  7295.                            files.
  7296.  
  7297.           Comments         Most of the X supplied utilities (bitmap, for
  7298.                            example) are designed to edit small .xbm images.
  7299.  
  7300.  
  7301.  
  7302.           Example          Convert the file picture.im32 to an XBM file using
  7303.                            high quality scaling and preserving the aspect
  7304.                            ratio:
  7305.  
  7306.                                 alchemy --b -Xb64 -+ picture.im32
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.           114          Image Alchemy
  7318.  
  7319.  
  7320.  
  7321.  
  7322.           XPM                                                      --x
  7323.  
  7324.  
  7325.                            XPM files are used by the X Windowing System.  XPM
  7326.                            files are C source code files which can be read
  7327.                            and written by various X utilities and are
  7328.                            designed to be included in C source code for use
  7329.                            as icons and other bit-mapped graphic images.
  7330.  
  7331.           Syntax           --x type
  7332.  
  7333.           Parameter        type:
  7334.                                 0:  XBM similar style
  7335.                                 1:  XPM3 style
  7336.                                 2:  XPM2 style
  7337.                            The default is XBM similar style.
  7338.  
  7339.           Extensions       .xpm
  7340.                            .pm
  7341.  
  7342.           Creator          MIT
  7343.  
  7344.           Used by          The X Windowing system
  7345.  
  7346.           Variations       8 bits per pixel
  7347.  
  7348.           Limitations      Because .xpm files are actually C source code
  7349.                            files there can be many variations of .xpm files.
  7350.                            Since adding a C preprocessor to Alchemy to handle
  7351.                            all the theoretically allowable .xpm files is
  7352.                            impractical we have instead designed Alchemy to
  7353.                            interchange .xpm files with the PBM utilities and
  7354.                            the X supplied utilities, and to read the sample
  7355.                            .xpm files from IBM.  If you run across any .xpm
  7356.                            files which Alchemy cannot read please contact us.
  7357.  
  7358.                            Some XPM files contain colour names instead of
  7359.                            color values for some of the colours.  The
  7360.                            conversion table of these names into values is in
  7361.                            a file supplied with the X Windowing system called
  7362.                            rgb.txt.  When needed Alchemy will look for this
  7363.                            table in the following directories:  the current
  7364.                            directory, /usr/lib/X11, $OPENWINHOME, and
  7365.                            /usr/openwin/lib.  If your system has the rgb.txt
  7366.                            file in a different location you may have to copy
  7367.                            it to the current directory (its location is
  7368.                            system dependent; ask you system administrator if
  7369.                            you need help finding it).
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.                                                    Image Alchemy          115
  7377.  
  7378.  
  7379.  
  7380.  
  7381.           Comments         The different type XPM files can be identified as
  7382.                            follows:
  7383.  
  7384.                            Type 0:
  7385.                                 #define type0_format 1
  7386.                                 _
  7387.                                 static char *type0_colors[] = {
  7388.                                 "a", "#000000",
  7389.                                 _
  7390.  
  7391.                            Type 1:
  7392.                                 /* XPM */
  7393.                                 static char * type1[] = {
  7394.                                 "32 20 12 1",
  7395.                                 "a c #000000",
  7396.                                 _
  7397.  
  7398.                            Type 2:
  7399.                                 ! XPM2
  7400.                                 32 20 12 1
  7401.                                 a c #000000
  7402.                                 _
  7403.  
  7404.                            When writing an XPM file with less than 27 colours
  7405.                            Alchemy writes 1 character XPM files, otherwise
  7406.                            Alchemy writes 2 character XPM files.
  7407.  
  7408.                            XPM files are usually quite small, therefore many
  7409.                            utilities (the PBM toolkit for example) may have
  7410.                            trouble reading large XPM files.
  7411.  
  7412.           Example          Convert the file picture.im32 to an XPM file using
  7413.                            high quality scaling and preserving the aspect
  7414.                            ratio:
  7415.  
  7416.                                 alchemy --x -Xb64 -+ picture.im32
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.  
  7434.  
  7435.           116          Image Alchemy
  7436.  
  7437.  
  7438.  
  7439.  
  7440.           XWD                                                      --w
  7441.  
  7442.  
  7443.                            XWD is the file format used by xwd, the X window
  7444.                            dumping utility.
  7445.  
  7446.           Syntax           --w type
  7447.  
  7448.           Parameter        type:
  7449.                                 0:  Z type
  7450.                                 1:  XY type
  7451.                            The default is Z type.
  7452.  
  7453.           Extension        .xwd
  7454.  
  7455.           Creator          MIT
  7456.  
  7457.           Used by          The X Windowing System
  7458.  
  7459.           Variations       Reads 1, 4, 8, and 24 bits per pixel Z format and
  7460.                            1, 4, and 8 bit XY format XWD files.
  7461.  
  7462.                            Writes 1, 8, and 24 bits per pixel Z format and 1
  7463.                            and 8 bit XY format XWD files.
  7464.  
  7465.           Limitations      XY format files are not supported.
  7466.  
  7467.           Example          Convert the XBM file, icon.xbm, to an XWD file:
  7468.  
  7469.                                 alchemy icon.xbm --w
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.  
  7493.  
  7494.                                                    Image Alchemy          117
  7495.  
  7496.  
  7497.  
  7498.  
  7499.                                                                             5
  7500.  
  7501.  
  7502.  
  7503.           General Options
  7504.           -------------------------------------------------------------------
  7505.  
  7506.  
  7507.           Introduction     General options are options which do not affect
  7508.                            the conversion of the image.  They control such
  7509.                            things as the overwriting of existing files and
  7510.                            the way that memory is used.
  7511.  
  7512.                            If you are currently using the Alchemy's menu
  7513.                            interface rather than the command-line, you can
  7514.                            focus on the purpose, comments, and limitations
  7515.                            entries in this chapter.
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.  
  7552.  
  7553.           118          Image Alchemy
  7554.  
  7555.  
  7556.  
  7557.  
  7558.           Conserve Memory                                           -$
  7559.  
  7560.  
  7561.           Purpose          Use as little memory as possible when converting
  7562.                            images.
  7563.  
  7564.           Syntax           -$ (dollar sign)
  7565.  
  7566.           Comments         Normally Alchemy tries to work on chunks of the
  7567.                            image several lines long to improve performance.
  7568.                            Use of the -$ option will cause it to use the
  7569.                            smallest size chunks possible for the conversion
  7570.                            being performed.  On MS-DOS based systems this
  7571.                            will usually allow conversion of larger images
  7572.                            than would otherwise be possible.  On UNIX systems
  7573.                            this may reduce paging when converting very large
  7574.                            images.
  7575.  
  7576.           Example          Convert the image giant.tga to a 16 colour TIFF
  7577.                            file conserving memory:
  7578.  
  7579.                                 alchemy giant.tga -$ -t -c16
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.                                                    Image Alchemy          119
  7613.  
  7614.  
  7615.  
  7616.  
  7617.           Display Image Stats                                       -x
  7618.  
  7619.  
  7620.           Purpose          Display image statistics.
  7621.  
  7622.           Syntax           -x
  7623.  
  7624.           Comments         Displays image type, size, number of colours,
  7625.                            aspect ratio, resolution, and compression ratio.
  7626.  
  7627.           Limitations      Cannot be combined with other options.
  7628.  
  7629.           Example          Find out about the image called image.tga:
  7630.  
  7631.                                 alchemy -x image.tga
  7632.  
  7633.  
  7634.  
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.           120          Image Alchemy
  7672.  
  7673.  
  7674.  
  7675.  
  7676.           Do not alter output filename                              -.
  7677.  
  7678.  
  7679.           Purpose          Disable automatic appending of the output image
  7680.                            type to the output file name.
  7681.  
  7682.           Syntax           -. (period)
  7683.  
  7684.           Comments         By default, if there's no '.' in the output
  7685.                            filename, Alchemy will add an extension indicating
  7686.                            the type of file.  If the -. option is specified
  7687.                            no extension will be added.
  7688.  
  7689.                            This is most useful on non-MS-DOS systems where
  7690.                            '.' is not a special character in filenames.
  7691.  
  7692.           Example          Convert the file called infile.gif to a PCX file
  7693.                            called outfile (if you did not use the -. option
  7694.                            Alchemy would automatically change the output file
  7695.                            name to outfile.pcx):
  7696.  
  7697.                                 alchemy infile.gif outfile -p -.
  7698.  
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.  
  7729.  
  7730.                                                    Image Alchemy          121
  7731.  
  7732.  
  7733.  
  7734.  
  7735.           Help                                                      -h
  7736.  
  7737.  
  7738.           Purpose          Give you information on how to use Image Alchemy.
  7739.  
  7740.           Syntax           -h option
  7741.  
  7742.           Parameter        option
  7743.                                 0: general help
  7744.                                 1: general options
  7745.                                 2: output formats a-k
  7746.                                 3: output formats l-z
  7747.                                 4: colour options
  7748.                                 5: scaling options
  7749.                                 6: display options (MS-DOS Only)
  7750.                            Default is 0, general help
  7751.  
  7752.           Comments         The help information given by this command is only
  7753.                            a summary.
  7754.  
  7755.           Limitations      The help option cannot be combined with any other
  7756.                            options.
  7757.  
  7758.           Related options  -?   support and update information
  7759.  
  7760.           Example          Get help on the colour options:
  7761.  
  7762.                                 alchemy -h4
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.           122          Image Alchemy
  7790.  
  7791.  
  7792.  
  7793.  
  7794.           Overwrite                                                 -o
  7795.  
  7796.  
  7797.           Purpose          Force Alchemy to overwrite existing files on the
  7798.                            disk.
  7799.  
  7800.           Syntax           -o
  7801.  
  7802.           Comments         Image Alchemy will not overwrite an existing file
  7803.                            unless the -o option is specified.
  7804.  
  7805.           Limitations      The input file name and the output file name
  7806.                            cannot be the same.
  7807.  
  7808.           Example          Convert the file input.tga to a GIF file called
  7809.                            output.gif, overwriting the existing file called
  7810.                            output.gif:
  7811.  
  7812.                                 alchemy input.tga -g output.gif -o
  7813.  
  7814.  
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.  
  7823.  
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.                                                    Image Alchemy          123
  7849.  
  7850.  
  7851.  
  7852.  
  7853.           Program information                                       -?
  7854.  
  7855.  
  7856.           Purpose          Give you information on how to get support for
  7857.                            Image Alchemy or inquire about update information.
  7858.  
  7859.           Syntax           -?
  7860.  
  7861.           Comments         Sun-3 and Sun-4 users have to escape the question
  7862.                            mark with a back-slash (instead of -? use -\?).
  7863.                            This is because the UNIX shell will attempt to
  7864.                            perform wildcard expansion on the question mark.
  7865.  
  7866.           Limitations      The information option cannot be combined with any
  7867.                            other options.
  7868.  
  7869.           Related options  -h   help with commands
  7870.  
  7871.           Example          Get support information:
  7872.  
  7873.                                 alchemy -?
  7874.  
  7875.  
  7876.  
  7877.  
  7878.  
  7879.  
  7880.  
  7881.  
  7882.  
  7883.  
  7884.  
  7885.  
  7886.  
  7887.  
  7888.  
  7889.  
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.           124          Image Alchemy
  7908.  
  7909.  
  7910.  
  7911.  
  7912.           Quiet                                                     -Q
  7913.  
  7914.  
  7915.           Purpose          Suppress all status messages (but not error
  7916.                            messages).
  7917.  
  7918.           Syntax           -Q
  7919.  
  7920.           Comments         This is useful when running Alchemy in the
  7921.                            background on UNIX systems or in batch files on
  7922.                            MS-DOS systems (and you don't want the output of
  7923.                            Alchemy scrolling important messages off of the
  7924.                            screen).
  7925.  
  7926.           Limitations      There is no way to suppress error messages.
  7927.  
  7928.           Example          Convert the file dummy.gif to a PCX file but don't
  7929.                            report any status messages:
  7930.  
  7931.                                 alchemy -Q dummy.gif -p
  7932.  
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.                                                    Image Alchemy          125
  7967.  
  7968.  
  7969.  
  7970.  
  7971.           Warnings                                                 --W
  7972.  
  7973.  
  7974.           Purpose          Treat missing input files, unidentifiable input
  7975.                            files, and non-overwriteable output files as a
  7976.                            non-fatal errors.
  7977.  
  7978.           Syntax           --W
  7979.  
  7980.           Comments         When used in conjunction with the Wildcard option
  7981.                            (see below) the Warnings option allows Alchemy to
  7982.                            proceed even when certain error conditions occur.
  7983.                            Specifically, any input files which are missing or
  7984.                            can't be identified as valid image files, and any
  7985.                            output files which already exist but are not to be
  7986.                            overwritten, are skipped and processing continues
  7987.                            with the next file.
  7988.  
  7989.                            At the end of processing Alchemy displays lists of
  7990.                            the files which were not found, which could not be
  7991.                            identified, and which already existed but could
  7992.                            not be overwritten.
  7993.  
  7994.                            This option was added at the request of our
  7995.                            customers who routinely convert large numbers of
  7996.                            files and don't want Alchemy to stop if it finds a
  7997.                            file missing or finds that an output file already
  7998.                            exists.
  7999.  
  8000.           Limitations      Any errors which occur during the processing of an
  8001.                            image file are always fatal.
  8002.  
  8003.                            This option can only be used with the Wildcard
  8004.                            option.
  8005.  
  8006.  
  8007.           Examples         Convert all the GIF files in the current directory
  8008.                            to JPEG files, skipping any files which can't be
  8009.                            identified or already have existing JPEG files:
  8010.  
  8011.                                 alchemy -- *.gif -j --W
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.  
  8024.  
  8025.           126          Image Alchemy
  8026.  
  8027.  
  8028.  
  8029.  
  8030.           Wildcard                                                  --
  8031.  
  8032.  
  8033.           Purpose          Allow the conversion of multiple files with a
  8034.                            single execution of Alchemy.
  8035.  
  8036.           Syntax           -- (dash)
  8037.  
  8038.           Comments         The wildcard option allows you to specify multiple
  8039.                            file names and file names which include wild card
  8040.                            characters.  Alchemy will perform the same
  8041.                            conversion for each input file name that it finds.
  8042.  
  8043.  
  8044.                            On MS-DOS systems the use of the wildcard option
  8045.                            (--) is not required if the first file name
  8046.                            specified includes a wildcard character (* or ?);
  8047.                            however to reduce confusion it is still
  8048.                            recommended.
  8049.  
  8050.           Limitations      The wildcard option (--) must be specified before
  8051.                            any file names.
  8052.  
  8053.  
  8054.                            If you are using the wildcard option you may not
  8055.                            specify an output file name;  the file names are
  8056.                            automatically generated by substituting an
  8057.                            appropriate extension to the input file names.  If
  8058.                            you do specify an output file name it will be
  8059.                            misinterpreted as another input file.  An output
  8060.                            path name may still be specified.
  8061.  
  8062.  
  8063.                            Any error will terminate the execution of Alchemy;
  8064.                            any images which appear in the filename list after
  8065.                            the one causing the error will not be processed.
  8066.                            This includes attempting to overwrite an already
  8067.                            existing file without specifying the -o option.
  8068.  
  8069.  
  8070.                            Alchemy does not intelligently retain information
  8071.                            between files.  For example, if you are matching a
  8072.                            group of files to an existing palette, the inverse
  8073.                            palette generation step only needs to be performed
  8074.                            once, but it is in fact done for each file.  This
  8075.                            only affects the speed of conversions, not the
  8076.                            quality.
  8077.  
  8078.  
  8079.           Examples         Convert all the GIF files in the current directory
  8080.                            to JPEG files:
  8081.  
  8082.  
  8083.  
  8084.                                                    Image Alchemy          127
  8085.  
  8086.  
  8087.  
  8088.  
  8089.                                 alchemy  --  *.gif  -j
  8090.  
  8091.                            Convert all the TIFF files in the directory \tiff
  8092.                            to PCX files in the directory \images\output:
  8093.  
  8094.                                 alchemy  --  \tiff\*.tif -p \images\output
  8095.  
  8096.                            Convert the files madonna.gif, bay4.gif,
  8097.                            everest.tga, and basil.tif to JPEG files,
  8098.                            overwriting any existing files:
  8099.  
  8100.                                 alchemy  --  -o madonna.gif bay4.gif -j
  8101.                                 everest.tga basil.tif
  8102.  
  8103.                            Convert the files test1.tif, test2.tif, and
  8104.                            new*.gif to ILBM files, matching them to the
  8105.                            palette from the file output.pal:
  8106.  
  8107.                                 alchemy  --  test1.tif test2.tif new*.gif -f
  8108.                                 output.pal -i
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.  
  8141.  
  8142.  
  8143.           128          Image Alchemy
  8144.  
  8145.  
  8146.  
  8147.  
  8148.                                                                             6
  8149.  
  8150.  
  8151.  
  8152.           Colour and Palette Options
  8153.           -------------------------------------------------------------------
  8154.  
  8155.  
  8156.           Introduction     Colour and Palette options are options which
  8157.                            affect the appearance of the output image.  They
  8158.                            control such things as the number of colours in
  8159.                            the output image and the dithering techniques
  8160.                            used.
  8161.  
  8162.                            If you are currently using the Alchemy's menu
  8163.                            interface rather than the command-line, you can
  8164.                            focus on the purpose, comments, and limitations
  8165.                            entries in this chapter.
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.  
  8181.  
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189.  
  8190.  
  8191.  
  8192.  
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.                                                    Image Alchemy          129
  8203.  
  8204.  
  8205.  
  8206.  
  8207.           Black and White                                           -b
  8208.  
  8209.  
  8210.           Purpose          Convert the image to black and white.
  8211.  
  8212.           Syntax           -b
  8213.  
  8214.           Comments         The -b and -c options used in conjunction
  8215.                            specifies the number of shades of gray in the
  8216.                            image.  The default is 256 shades of gray when
  8217.                            converting from a true colour image.  When
  8218.                            converting from a paletted image the number of
  8219.                            shades of gray defaults to the number of colours
  8220.                            in the original image.
  8221.  
  8222.                            The shades of gray are uniformly distributed from
  8223.                            0 to 255.
  8224.  
  8225.                            When converting from true colour the image will be
  8226.                            changed to a paletted image unless the -24 option
  8227.                            is used.
  8228.  
  8229.           Related options  -8   Paletted output
  8230.                            -24  True colour output
  8231.                            -c   Specify number of colours
  8232.  
  8233.           Examples         Convert the file sample.jpg into a 256 shades of
  8234.                            gray raw file:
  8235.  
  8236.                                 alchemy sample.jpg -b -r
  8237.  
  8238.                            Convert the file madonna.jpg into a 4 shades of
  8239.                            gray gif file called gray.gif:
  8240.  
  8241.                                 alchemy -b -c4 -g madonna.gif gray.gif
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.  
  8258.  
  8259.  
  8260.  
  8261.           130          Image Alchemy
  8262.  
  8263.  
  8264.  
  8265.  
  8266.           Colours                                                   -c
  8267.  
  8268.  
  8269.           Purpose          Specify the number of colours for the output file.
  8270.  
  8271.           Syntax           -c colours [reserveColours]
  8272.  
  8273.           Parameters       colours
  8274.                                 Specifies the number of colours in the output
  8275.                            image.  May be between 2 and 256.
  8276.  
  8277.                            reserveColours
  8278.                                 Specifies the number of colours to reserve in
  8279.                            the output image.  May be between 0 and 255.
  8280.  
  8281.           Comments         If the input file has a larger number of colours
  8282.                            than specified for the output file, the image will
  8283.                            be quantized using Heckbert's median cut algorithm
  8284.                            and dithered.  For further information on
  8285.                            Heckbert's median cut algorithm see Appendix B,
  8286.                            Colour and Dithering.
  8287.  
  8288.                            The number of colours to reserve is an optional
  8289.                            parameter.  If it is present it causes the
  8290.                            specified number of colours to be reserved from
  8291.                            the beginning of the palette.  The output image
  8292.                            will not contain any of those colour indices.
  8293.                            This can be useful if you have menus or other
  8294.                            information you wish to display at the same time
  8295.                            as the images and they use colours at the
  8296.                            beginning of the palette.  The menu colours will
  8297.                            then not interfere with the image.  The first
  8298.                            indices are set to black unless 16 is specified,
  8299.                            in which case they are set to the standard VGA
  8300.                            colour palette.
  8301.  
  8302.           Limitations      Specifying the number of colours only has an
  8303.                            effect if you are writing a paletted file (using
  8304.                            the -8 option) or if the output file type is
  8305.                            always paletted.
  8306.  
  8307.                            Converting an image with a large number of colours
  8308.                            to a small number of colours (less than 8) will
  8309.                            usually give poor results.
  8310.  
  8311.                            The reserved colours will be set to black unless
  8312.                            16 colours are reserved.  In that case they will
  8313.                            be set to the standard VGA colours.
  8314.  
  8315.           Related options  -8   Convert to paletted image
  8316.                            -d   Specify dither type
  8317.                            -u   Use uniform palette
  8318.  
  8319.  
  8320.                                                    Image Alchemy          131
  8321.  
  8322.  
  8323.  
  8324.  
  8325.           Examples         Convert the image colours.gif into a 16 colour PCX
  8326.                            file called colour16.pcx
  8327.  
  8328.                                 alchemy colours.gif -p -c16 colour16.pcx
  8329.  
  8330.                            Convert the image colours.tga into a 256 colour
  8331.                            GIF file called output.gif, reserving the first 16
  8332.                            colours.
  8333.  
  8334.                                 alchemy colours.tga -g -c256 16 output.gif
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.  
  8353.  
  8354.  
  8355.  
  8356.  
  8357.  
  8358.  
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.  
  8379.           132          Image Alchemy
  8380.  
  8381.  
  8382.  
  8383.  
  8384.           Dither                                                    -d
  8385.  
  8386.  
  8387.           Purpose          Specifies the type of dithering to apply to the
  8388.                            image.
  8389.  
  8390.           Syntax           -d[s] ditherType [perturbation]
  8391.  
  8392.           Parameters       If the -d is immediately followed by an 's', then
  8393.                            a serpentine raster is used.
  8394.  
  8395.                            ditherType can be:
  8396.                                 0:None
  8397.                                 1:Floyd-Steinberg
  8398.                                 2:Stucki
  8399.                                 3:Jarvis, Judice, & Ninke
  8400.                                 4:Stevenson and Arce
  8401.                                 5:Sierra Lite
  8402.                                 20:Halftone (clustered dot)
  8403.                                 21:Bayer (dispersed dot)
  8404.                                 22:Halftone 2 (clustered dot)
  8405.                            The default is Floyd-Steinberg.
  8406.  
  8407.                            perturbation
  8408.                                 0 through 127
  8409.                            The default is 0.
  8410.  
  8411.           Comments         Dithering is used to reduce colour banding in an
  8412.                            image caused by the palette not having a perfect
  8413.                            match for every colour in the image.
  8414.  
  8415.  
  8416.                            Types 1 through 5 are all error-diffusion dithers.
  8417.                            Types 1 and 5 are the fastest of the diffusion
  8418.                            dithers, and they usually look the best on low
  8419.                            resolution devices like CRTs.  Types 2, 3, and 4
  8420.                            all tend to cause an image to appear more grainy
  8421.                            on low resolution output devices (such as CRTs).
  8422.                            However, they produce better results than types 1
  8423.                            or 5 on high-resolution, low colour output devices
  8424.                            such as laser printers.
  8425.  
  8426.  
  8427.                            Type 20 is a digital halftone; this will produce
  8428.                            the most accurate grays on a laser printer, but
  8429.                            the image won't be as sharp as one produced by the
  8430.                            error-diffusion dithers.  Type 21 is a dispersed
  8431.                            dot ordered dither; it's only advantage over the
  8432.                            error-diffusion algorithms is speed.  Type 22 is
  8433.                            an additional halftone pattern.  It's similar to
  8434.                            type 20, but with a finer screen.
  8435.  
  8436.  
  8437.  
  8438.                                                    Image Alchemy          133
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.                            The -d option only has an effect if the number of
  8445.                            colours is being reduced or the image is being re-
  8446.                            mapped to a new palette.
  8447.  
  8448.  
  8449.                            Specifying a perturbation adds noise to the image,
  8450.                            which can help break up visible patterns
  8451.                            introduced by dithering.  The parameter specifies
  8452.                            the magnitude of the noise.  Perturbation has no
  8453.                            effect on dither types 20, 21, and 22.
  8454.  
  8455.                            Using a serpentine raster can also help to reduce
  8456.                            visible patterns introduced by dithering.  Using a
  8457.                            serpentine raster has no effect on dither types
  8458.                            20, 21, and 22.
  8459.  
  8460.           Examples         Convert the 256 colour file image.gif to a 16
  8461.                            colour PCX file using a uniform palette and no
  8462.                            dithering:
  8463.  
  8464.                                 alchemy image.gif -p -c16 -d0 -u
  8465.  
  8466.  
  8467.                            Convert the true colour image sample.jpg into a
  8468.                            256 colour GIF file called sample.gif, using
  8469.                            Stucki dithering:
  8470.  
  8471.                                 alchemy -g -d2 sample.jpg
  8472.  
  8473.  
  8474.                            Convert the 256 colour image sample.gif into a one
  8475.                            bit black and white PCL file called sample.pcl,
  8476.                            using Jarvis, Judice, and Ninke dithering, a
  8477.                            serpentine raster, and a little noise:
  8478.  
  8479.                                 alchemy -P -b -c2 -ds3 20 sample.gif
  8480.  
  8481.  
  8482.  
  8483.  
  8484.  
  8485.  
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.  
  8494.  
  8495.  
  8496.  
  8497.           134          Image Alchemy
  8498.  
  8499.  
  8500.  
  8501.  
  8502.           EGA Palette                                               -E
  8503.  
  8504.  
  8505.           Purpose          Optimize the image quality for display on an EGA
  8506.                            board and monitor.
  8507.  
  8508.           Syntax           -E
  8509.  
  8510.           Comments         If you are converting images to display on an EGA
  8511.                            board and monitor this option will optimize the
  8512.                            image quality.
  8513.  
  8514.                            This option reduces the palette resolution to two
  8515.                            bits and automatically specifies the following:
  8516.                            -8 -c16 -z0 2 0.
  8517.  
  8518.           Limitations      The number of colours in an EGA palette must be
  8519.                            less than or equal to 16;  the number of colours
  8520.                            defaults to 16 but can be reduced by using the -c
  8521.                            option.
  8522.  
  8523.           Related options  -c   specify number of colours
  8524.  
  8525.           Example          Convert the image dave1.tga into dave1.pcx, a PCX
  8526.                            file with a palette optimized for EGA use:
  8527.  
  8528.                                 alchemy -E -p dave1.tga
  8529.  
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542.  
  8543.  
  8544.  
  8545.  
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.  
  8555.  
  8556.                                                    Image Alchemy          135
  8557.  
  8558.  
  8559.  
  8560.  
  8561.           False Colour                                              -F
  8562.  
  8563.  
  8564.           Purpose          False colour an image using the palette from a
  8565.                            file.  The input image will be changed to use the
  8566.                            palette found in the specified filename but no
  8567.                            attempt at picking the best match will be done.
  8568.  
  8569.           Syntax           -F filename
  8570.  
  8571.           Parameter        filename
  8572.                                 Any valid image type which contains a palette
  8573.  
  8574.           Comments         This feature can be used to add false colour to
  8575.                            monochrome images.  The output file is not
  8576.                            dithered.  This is only applicable to paletted
  8577.                            input files.
  8578.  
  8579.           Limitations      Cannot be combined with spiff -S or match to
  8580.                            palette -f.
  8581.  
  8582.           Example          False colour the file scan.gif using the palette
  8583.                            from the file colorful.pcx, creating the GIF file
  8584.                            new.gif:
  8585.  
  8586.                                 alchemy -F colorful.pcx -g scan.gif new.gif
  8587.  
  8588.  
  8589.  
  8590.  
  8591.  
  8592.  
  8593.  
  8594.  
  8595.  
  8596.  
  8597.  
  8598.  
  8599.  
  8600.  
  8601.  
  8602.  
  8603.  
  8604.  
  8605.  
  8606.  
  8607.  
  8608.  
  8609.  
  8610.  
  8611.  
  8612.  
  8613.  
  8614.  
  8615.           136          Image Alchemy
  8616.  
  8617.  
  8618.  
  8619.  
  8620.           Gamma correction                                          -G
  8621.  
  8622.  
  8623.           Purpose          Specify the gamma of an input, output, or palette
  8624.                            file and/or perform gamma correction.
  8625.  
  8626.           Syntax           -G gammaType gammaValue
  8627.  
  8628.           Parameters       gammaType:
  8629.                                 i:Specify input gamma
  8630.                                 o:Specify output gamma
  8631.                                 p:Specify gamma of palette
  8632.  
  8633.                            gammaValue:
  8634.                                 0.0 to 4.0
  8635.  
  8636.           Comments         To perform gamma correction, Alchemy needs to know
  8637.                            both the input and output gamma.  For some file
  8638.                            formats the gamma is known; if you're reading a
  8639.                            file with known gamma, such as JPEG, PICT,
  8640.                            PCPAINT, or a Targa file with the gamma field, you
  8641.                            don't need to specify the input gamma.  Likewise,
  8642.                            if you're writing a file which has a fixed gamma
  8643.                            you don't need to specify an output gamma.  Even
  8644.                            if reading or writing a file format which has a
  8645.                            known gamma you may override it by using the -Gi
  8646.                            or -Go option.
  8647.  
  8648.  
  8649.                            However, even if both input and output gamma are
  8650.                            known based on the input file and the output
  8651.                            format, you must still enable gamma correction for
  8652.                            any correction to take place; you can do this with
  8653.                            just '-G' (if you had specified input, output, or
  8654.                            palette gamma, this would be implied).  This is
  8655.                            because there are quite a few images around that
  8656.                            have specified or implied gammas that are wrong,
  8657.                            which could cause Alchemy to make matters worse
  8658.                            instead of better.
  8659.  
  8660.  
  8661.                            Typical values for gamma are 1.0 for images from
  8662.                            Macintoshes and 2.2 for images from PCs.
  8663.  
  8664.           Examples         To convert the Mac PICT file test.pic, which has a
  8665.                            gamma of 1.0, to a PCX file for use on a PC (which
  8666.                            should have a gamma of 2.2), use:
  8667.  
  8668.                                 alchemy -p -Gi1.0 -Go2.2 test.pic
  8669.  
  8670.  
  8671.  
  8672.  
  8673.  
  8674.                                                    Image Alchemy          137
  8675.  
  8676.  
  8677.  
  8678.  
  8679.                            The input gamma could have been omitted, as PICT
  8680.                            files have an implied gamma of 1.0, but it's best
  8681.                            to include it to reduce confusion.
  8682.  
  8683.                            To convert the file image.tga, which has a gamma
  8684.                            of 2.2, to a GIF file for use on a Mac, matching
  8685.                            the palette test.pal which was created with a
  8686.                            gamma of 1.5:
  8687.  
  8688.                                 alchemy image.tga -g -Gi2.2 -Go1.0 -Gp1.5 -
  8689.                                 ftest.pal
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.  
  8708.  
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.  
  8723.  
  8724.  
  8725.  
  8726.  
  8727.  
  8728.  
  8729.  
  8730.  
  8731.  
  8732.  
  8733.           138          Image Alchemy
  8734.  
  8735.  
  8736.  
  8737.  
  8738.           Match Palette                                             -f
  8739.  
  8740.  
  8741.           Purpose          Match the output to a palette read from a file.
  8742.                            The input image will be re-mapped to use the
  8743.                            palette found in the specified file.
  8744.  
  8745.           Syntax           -f filename
  8746.  
  8747.           Parameter        filename
  8748.                                 Any valid image type which contains a palette
  8749.  
  8750.           Comments         Using the -f option will cause the output image to
  8751.                            be dithered (unless you specify no dithering by
  8752.                            using the -d0 option).
  8753.  
  8754.                            The -f option can be useful if you are combining
  8755.                            several images into a collage or want to match an
  8756.                            image to a pre-existing palette.  You can also
  8757.                            create a custom palette from scratch by using a
  8758.                            text editor and creating a .PAL file.
  8759.  
  8760.           Limitations      Cannot be combined with spiff -S or false colour -
  8761.                            F.
  8762.  
  8763.                            The number of colours in the final image will be
  8764.                            equal to the number of colours in the palette
  8765.                            being read in.
  8766.  
  8767.                            The specified file must contain a palette (i.e.
  8768.                            cannot be true colour).
  8769.  
  8770.           Related options  -l   Generate palette file
  8771.                            -F   False colour
  8772.                            -d   Dither
  8773.  
  8774.  
  8775.  
  8776.           Examples         Convert the image bigimage.tif to a pcx file using
  8777.                            the palette from the file standard.pal:
  8778.  
  8779.                                 alchemy bigimage.tif -p -f standard.pal
  8780.  
  8781.                            Convert the image colour.gif to a gif file called
  8782.                            colour2.gif using the palette from the file
  8783.                            newpal.gif:
  8784.  
  8785.                                 alchemy -fnewpal.gif -g colour.gif colour2
  8786.  
  8787.  
  8788.  
  8789.  
  8790.  
  8791.  
  8792.                                                    Image Alchemy          139
  8793.  
  8794.  
  8795.  
  8796.  
  8797.           Negate                                                    -N
  8798.  
  8799.  
  8800.           Purpose          Changes the image to a negative.
  8801.  
  8802.           Syntax           -N
  8803.  
  8804.           Comments         This is equivalent to a photographic negative.
  8805.                            When used on black and white images black is
  8806.                            changed to white and white is changed to black.
  8807.                            On colour images each of the Red, Green, and Blue
  8808.                            channels are inverted separately (so that bright
  8809.                            blue will become bright yellow).
  8810.  
  8811.           Examples         Negate the file sample.gif, generating a GIF file
  8812.                            called negative.gif:
  8813.  
  8814.                                 alchemy sample.gif -N -g negative
  8815.  
  8816.  
  8817.  
  8818.  
  8819.  
  8820.  
  8821.  
  8822.  
  8823.  
  8824.  
  8825.  
  8826.  
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.  
  8850.  
  8851.           140          Image Alchemy
  8852.  
  8853.  
  8854.  
  8855.  
  8856.           Palette                                                   -8
  8857.  
  8858.  
  8859.           Purpose          Force the output image to be paletted.
  8860.  
  8861.           Syntax           -8
  8862.  
  8863.           Comments         This option is -8 because paletted images are
  8864.                            typically 8 bits per pixel.
  8865.  
  8866.                            Alchemy defaults to the -8 option if the input
  8867.                            file is paletted or gray-scale.
  8868.  
  8869.                            Some file formats require files to be paletted;
  8870.                            for those formats the -8 option is assumed.  Some
  8871.                            file formats do not have a paletted variation; in
  8872.                            those cases the -8 option will be ignored if
  8873.                            specified.  Some file formats only allow gray-
  8874.                            scale files to be 8 bit; in those cases Alchemy
  8875.                            will ignore the -8 option if the image being
  8876.                            written is not gray-scale.
  8877.  
  8878.                            The actual number of bits per pixel is determined
  8879.                            by the -c option (below).
  8880.  
  8881.                            If the input file is true colour the output file
  8882.                            will be quantized and dithered (see the -c and -d
  8883.                            options below).
  8884.  
  8885.           Related options  -15  True colour output
  8886.                            -16  True colour output
  8887.                            -24  True colour output
  8888.                            -32  True colour output
  8889.                            -c   specify number of colours in image
  8890.                            -d   dither
  8891.  
  8892.           Examples         Convert the JPEG file bigimage.jpg into a paletted
  8893.                            TIFF file with 256 colours:
  8894.  
  8895.                                 alchemy -8 -t bigimage.jpg
  8896.  
  8897.                            Convert the Targa file madonna.tga to a 16 colour
  8898.                            PCX file (note that the -8 option is implied by
  8899.                            the use of the    -c16 option):
  8900.  
  8901.                                 alchemy -c16 -p madonna.tga
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.  
  8908.  
  8909.  
  8910.                                                    Image Alchemy          141
  8911.  
  8912.  
  8913.  
  8914.  
  8915.           Palette Selection                                         -z
  8916.  
  8917.  
  8918.           Purpose          Control how the palette is generated.  These
  8919.                            options only have an effect if the palette is
  8920.                            being generated by Alchemy using Heckbert's median
  8921.                            cut algorithm.
  8922.  
  8923.           Syntax           -z sortType [selectionType [swapType] ]
  8924.  
  8925.  
  8926.           Parameters       Sort the image palette.  SortType can be:
  8927.                                 0:None
  8928.                                 1:popularity
  8929.                                 2:luminance (white to black)
  8930.                                 3:rgb
  8931.                                 4:luminance (black to white)
  8932.                            The default is None.
  8933.  
  8934.  
  8935.                            SelectionType can be:
  8936.                                 0:mean
  8937.                                 1:median
  8938.                                 2:corner
  8939.                            The default is mean.
  8940.  
  8941.  
  8942.                            See Appendix B, Colour and Dithering, for an
  8943.                            explanation of these choices.
  8944.  
  8945.  
  8946.                            SwapType can be:
  8947.                                 0:None
  8948.                                 1:IBM (colour 0 is black, 7 is white)
  8949.                                 2:Macintosh (colour 0 is white, 255 is black)
  8950.                                 3:Sun (colour 0 is white, 1 is black)
  8951.                            The default is based on the file type being
  8952.                            written out (IBM for GIF, Macintosh for Mac PICT,
  8953.                            Sun for Sun Raster, and None for all others).
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.  
  8968.  
  8969.           142          Image Alchemy
  8970.  
  8971.  
  8972.  
  8973.  
  8974.           Comments         The most common use for this option is to sort the
  8975.                            palette; in this case only a single parameter is
  8976.                            needed.
  8977.  
  8978.                            This option only affects palettes that are
  8979.                            generated by Alchemy.  To sort an existing palette
  8980.                            you can save the image as a true colour file (such
  8981.                            as HSI Raw, by using the -24 -r options) and then
  8982.                            convert that back to a paletted file, specifying
  8983.                            the desired sort type.  In most cases this will
  8984.                            not change the image (other than the palette
  8985.                            order); however if the palette had entries
  8986.                            representing colours that are nearly identical
  8987.                            then the image may be modified.
  8988.  
  8989.           Limitations      Note that it is not possible to specify a swapType
  8990.                            without first specifying both a sortType and a
  8991.                            selectionType.  See Appendix B, Colour and
  8992.                            Dithering, for more information.
  8993.  
  8994.           Example          Convert the file input.tga to a gif filed called
  8995.                            output.gif sorting the colours by luminance, using
  8996.                            the mean of the Heckbert box for the colour, and
  8997.                            moving the colours around so that the lightest
  8998.                            colour is colour 0 and the darkest colour is
  8999.                            colour 1.
  9000.  
  9001.                                 alchemy input.tga -g output.gif -z4 0 3
  9002.  
  9003.  
  9004.  
  9005.  
  9006.  
  9007.  
  9008.  
  9009.  
  9010.  
  9011.  
  9012.  
  9013.  
  9014.  
  9015.  
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.  
  9027.  
  9028.                                                    Image Alchemy          143
  9029.  
  9030.  
  9031.  
  9032.  
  9033.           Spiff                                                     -S
  9034.  
  9035.  
  9036.           Purpose          Enhance the image contrast by stretching the pixel
  9037.                            colour values to the full 0 to 255 range.
  9038.  
  9039.           Syntax           -S spiffType
  9040.  
  9041.           Parameter        spiffType:
  9042.                                 a:histogram stretching
  9043.                                 b:histogram linearization
  9044.                                 c:histogram stretching with b/w ignored
  9045.                            The default is histogram stretching.
  9046.  
  9047.           Comments         This command can be used if the image you are
  9048.                            converting is shifted in brightness or squished in
  9049.                            contrast.  This can happen if you scan or digitize
  9050.                            a very dark or very bright image.
  9051.  
  9052.                            The default type, histogram stretching, simply
  9053.                            insures that the image has pixels which are
  9054.                            distributed over the entire output range (0 to
  9055.                            255).
  9056.  
  9057.                            Histogram linearization insures that the
  9058.                            distribution of pixels over the output range is
  9059.                            linear.
  9060.  
  9061.                            Type C spiffing is identical to histogram
  9062.                            stretching except that the colours absolute black
  9063.                            and absolute white are ignored in the image.  This
  9064.                            is useful when you have images which have black
  9065.                            borders or white captions, since type A spiffing
  9066.                            would treat these as part of the image data and
  9067.                            not perform any spiffing.
  9068.  
  9069.                            Histogram linearization can produce significantly
  9070.                            better results than histogram stretching for some
  9071.                            images.  Generally you will want to try both types
  9072.                            to see which gives better results.
  9073.  
  9074.           Limitations      The -S option cannot be used at the same time as
  9075.                            the -b option when converting from a true colour
  9076.                            image.  A work around is to do the operation in
  9077.                            two steps, converting it to black and white first
  9078.                            and then spiffing the resulting image.
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.           144          Image Alchemy
  9088.  
  9089.  
  9090.  
  9091.  
  9092.                            Using the spiff option at the same time as the
  9093.                            match palette, -f, or false colour, -F, options is
  9094.                            not allowed.  This is because the spiff option
  9095.                            would be performed before the palette is changed,
  9096.                            which would nullify the effects.  A work around is
  9097.                            to do the matching or false colouring first, and
  9098.                            then spiff the resultant image.
  9099.  
  9100.  
  9101.           Related options  -b   Black and White
  9102.                            -f   Match palette
  9103.                            -F   False colour image
  9104.  
  9105.           Example          Convert the file gloomy.pcx into a PCX file called
  9106.                            better.pcx:
  9107.  
  9108.                                 alchemy gloomy.pcx -S -p better.pcx
  9109.  
  9110.                            Do the same thing using histogram linearization
  9111.                            instead of histogram stretching:
  9112.  
  9113.                                 alchemy gloomy.pcx -Sb -p better.pcx
  9114.  
  9115.  
  9116.  
  9117.  
  9118.  
  9119.  
  9120.  
  9121.  
  9122.  
  9123.  
  9124.  
  9125.  
  9126.  
  9127.  
  9128.  
  9129.  
  9130.  
  9131.  
  9132.  
  9133.  
  9134.  
  9135.  
  9136.  
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.  
  9143.  
  9144.  
  9145.  
  9146.                                                    Image Alchemy          145
  9147.  
  9148.  
  9149.  
  9150.  
  9151.           True Colour (15 bits)                                    -15
  9152.  
  9153.  
  9154.           Purpose          Force the output image to be true colour, 15 bits
  9155.                            (5 bits per component).
  9156.  
  9157.           Syntax           -15
  9158.  
  9159.           Comments         See the True Colour (24 bits) section, below.
  9160.  
  9161.           Related options  -8   Paletted output
  9162.                            -16  True colour output
  9163.                            -24  True colour output
  9164.                            -32  True colour output
  9165.  
  9166.           Example          Convert the GIF file test.gif into an
  9167.                            uncompressed, true colour 15 bit Targa file called
  9168.                            test.tga:
  9169.  
  9170.                                 alchemy test.gif -a0 -15
  9171.  
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.           146          Image Alchemy
  9206.  
  9207.  
  9208.  
  9209.  
  9210.           True Colour (16 bits)                                    -16
  9211.  
  9212.  
  9213.           Purpose          Force the output image to be true colour, 16 bits
  9214.                            (5 bits each for red and blue, 6 for green).
  9215.  
  9216.           Syntax           -16
  9217.  
  9218.           Comments         See the True Colour (24 bits) section, below.
  9219.  
  9220.           Related options  -8   Paletted output
  9221.                            -15  True colour output
  9222.                            -24  True colour output
  9223.                            -32  True colour output
  9224.  
  9225.           Example          Convert the GIF file test.gif into an
  9226.                            uncompressed, true colour 16 bit Targa file called
  9227.                            test.tga:
  9228.  
  9229.                                 alchemy test.gif -a0 -16
  9230.  
  9231.  
  9232.  
  9233.  
  9234.  
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.  
  9261.  
  9262.  
  9263.  
  9264.                                                    Image Alchemy          147
  9265.  
  9266.  
  9267.  
  9268.  
  9269.           True Colour (24 bits)                                    -24
  9270.  
  9271.  
  9272.           Purpose          Force the output image to be true colour (not
  9273.                            paletted).
  9274.  
  9275.           Syntax           -24
  9276.  
  9277.           Comments         This option is -24 because true colour images are
  9278.                            typically 24 bits per pixel.
  9279.  
  9280.                            Some file formats require files to be true colour;
  9281.                            for those formats the -24 option is assumed.  Some
  9282.                            file formats only have a paletted variation; in
  9283.                            those cases the -24 option will be ignored if
  9284.                            specified.
  9285.  
  9286.                            The file formats which may be either true colour
  9287.                            or paletted default to true colour if the input
  9288.                            file is true colour.
  9289.  
  9290.                            Certain file formats may only be paletted if the
  9291.                            images are gray-scale, in those cases Alchemy will
  9292.                            automatically switch to true colour if the output
  9293.                            image is colour.
  9294.  
  9295.                            Converting a paletted image to true colour will
  9296.                            not improve its quality or change its appearance.
  9297.                            The primary use of this option is to force an
  9298.                            image to be true colour when converting to a
  9299.                            format which allows either paletted or true
  9300.                            colour, but where the paletted variation is not
  9301.                            well supported (like the Targa image format).
  9302.  
  9303.           Related options  -8   Paletted output
  9304.  
  9305.           Example          Convert the GIF file test.gif into an
  9306.                            uncompressed, true colour Targa file called
  9307.                            test.tga:
  9308.  
  9309.                                 alchemy test.gif -a0 -24
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.  
  9320.  
  9321.  
  9322.  
  9323.           148          Image Alchemy
  9324.  
  9325.  
  9326.  
  9327.  
  9328.           True Colour (32 bits)                                    -32
  9329.  
  9330.  
  9331.           Purpose          Force the output image to be true colour, 32 bits
  9332.                            (8 bits per component, 8 bits for alpha).
  9333.  
  9334.           Syntax           -32
  9335.  
  9336.           Comments         See the True Colour (24 bits) section, above.
  9337.  
  9338.           Related options  -8   Paletted output
  9339.                            -15  True colour output
  9340.                            -16  True colour output
  9341.                            -24  True colour output
  9342.  
  9343.           Example          Convert the GIF file test.gif into an
  9344.                            uncompressed, true colour 32 bit Targa file called
  9345.                            test.tga (the alpha channel will be empty):
  9346.  
  9347.                                 alchemy test.gif -a0 -32
  9348.  
  9349.  
  9350.  
  9351.  
  9352.  
  9353.  
  9354.  
  9355.  
  9356.  
  9357.  
  9358.  
  9359.  
  9360.  
  9361.  
  9362.  
  9363.  
  9364.  
  9365.  
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.  
  9379.  
  9380.  
  9381.  
  9382.                                                    Image Alchemy          149
  9383.  
  9384.  
  9385.  
  9386.  
  9387.           Undercolour Removal                                       -C
  9388.  
  9389.  
  9390.           Purpose          Control the undercolour removal process, colour
  9391.                            correction, and density correction for output
  9392.                            formats which use the CMYK colour space.
  9393.  
  9394.           Syntax           -C filename
  9395.  
  9396.           Parameter        filename
  9397.                                 The name of the file which contains the
  9398.                            undercolour removal information
  9399.  
  9400.           Comments         The undercolour removal portion of the file is
  9401.                            compatible with the format used by Stork
  9402.                            Colorproofing B.V.  The format of this file is
  9403.                            described in Appendix G, Undercolour Removal
  9404.                            Files.
  9405.  
  9406.                            Sample undercolour removal files can be found in
  9407.                            the samples directory on the Alchemy distribution
  9408.                            disk or tape.
  9409.  
  9410.           Example          Convert the file image.tga to an HP RTL file
  9411.                            called image.rtl using the undercolour removal
  9412.                            file sample.ucr:
  9413.  
  9414.                                 alchemy image.tga --r4 -Csample.ucr
  9415.  
  9416.  
  9417.  
  9418.  
  9419.  
  9420.  
  9421.  
  9422.  
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.  
  9440.  
  9441.           150          Image Alchemy
  9442.  
  9443.  
  9444.  
  9445.  
  9446.           Uniform Palette                                           -u
  9447.  
  9448.  
  9449.           Purpose          Use a Uniform Palette.
  9450.  
  9451.           Syntax           -u
  9452.  
  9453.           Comments         Instead of using the Heckbert median cut algorithm
  9454.                            to generate a custom palette for the image, use a
  9455.                            palette with entries which are evenly distributed
  9456.                            in the RGB colour cube.
  9457.  
  9458.                            The advantage of using a uniform palette is that
  9459.                            it's faster than generating a custom palette.
  9460.                            However, this is at the expense of image quality
  9461.                            since the palette isn't generated based on image
  9462.                            content.
  9463.  
  9464.                            When just viewing a true colour image on a
  9465.                            paletted display a uniform palette is used.
  9466.  
  9467.                            The -c option can be used in conjunction with -u
  9468.                            to specify the size of the uniform palette; in
  9469.                            that case Alchemy will generate a palette with not
  9470.                            more than the specified number of colours (but not
  9471.                            less than 8).
  9472.  
  9473.           Limitations      The palette size will not necessarily match the
  9474.                            specified size, as the actual size must be the
  9475.                            product of three integers.  Alchemy picks integers
  9476.                            that roughly correspond to the sensitivity of the
  9477.                            human eye to red, green, and blue (30%, 59%, and
  9478.                            11%).
  9479.  
  9480.           Related options  -c   Specify number of colours
  9481.                            -d   Dither type
  9482.  
  9483.           Examples         Convert the file many.tga to a gif file using a
  9484.                            256 colour uniform palette:
  9485.  
  9486.                                 alchemy many.tga -g -u
  9487.  
  9488.                            Convert the file many.tga to a gif file with up to
  9489.                            128 colours in a uniform palette:
  9490.  
  9491.                                 alchemy many.tga -g -u -c128
  9492.  
  9493.  
  9494.  
  9495.  
  9496.  
  9497.  
  9498.  
  9499.  
  9500.                                                    Image Alchemy          151
  9501.  
  9502.  
  9503.  
  9504.  
  9505.                                                                             7
  9506.  
  9507.  
  9508.  
  9509.           Scaling Options
  9510.           -------------------------------------------------------------------
  9511.  
  9512.  
  9513.           Introduction     These options are all related to image scaling.
  9514.                            Note that the -D option does not actually change
  9515.                            the size of the image, it specifies an aspect
  9516.                            ratio or image resolution to be placed in the
  9517.                            header of the output image.
  9518.  
  9519.                            If you are using the GUI, you can concentrate on
  9520.                            the comments and limitations sections, and ignore
  9521.                            the others.
  9522.  
  9523.  
  9524.  
  9525.  
  9526.  
  9527.  
  9528.  
  9529.  
  9530.  
  9531.  
  9532.  
  9533.  
  9534.  
  9535.  
  9536.  
  9537.  
  9538.  
  9539.  
  9540.  
  9541.  
  9542.  
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.  
  9558.  
  9559.           152          Image Alchemy
  9560.  
  9561.  
  9562.  
  9563.  
  9564.           Flip Image                                                -^
  9565.  
  9566.  
  9567.           Purpose          Flip image vertically (turn image upside-down)
  9568.  
  9569.           Syntax           -^
  9570.  
  9571.           Comments         Causes the image to be turned upside-down.
  9572.  
  9573.           Examples         Convert the Targa file head.tga to another Targa
  9574.                            file called tail.tga:
  9575.  
  9576.                                 alchemy head.tga tail.tga -a -^
  9577.  
  9578.  
  9579.  
  9580.  
  9581.  
  9582.  
  9583.  
  9584.  
  9585.  
  9586.  
  9587.  
  9588.  
  9589.  
  9590.  
  9591.  
  9592.  
  9593.  
  9594.  
  9595.  
  9596.  
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.  
  9617.  
  9618.                                                    Image Alchemy          153
  9619.  
  9620.  
  9621.  
  9622.  
  9623.           Preserve Aspect Ratio                                     -+
  9624.  
  9625.  
  9626.           Purpose          Preserve aspect ratio when scaling.
  9627.  
  9628.           Syntax           -+ (plus)
  9629.  
  9630.           Comments         If specified with either the -X or -Y option
  9631.                            Alchemy will choose the other dimension to
  9632.                            preserve the aspect ratio of the image.
  9633.  
  9634.                            If specified in conjunction with both -X and -Y
  9635.                            Alchemy will use the values specified as a
  9636.                            bounding box, reducing one dimension if necessary
  9637.                            to preserve the image aspect ratio.
  9638.  
  9639.           Limitations      Does not pay attention to the pixel aspect ratio
  9640.                            values in the input image.
  9641.  
  9642.           Related options  -X   Scale image in horizontal dimension
  9643.                            -Y   Scale image in vertical dimension
  9644.  
  9645.           Examples         Change the size of the image toobig.gif so that
  9646.                            the width is 640 and the height is the correct
  9647.                            number to preserve the aspect ratio of the image
  9648.                            (the new image will be called notbig.gif):
  9649.  
  9650.                                 alchemy -X640 -+ toobig.gif -g notbig
  9651.  
  9652.                            Do the same thing but guarantee that the image
  9653.                            will not be larger than 640 by 480:
  9654.  
  9655.                                 alchemy -X640 -Y480 -+ toobig.gif -g notbig
  9656.  
  9657.  
  9658.                            Do the same thing but use better quality scaling:
  9659.  
  9660.                                 alchemy -Xb640 -Yb480 -+ toobig.gif -g notbig
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.  
  9668.  
  9669.  
  9670.  
  9671.  
  9672.  
  9673.  
  9674.  
  9675.  
  9676.  
  9677.           154          Image Alchemy
  9678.  
  9679.  
  9680.  
  9681.  
  9682.           Scale Image in Horizontal Direction                       -X
  9683.  
  9684.  
  9685.           Purpose          Scale the horizontal dimension of the image to the
  9686.                            specified number of pixels.
  9687.  
  9688.           Syntax           -X[scaleType] pixels
  9689.  
  9690.           Parameters       scaleType
  9691.                                 The type of scaling to use:
  9692.                                    a: nearest neighbor
  9693.                                    b: averaging/linear interpolation
  9694.                                    c: lanczos2
  9695.                                    d: lanczos3
  9696.                                 scaleType is optional; the default is nearest
  9697.                            neighbor.  The higher the scale type the higher
  9698.                            the quality (and the longer the processing time).
  9699.  
  9700.                            pixels
  9701.                                 The number of pixels in the output image in
  9702.                            the horizontal dimension.
  9703.  
  9704.           Comments         Nearest neighbor type scaling is faster than the
  9705.                            other types but introduces aliasing (which reduces
  9706.                            image quality).  The highest quality scaling
  9707.                            supported is lanczos3, but it takes much longer
  9708.                            than averaging/linear interpolation and generally
  9709.                            doesn't produce significantly better results.
  9710.  
  9711.           Limitations      All of the scale types other than nearest neighbor
  9712.                            give much better results than nearest neighbor
  9713.                            scaling, but they are slower and require a new
  9714.                            palette to be generated for paletted output files
  9715.                            (you can force alchemy to use the original palette
  9716.                            by using the -f option and specifying the original
  9717.                            image as the palette file).
  9718.  
  9719.           Related options  -Y   Scale in vertical dimension
  9720.                            -+   Preserve aspect ratio
  9721.  
  9722.           Examples         Scale the input image, test.gif, to 640 by 480
  9723.                            using good quality scaling, calling the output
  9724.                            file test2.gif:
  9725.  
  9726.                                 alchemy test.gif -Xb640 -Yb480 -g test2.gif
  9727.  
  9728.                            Scale the input image, big.tga, using fast scaling
  9729.                            to an image which is 320 pixels across and the
  9730.                            same aspect ratio as the input image, calling the
  9731.                            output file out.tga:
  9732.  
  9733.                                 alchemy big.tga -X320 -+ -a out
  9734.  
  9735.  
  9736.                                                    Image Alchemy          155
  9737.  
  9738.  
  9739.  
  9740.  
  9741.                            Scale the input image, oddsize.gif, using the
  9742.                            highest quality scaling, to an image which is no
  9743.                            larger than 640x480, but has the same aspect ratio
  9744.                            as the original image, calling the output image
  9745.                            new.gif:
  9746.  
  9747.                                 alchemy oddsize.gif -Yd480 -Xd640 -+ new.gif
  9748.                                 -g
  9749.  
  9750.                            Do the same thing as the previous example, but
  9751.                            retain the same palette:
  9752.  
  9753.                                 alchemy oddsize.gif -Yd480 -Xd640 -+ new.gif
  9754.                                 -g -f oddsize.gif
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.  
  9761.  
  9762.  
  9763.  
  9764.  
  9765.  
  9766.  
  9767.  
  9768.  
  9769.  
  9770.  
  9771.  
  9772.  
  9773.  
  9774.  
  9775.  
  9776.  
  9777.  
  9778.  
  9779.  
  9780.  
  9781.  
  9782.  
  9783.  
  9784.  
  9785.  
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.  
  9792.  
  9793.  
  9794.  
  9795.           156          Image Alchemy
  9796.  
  9797.  
  9798.  
  9799.  
  9800.           Scale Image in Vertical Direction                         -Y
  9801.  
  9802.  
  9803.           Purpose          Scale the vertical dimension of the image to the
  9804.                            specified number of pixels.
  9805.  
  9806.           Syntax           -Y[scaleType] pixels
  9807.  
  9808.           Parameters       ScaleType
  9809.                                 The type of scaling to use:
  9810.                                    a: nearest neighbor
  9811.                                    b: averaging/linear interpolation
  9812.                                    c: lanczos2
  9813.                                    d: lanczos3
  9814.                                 The default is nearest neighbor.
  9815.  
  9816.                            pixels
  9817.                                 The number of pixels in the vertical
  9818.                            dimension.
  9819.  
  9820.           Comments         Nearest neighbor type scaling is faster than the
  9821.                            other types but introduces aliasing.  The highest
  9822.                            quality scaling supported is lanczos3, but it
  9823.                            takes much longer than averaging/linear
  9824.                            interpolation and generally doesn't produce
  9825.                            significantly better results.
  9826.  
  9827.           Limitations      All of the scale types other than nearest neighbor
  9828.                            give much better results than nearest neighbor
  9829.                            scaling, but they are slower and require a new
  9830.                            palette to be generated for paletted output files
  9831.                            (you can force alchemy to use the original palette
  9832.                            by using the -f option and specifying the original
  9833.                            file name).
  9834.  
  9835.           Related options  -X   Scale in vertical dimension
  9836.                            -+   Preserve aspect ratio
  9837.  
  9838.           Examples         See the -X option, Scale Image in Horizontal
  9839.                            Direction, for examples.
  9840.  
  9841.  
  9842.  
  9843.  
  9844.  
  9845.  
  9846.  
  9847.  
  9848.  
  9849.  
  9850.  
  9851.  
  9852.  
  9853.  
  9854.                                                    Image Alchemy          157
  9855.  
  9856.  
  9857.  
  9858.  
  9859.           Specify Image Aspect Ratio                                -D
  9860.  
  9861.  
  9862.           Purpose          Specify aspect ratio for the output image.
  9863.  
  9864.           Syntax           -D aspectRatio
  9865.  
  9866.           Parameter        aspectRatio
  9867.                                 The percentage of the width of a pixel to its
  9868.                            height.
  9869.  
  9870.           Comments         This option does not actually change the aspect
  9871.                            ratio of the image, it just adds the aspect ratio
  9872.                            value to the output file.  This is important when
  9873.                            trying to export the image to software which
  9874.                            expects this information.
  9875.  
  9876.                            The aspect ratio of an image is the ratio of the
  9877.                            width of a single pixel to the height of a single
  9878.                            pixel.  (So to specify an aspect ratio of 5:6 use
  9879.                            -D 83, since (5/6)*100 is 83).
  9880.  
  9881.                            Alchemy attempts to preserve the aspect ratio
  9882.                            value when converting images whenever one is found
  9883.                            in the input image, but since so few file formats
  9884.                            have aspect ratio information this hardly ever
  9885.                            happens.
  9886.  
  9887.                            To write an output image without aspect ratio
  9888.                            information specify an aspect ratio of 0 (zero).
  9889.  
  9890.                            This option can also be used when displaying an
  9891.                            image on an IBM PC.
  9892.  
  9893.           Limitations      It is not possible to specify both an aspect ratio
  9894.                            and a dots per inch value for an image.  This is
  9895.                            because specifying a dots per inch value
  9896.                            automatically implies an aspect ratio.
  9897.  
  9898.                            Many file types do not have an aspect ratio value,
  9899.                            so specifying one will have no effect.
  9900.  
  9901.           Related options  -D   Specify resolution
  9902.  
  9903.           Examples         You are converting a 640x350 IBM EGA PCX image
  9904.                            called ega.pcx (which has an aspect ratio of
  9905.                            35:48) to a TIFF image and you want the TIFF image
  9906.                            to have the correct aspect ratio value (so that an
  9907.                            intelligent TIFF reader will correctly interpret
  9908.                            the image) (Note that the value of 73 is
  9909.                            (35/48)*100):
  9910.  
  9911.  
  9912.  
  9913.           158          Image Alchemy
  9914.  
  9915.  
  9916.  
  9917.  
  9918.                                 alchemy ega.pcx -D 73 -t
  9919.  
  9920.                            The resulting image will still be 640x350, but the
  9921.                            TIFF file now contains the information that the
  9922.                            pixels are not square (and in fact are 35:48).
  9923.  
  9924.                            If you had instead wanted to convert the image to
  9925.                            a 640 by 480 image (with square pixels) you could
  9926.                            have used:
  9927.  
  9928.                                 alchemy ega.pcx -Y480 -D100 -t
  9929.  
  9930.                            The -D option isn't really needed here, since any
  9931.                            software reading the TIFF file will assume that if
  9932.                            there is no aspect ratio specified the pixels are
  9933.                            square.
  9934.  
  9935.  
  9936.  
  9937.  
  9938.  
  9939.  
  9940.  
  9941.  
  9942.  
  9943.  
  9944.  
  9945.  
  9946.  
  9947.  
  9948.  
  9949.  
  9950.  
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.  
  9971.  
  9972.                                                    Image Alchemy          159
  9973.  
  9974.  
  9975.  
  9976.  
  9977.           Specify Image Resolution                                  -D
  9978.  
  9979.  
  9980.           Purpose          Specify image resolution in dots per inch for the
  9981.                            output image.
  9982.  
  9983.           Syntax           -D dotsPerInchX dotsPerInchY
  9984.  
  9985.           Parameters       dotsPerInchX
  9986.                                 The resolution of the image in the X
  9987.                            direction in dots per inch.
  9988.  
  9989.                            dotsPerInchY
  9990.                                 The resolution of the image in the Y
  9991.                            direction in dots per inch.
  9992.  
  9993.           Comments         You must specify both dotsPerInchX and
  9994.                            dotsPerInchY, even if they are the same.
  9995.  
  9996.                            This command does not actually change the
  9997.                            resolution of the image, it just adds the
  9998.                            resolution fields to the output image.  This is
  9999.                            important when trying to import the image into
  10000.                            software which expects this information.  For
  10001.                            example, Microsoft Word is much more likely to
  10002.                            give the expected results when importing a TIFF
  10003.                            image for printing on a laser printer if the image
  10004.                            has a resolution of 300 dpi.
  10005.  
  10006.                            Reasonable values to use for dotsPerInch include
  10007.                            72 (the resolution of a 13 inch monitor displaying
  10008.                            640x480) and 300 (the resolution of a laser
  10009.                            printer).
  10010.  
  10011.                            To write an output image without resolution
  10012.                            information specify a resolution of 0 0 (zero
  10013.                            zero).
  10014.  
  10015.                            Alchemy will preserve this information when
  10016.                            converting files whenever possible.
  10017.  
  10018.  
  10019.  
  10020.           Limitations      It is not possible to specify both an aspect ratio
  10021.                            and a dots per inch value for an image.  This is
  10022.                            because specifying a dots per inch value
  10023.                            automatically implies an aspect ratio.
  10024.  
  10025.                            This option is ignored when writing a file format
  10026.                            which does not have image resolution.
  10027.  
  10028.           Related options  -D   Specify aspect ratio
  10029.  
  10030.  
  10031.           160          Image Alchemy
  10032.  
  10033.  
  10034.  
  10035.  
  10036.           Example          Convert the Targa file input.tga to a TIFF file
  10037.                            called output.tif, specifying that the resolution
  10038.                            of the image in the TIFF file is 300 dpi by 300
  10039.                            dpi:
  10040.  
  10041.                                 alchemy -t input.tga -D 300 300 output
  10042.  
  10043.                            Convert the file scan.tif to a DCX variation of a
  10044.                            PCX file, scaling the output image to 1500 by 750
  10045.                            (preserving the images aspect ratio) and setting
  10046.                            the resolution to 200dpi by 100dpi (this is useful
  10047.                            if you will be faxing the image using a fax card):
  10048.  
  10049.                                 alchemy scan.tif -p1 -X1500 -Y750 -+
  10050.                                 -D 200 100
  10051.  
  10052.  
  10053.  
  10054.  
  10055.  
  10056.  
  10057.  
  10058.  
  10059.  
  10060.  
  10061.  
  10062.  
  10063.  
  10064.  
  10065.  
  10066.  
  10067.  
  10068.  
  10069.  
  10070.  
  10071.  
  10072.  
  10073.  
  10074.  
  10075.  
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.  
  10089.  
  10090.                                                    Image Alchemy          161
  10091.  
  10092.  
  10093.  
  10094.  
  10095.                                                                             8
  10096.  
  10097.  
  10098.  
  10099.           Viewing Options
  10100.  
  10101.  
  10102.           MS-DOS Only
  10103.           -------------------------------------------------------------------
  10104.  
  10105.  
  10106.  
  10107.           Display          Image Alchemy can display images on properly
  10108.           hardware         equipped MS-DOS based computers.
  10109.  
  10110.  
  10111.                            Depending on the hardware installed, Alchemy
  10112.                            supports 320x200x256, 360x480x256, 640x400x256,
  10113.                            640x480x256, 800x600x256, 1024x768x256,
  10114.                            1280x1024x256, 640x480x32768, and 800x600x32768
  10115.                            display resolutions.
  10116.  
  10117.  
  10118.                            Alchemy automatically detects which type of
  10119.                            display board you have installed.  If there are
  10120.                            multiple display boards installed in one computer
  10121.                            then Alchemy will display images on the first
  10122.                            board it finds,  searching in the following order:
  10123.  
  10124.  
  10125.                               Western Digital based 8514/A board
  10126.  
  10127.  
  10128.                               AI compatible 8514/A board
  10129.  
  10130.  
  10131.                               VESA compatible SVGA board
  10132.  
  10133.  
  10134.                               Other SVGA board.
  10135.  
  10136.  
  10137.  
  10138.  
  10139.  
  10140.           Western Digital  8514/A boards which are equipped with the Western
  10141.                    8514/A  Digital chipset are automatically recognized by
  10142.                            Alchemy.  Depending on the model board and the
  10143.                            amount of memory installed, 640x480x256,
  10144.                            1024x768x256, and 1280x1024x256 modes are
  10145.                            available.
  10146.  
  10147.  
  10148.  
  10149.           162          Image Alchemy
  10150.  
  10151.  
  10152.  
  10153.  
  10154.                 AI 8514/A  Alchemy requires AI to be installed to use 8514/A
  10155.                            displays which aren't based on the Western Digital
  10156.                            chipset.  In addition to 8514/A boards Alchemy
  10157.                            should also be able to display on other AI
  10158.                            compatible boards, such as 340x0 based boards;
  10159.                            however this has not been tested.  For AI based
  10160.                            boards the only resolution available is
  10161.                            1024x768x256
  10162.  
  10163.                      VESA  The best support for SVGA boards is available for
  10164.                            VESA compatible SVGA boards.  VESA is a SVGA
  10165.                            standard which allows applications software, such
  10166.                            as Image Alchemy, to interrogate the SVGA board to
  10167.                            determine which display modes are available.  Some
  10168.                            SVGA boards have VESA support built directly into
  10169.                            the BIOS found on the board; in this case Alchemy
  10170.                            will automatically detect the VESA driver and use
  10171.                            it.  Other SVGA boards require a software driver
  10172.                            to be installed;  these drivers are usually found
  10173.                            on the floppy disks which came with your SVGA
  10174.                            board (typically the driver is called VESA.EXE).
  10175.                            If you can't find a driver on the diskettes and
  10176.                            the documentation does not explicitly mention that
  10177.                            VESA support is built into the BIOS you might call
  10178.                            the manufacturer to see if a VESA driver is
  10179.                            available.  VESA drivers are currently available
  10180.                            for VGA boards using chipsets from Cirrus Logic,
  10181.                            ATI Technologies, Chips and Technologies, Everex
  10182.                            Systems, Genoa Systems, Paradise Logic, Sigma
  10183.                            Designs, STB Systems, Tecmar, Headland Technology
  10184.                            (Video 7), Orchid Technology, Appian Technology,
  10185.                            Trident Microsystems, and Oak Technology.
  10186.  
  10187.  
  10188.                Other SVGA  If Alchemy cannot find a VESA SVGA board it
  10189.                            attempts to determine what kind of SVGA board is
  10190.                            present.
  10191.  
  10192.  
  10193.                            The 320x200x256 mode is a standard IBM VGA mode
  10194.                            and will work on all VGA boards.  The 360x480x256
  10195.                            is a non-standard VGA mode which should also work
  10196.                            on all VGA boards.
  10197.  
  10198.                            Because of various incompatibilities between
  10199.                            different VGA boards, 640x400x256 and/or
  10200.                            640x480x256 modes are not supported on some VGA
  10201.                            boards.  VGA boards which have been tested for the
  10202.                            higher resolution modes include Paradise, Tseng
  10203.                            Labs 3000 & 4000, Video 7, Trident, and Everex
  10204.                            chipset based VGA Boards.
  10205.  
  10206.  
  10207.  
  10208.                                                    Image Alchemy          163
  10209.  
  10210.  
  10211.  
  10212.  
  10213.  
  10214.           General          Unless you explicitly specify a resolution,
  10215.                            Alchemy automatically uses the lowest resolution
  10216.                            mode which will display the entire picture.
  10217.  
  10218.  
  10219.                            The image will be positioned so that its center
  10220.                            coincides with that of the display.
  10221.  
  10222.  
  10223.  
  10224.  
  10225.  
  10226.  
  10227.  
  10228.  
  10229.  
  10230.  
  10231.  
  10232.  
  10233.  
  10234.  
  10235.  
  10236.  
  10237.  
  10238.  
  10239.  
  10240.  
  10241.  
  10242.  
  10243.  
  10244.  
  10245.  
  10246.  
  10247.  
  10248.  
  10249.  
  10250.  
  10251.  
  10252.  
  10253.  
  10254.  
  10255.  
  10256.  
  10257.  
  10258.  
  10259.  
  10260.  
  10261.  
  10262.  
  10263.  
  10264.  
  10265.  
  10266.  
  10267.           164          Image Alchemy
  10268.  
  10269.  
  10270.  
  10271.  
  10272.           Offset View                                               -_
  10273.  
  10274.  
  10275.           Purpose          The offset view option is used to position the
  10276.                            image on the screen during viewing.
  10277.  
  10278.           Syntax           -_ xOffset yOffset (dash underscore)
  10279.  
  10280.           Parameter        xOffset  Number of pixels to shift the image
  10281.                            horizontally.
  10282.  
  10283.                            yOffset  Number of pixels to shift the image
  10284.                            vertically.
  10285.  
  10286.           Example
  10287.  
  10288.  
  10289.                            View moving the image up 100 pixels:
  10290.  
  10291.                                 alchemy madonna.gif -v -_ 0 -100
  10292.  
  10293.                            View moving the image to the right 200 pixels and
  10294.                            down 50 pixels:
  10295.  
  10296.                                 alchemy madonna.gif -v -_ 200 50
  10297.  
  10298.  
  10299.  
  10300.  
  10301.  
  10302.  
  10303.  
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.  
  10325.  
  10326.                                                    Image Alchemy          165
  10327.  
  10328.  
  10329.  
  10330.  
  10331.           View Image                                                -v
  10332.  
  10333.  
  10334.           Purpose          View file.
  10335.  
  10336.           Syntax           -v horizontalResolution
  10337.  
  10338.           Parameter        horizontalResolution
  10339.                                 320:Use 320x200 mode
  10340.                                 360:Use 360x480 mode
  10341.                                 640:Use 640x480 mode
  10342.                                 800:Use 800x600 mode
  10343.                                 1024:Use 1024x768 mode
  10344.                                 1280:Use 1280x1024 mode
  10345.  
  10346.           Comments         If displaying on a Western Digital chipset 8514/A
  10347.                            or VESA compatible VGA, an optional parameter may
  10348.                            follow the -v command.  This parameter specifies
  10349.                            horizontal resolution and may be 320, 360, 640,
  10350.                            800, 1024, or 1280.  The default is to use the
  10351.                            lowest resolution which can fit the entire image.
  10352.  
  10353.                            If the image is true colour, a uniform palette
  10354.                            will be used and the image will be dithered
  10355.                            (dithering may be disabled by use of the -d
  10356.                            option, see above).  See Appendix B, Colour and
  10357.                            Dithering, for more information.
  10358.  
  10359.           Related options  -V   Reduce image to fit display
  10360.  
  10361.           Example          View the image madonna.gif:
  10362.  
  10363.                                 alchemy madonna.gif -v
  10364.  
  10365.  
  10366.  
  10367.  
  10368.  
  10369.  
  10370.  
  10371.  
  10372.  
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.  
  10382.  
  10383.  
  10384.  
  10385.           166          Image Alchemy
  10386.  
  10387.  
  10388.  
  10389.  
  10390.           View Image in True Colour Mode                           --v
  10391.  
  10392.  
  10393.           Purpose          View file using 15, 16, or 24 bits/pixel mode.
  10394.                            This allows true colour images to be viewed
  10395.                            without dithering to a uniform palette.
  10396.  
  10397.           Syntax           --v horizontalResolution
  10398.  
  10399.           Parameter        horizontalResolution
  10400.                                 640:Use 640x480 mode
  10401.                                 800:Use 800x600 mode
  10402.                                 1024:Use 1024x768 mode
  10403.                                 1280:Use 1280x1024 mode
  10404.  
  10405.           Comments         Resolutions above 640x480 are only supported by
  10406.                            SVGA boards with a VESA driver.  640x480 mode is
  10407.                            supported for various SVGA boards with sufficient
  10408.                            memory and the correct DAC.
  10409.  
  10410.                            Alchemy automatically picks the highest colour
  10411.                            resolution which will fit the image you are trying
  10412.                            to view.  For example, if your  SVGA boards
  10413.                            supports 800x600x15 bit and 640x480x24 bit,
  10414.                            Alchemy will use the 640x480x24 bit mode when
  10415.                            viewing images which are 640x480 and smaller and
  10416.                            the 800x600 mode when viewing larger images.  You
  10417.                            can of course override this by giving Alchemy a
  10418.                            resolution parameter after the view command (for
  10419.                            example, --v 640, to view in 640x480x24 bit mode).
  10420.  
  10421.           Example          View madonna.tga:
  10422.  
  10423.                                 alchemy madonna.tga --v
  10424.  
  10425.  
  10426.  
  10427.  
  10428.  
  10429.  
  10430.  
  10431.  
  10432.  
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.  
  10441.  
  10442.  
  10443.  
  10444.                                                    Image Alchemy          167
  10445.  
  10446.  
  10447.  
  10448.  
  10449.           View Scaled Image                                         -V
  10450.  
  10451.  
  10452.           Purpose          View image while scaling image to fit on monitor
  10453.                            and correcting aspect ratio.
  10454.  
  10455.           Syntax           -V horizontalResolution
  10456.  
  10457.           Parameter        horizontalResolution
  10458.                                 320:Use 320x200 mode
  10459.                                 360:Use 360x480 mode
  10460.                                 640:Use 640x480 mode
  10461.                                 800:Use 800x600 mode
  10462.                                 1024:Use 1024x768 mode
  10463.                                 1280:Use 1280x1024 mode
  10464.  
  10465.           Comments         This command will scale the image and correct the
  10466.                            aspect ratio of the image by removing rows and/or
  10467.                            columns from the image.
  10468.  
  10469.                            Note that this option can also be useful for
  10470.                            displaying images which are not larger than the
  10471.                            screen but which have an aspect ratio different
  10472.                            than the display.
  10473.  
  10474.           Limitations      Alchemy assumes that the aspect ratio of a display
  10475.                            pixel is 1:1 when in 640x480, 800x600, 1024x768,
  10476.                            and 1280x1024 modes, 5:6 when in 640x400 mode and
  10477.                            320x200 modes, and 16:9 in 360x480 mode.
  10478.  
  10479.                            If not otherwise specified by using the -D option
  10480.                            or in the file, Alchemy assumes that the aspect
  10481.                            ratio of pixels in 640x400 images and 320x200
  10482.                            images is 5:6 and the aspect ratio of pixels in
  10483.                            640x350 images is 35:48.  You can override any of
  10484.                            these assumptions with the -D option.
  10485.  
  10486.                            Don't worry if this is confusing;  in practice
  10487.                            Alchemy deals with everything automatically if you
  10488.                            use the -V option.  However, there is a problem
  10489.                            with displaying 320x400 IFF files; see Appendix A,
  10490.                            Answers to Frequently Asked Questions, for more
  10491.                            information.
  10492.  
  10493.           Related options  -D   Specify image resolution
  10494.                            -v   View image
  10495.  
  10496.           Example          View madonna.gif:
  10497.  
  10498.                                 alchemy madonna.gif -V
  10499.  
  10500.  
  10501.  
  10502.  
  10503.           168          Image Alchemy
  10504.  
  10505.  
  10506.  
  10507.  
  10508.           View Scaled Image in True Colour Mode                    --V
  10509.  
  10510.  
  10511.           Purpose          View image in 15 bit mode while scaling image to
  10512.                            fit on monitor and correcting aspect ratio.
  10513.  
  10514.           Syntax           --V horizontalResolution
  10515.  
  10516.           Parameter        horizontalResolution
  10517.                                 640:Use 640x480 mode
  10518.                                 800:Use 800x600 mode
  10519.                                 1024:Use 1024x768 mode
  10520.                                 1280:Use 1280x1024 mode
  10521.  
  10522.           Comments         Requires either a Tseng 4000 equipped SVGA, an S3
  10523.                            equipped SVGA board, or a VESA compatible SVGA
  10524.                            board with a Sierra DAC and 1 Megabyte of memory
  10525.                            on the SVGA board.
  10526.  
  10527.                            This command will scale the image and correct the
  10528.                            aspect ratio of the image by removing rows and/or
  10529.                            columns from the image.
  10530.  
  10531.                            Note that this option can also be useful for
  10532.                            displaying images which are not larger than the
  10533.                            screen but which have an aspect ratio different
  10534.                            than the display.
  10535.  
  10536.           Limitations      The same limitations as for scaled 8 bit viewing
  10537.                            apply (see page 7-7 in the User's Manual).
  10538.  
  10539.           Related options  -D   Specify image resolution
  10540.                            --v  View image in 15 bit mode
  10541.  
  10542.           Example          View sample.jpg:
  10543.  
  10544.                                 alchemy sample.jpg --V
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.  
  10559.  
  10560.  
  10561.  
  10562.                                                    Image Alchemy          169
  10563.  
  10564.  
  10565.  
  10566.  
  10567.                                                                             9
  10568.  
  10569.  
  10570.  
  10571.           Tutorial and Examples
  10572.           -------------------------------------------------------------------
  10573.  
  10574.  
  10575.           Introduction     This section gives a sample session of using the
  10576.                            command-line version of Alchemy.  It is assumed
  10577.                            that you have installed Alchemy as instructed by
  10578.                            the installation section of the manual.  The
  10579.                            sample image file, sample.jpg, which can be found
  10580.                            in the samples directory on the distribution disk
  10581.                            or tape, must be in the current directory.
  10582.  
  10583.           Examples         We will use the sample.jpg image supplied in the
  10584.                            \samples directory.  The first step is to copy
  10585.                            this into the directory with Alchemy.
  10586.  
  10587.                                 copy samples\sample.jpg
  10588.  
  10589.                            Now we will convert this JPEG file to a GIF file.
  10590.                            Notice that we don't have to specify an output
  10591.                            file name.  Alchemy will automatically supply the
  10592.                            name sample.gif.
  10593.  
  10594.                                 alchemy sample.jpg -g
  10595.  
  10596.                            We can then view this GIF file using Image Alchemy
  10597.                            (assuming you have a compatible Super VGA card):
  10598.  
  10599.                                 alchemy sample.gif -v
  10600.  
  10601.                            To convert the sample.gif file to a PCX file
  10602.                            called test1.pcx do the following:
  10603.  
  10604.                                 alchemy sample.gif test1.pcx -p
  10605.  
  10606.                            You can now view this file by doing:
  10607.  
  10608.                                 alchemy test1 -v
  10609.  
  10610.                            Note here that Alchemy automatically added the
  10611.                            extension .pcx since none was supplied.
  10612.  
  10613.                            Let us now convert the test1.pcx file to a small
  10614.                            TIFF file called test1.tif, we will scale the TIFF
  10615.                            file to be 200x100 pixels.  To perform the scaling
  10616.                            we will use -X and -Y options:
  10617.  
  10618.                                 alchemy test1.pcx -t -Xb200 -Yb100
  10619.  
  10620.  
  10621.           170          Image Alchemy
  10622.  
  10623.  
  10624.  
  10625.  
  10626.                            In this case we specified that Alchemy should use
  10627.                            type B scaling.  This is a good scaling type to
  10628.                            use for general purpose scaling (type A scaling is
  10629.                            faster but not as good a quality, whereas Type C
  10630.                            and Type D scaling are better quality but slower).
  10631.  
  10632.                            You can now view this TIFF file by using:
  10633.  
  10634.                                 alchemy test1.tif -v
  10635.  
  10636.                            If you had wanted to view it using the standard
  10637.                            VGA mode 320x200 you could have used:
  10638.  
  10639.                                 alchemy test1.tif -v320
  10640.  
  10641.                            To convert this TIFF file to a gray-scale PCX file
  10642.                            use
  10643.  
  10644.                                 alchemy test1.tif -b -p -o
  10645.  
  10646.                            The -b option indicates black and white and the -o
  10647.                            option tells Alchemy that it is okay to overwrite
  10648.                            the existing test1.pcx file.
  10649.  
  10650.                            You can now view this PCX file by using:
  10651.  
  10652.                                 alchemy test1.pcx -v
  10653.  
  10654.  
  10655.  
  10656.                            To convert the JPEG file sample.jpg to a Targa
  10657.                            file called sample.tga use the following command:
  10658.  
  10659.                                 alchemy -a sample.jpg
  10660.  
  10661.                            To convert the 24 bit Targa file sample.tga to a
  10662.                            256 colour GIF file called new.gif:
  10663.  
  10664.                                 alchemy -g sample.tga new.gif
  10665.  
  10666.                            To convert the 256 colour GIF file, new.gif, to a
  10667.                            64 colour PCX file called new.pcx:
  10668.  
  10669.                                 alchemy -p -c64 new.gif
  10670.  
  10671.                            To view the GIF file new.gif (only applicable on
  10672.                            IBM PCs with appropriate VGA board):
  10673.  
  10674.                                 alchemy -v new.gif
  10675.  
  10676.  
  10677.  
  10678.  
  10679.  
  10680.                                                    Image Alchemy          171
  10681.  
  10682.  
  10683.  
  10684.  
  10685.                            To convert sample.jpg to a black and white, two
  10686.                            colour GIF file use a text editor to create a file
  10687.                            called BW.PAL which contains the following:
  10688.  
  10689.                                 PAL
  10690.                                 2
  10691.                                 0 0 0
  10692.                                 255 255 255
  10693.  
  10694.                            then:
  10695.  
  10696.                                 alchemy -g sample.jpg -f bw.pal
  10697.  
  10698.                            (Alternatively, you could have said alchemy -g
  10699.                            sample.jpg -b -c2, but that wouldn't have
  10700.                            demonstrated the -f option).
  10701.  
  10702.                            To view the resulting file in 320x200x256 mode,
  10703.                            scaling the image to fit the display:
  10704.  
  10705.                                 alchemy -V320 sample.gif
  10706.  
  10707.                            To create a LZW compressed TIFF file called
  10708.                            new.tif which is 320x240 from the targa file
  10709.                            created earlier, using good quality scaling:
  10710.  
  10711.                                 alchemy sample.tga -t1 -Xb320 -+ new.tif
  10712.  
  10713.  
  10714.  
  10715.  
  10716.  
  10717.  
  10718.  
  10719.  
  10720.  
  10721.  
  10722.  
  10723.  
  10724.  
  10725.  
  10726.  
  10727.  
  10728.  
  10729.  
  10730.  
  10731.  
  10732.  
  10733.  
  10734.  
  10735.  
  10736.  
  10737.  
  10738.  
  10739.           172          Image Alchemy
  10740.  
  10741.  
  10742.  
  10743.  
  10744.                                                                             A
  10745.  
  10746.  
  10747.  
  10748.           Answers to Frequently Asked Questions
  10749.           -------------------------------------------------------------------
  10750.  
  10751.  
  10752.  
  10753.                  Question  When I view a JPEG compressed image on my VGA
  10754.                            board it looks much worse than when I first
  10755.                            convert it to a GIF file and then view it.  Why is
  10756.                            this?
  10757.  
  10758.                    Answer  To save time Alchemy automatically uses a uniform
  10759.                            palette when you are just viewing a true colour
  10760.                            image.  When converting to a different file format
  10761.                            Alchemy uses Heckbert quantization to generate a
  10762.                            palette.  The difference in image quality is the
  10763.                            difference between using a uniform palette and an
  10764.                            optimum palette.  See Appendix B, Colour and
  10765.                            Dithering, for more information on palette
  10766.                            generation.
  10767.  
  10768.  
  10769.                  Question  Why can't my paint package read the Targa file I
  10770.                            wrote with Image Alchemy?
  10771.  
  10772.                    Answer  Some software which reads Targa files cannot
  10773.                            handle compressed files.  In addition, some
  10774.                            software can read true colour Targa files, but
  10775.                            cannot read paletted or gray-scale files.  Image
  10776.                            Alchemy can be forced to write out a true colour
  10777.                            file by using the -24 option.
  10778.  
  10779.  
  10780.                  Question  I told Alchemy to convert a PCX file to an 8 bit
  10781.                            GIF file (using the -8 option).  Yet when I get
  10782.                            statistics on the file (using -x) Alchemy reports
  10783.                            the file only has 16 colours.
  10784.  
  10785.                    Answer  Alchemy will always store the file using the
  10786.                            smallest bits-per-pixel allowable for the given
  10787.                            image (this results in the smallest possible
  10788.                            file).  In this case the input file only had 16
  10789.                            colours in it.
  10790.  
  10791.  
  10792.  
  10793.  
  10794.  
  10795.  
  10796.  
  10797.  
  10798.                                                    Image Alchemy          173
  10799.  
  10800.  
  10801.  
  10802.  
  10803.                            Things get more unpredictable with formats such as
  10804.                            Sun Raster (which requires 1 bit files to be black
  10805.                            and white) and SGI (which requires 8 bit files to
  10806.                            be gray-scale).  In these cases Alchemy will
  10807.                            always do the best it can (giving you a warning
  10808.                            message if it does something which may surprise
  10809.                            you later).
  10810.  
  10811.  
  10812.                  Question  Why is decompressing or compressing a JPEG image
  10813.                            so slow?
  10814.  
  10815.                    Answer  There are a large number of calculations that have
  10816.                            to be done during JPEG compression.  This is an
  10817.                            inherent limitation of JPEG compression.  Image
  10818.                            Alchemy has been optimized quite a bit to reduce
  10819.                            the number of calculations, and we are working to
  10820.                            further reduce the number of calculations.  If you
  10821.                            are transferring files over modems or storing them
  10822.                            on slow media (tape) the compression times are
  10823.                            usually more than made up for by the decrease in
  10824.                            transmission or retrieval times.
  10825.  
  10826.  
  10827.                  Question  Why can't my favorite desktop publishing package
  10828.                            read the TIFF file I wrote with Image Alchemy?
  10829.  
  10830.                    Answer  Tagged Interchange File FormatTIFF is an extremely
  10831.                            versatile standard; it can handle anything from 1
  10832.                            bit images to full colour images with an alpha
  10833.                            channel.  Also, TIFF allows many different types
  10834.                            of compression.  Unfortunately this versatility
  10835.                            means that it's difficult for a single piece of
  10836.                            software to be able to read in every valid TIFF
  10837.                            file.
  10838.  
  10839.  
  10840.                            If the software specifies the classes of TIFF it
  10841.                            can read, you can force Alchemy to write out a
  10842.                            specific TIFF class by using the following
  10843.                            options:
  10844.                               class B: -8 -b -c2 -t2
  10845.                               class G: -8 -b -t1
  10846.                               class P: -8 -t1
  10847.                               class R: -24 -t1
  10848.  
  10849.                            Class B is black and white, Class G is gray-scale,
  10850.                            Class P is paletted, and Class R is true colour.
  10851.  
  10852.  
  10853.  
  10854.  
  10855.  
  10856.  
  10857.           174          Image Alchemy
  10858.  
  10859.  
  10860.  
  10861.  
  10862.                            If the supported classes are not specified,
  10863.                            experiment with various combinations of -24, -8, -
  10864.                            b, and -c.  In this case it is usually best to use
  10865.                            no compression (-t0) while experimenting with the
  10866.                            other options, as many TIFF readers have
  10867.                            difficulty with compressed files.  When you find a
  10868.                            set of options that work, then you can try various
  10869.                            compression modes to save space.  Be aware that
  10870.                            using the -b option will force the output file to
  10871.                            be gray-scale and you will lose the colour
  10872.                            information in the file (most desktop publishing
  10873.                            programs only have support for gray-scale TIFF
  10874.                            files).
  10875.  
  10876.  
  10877.                            You may also have to use the -Dn n option to
  10878.                            specify the resolution of the image (this is
  10879.                            especially true when converting from a file format
  10880.                            which does not have a value for image resolution).
  10881.                            You can generally tell if this is necessary
  10882.                            because the program you are using to read in the
  10883.                            TIFF file will claim that the file is unreasonably
  10884.                            large or small.  Generally, if you are using a 300
  10885.                            DPI Laser Printer you want to make the TIFF file
  10886.                            300DPI x 300DPI (-D 300 300).
  10887.  
  10888.  
  10889.                            If you would like further information specific to
  10890.                            using Image Alchemy with your word processor or
  10891.                            desktop publishing program please contact us; we
  10892.                            will be maintaining a list of how to make Alchemy
  10893.                            work with other software packages.  Similarly if
  10894.                            you figure out how to import files into a specific
  10895.                            package let us know and we will add your tips to
  10896.                            our documentation.
  10897.  
  10898.  
  10899.  
  10900.  
  10901.  
  10902.  
  10903.  
  10904.  
  10905.  
  10906.  
  10907.  
  10908.  
  10909.  
  10910.  
  10911.  
  10912.  
  10913.  
  10914.  
  10915.  
  10916.                                                    Image Alchemy          175
  10917.  
  10918.  
  10919.  
  10920.  
  10921.                  Question  I've converted a Mac PICT file to a GIF file, but
  10922.                            the GIF file is missing some or all of the
  10923.                            information that was in the PICT file.  What
  10924.                            happened to it?
  10925.  
  10926.                    Answer  PICT files are a combination of drawing commands
  10927.                            (such as lines, rectangles, and circles) and
  10928.                            raster areas (called pixMaps).  Alchemy can only
  10929.                            read the raster portions of the files.  Programs
  10930.                            such as MacDraw and MacDraft write out files with
  10931.                            drawing commands, programs such as MacPaint write
  10932.                            out files which are entirely raster areas
  10933.                            (pixMaps), and some programs, such as SuperPaint
  10934.                            can write out files which are either, or a
  10935.                            combination of both.  If you are using such a
  10936.                            program check the documentation on how to write
  10937.                            out files in "paint" mode.
  10938.  
  10939.  
  10940.                  Question  When I convert a GIF file to a JPEG file and then
  10941.                            back to a GIF file the final GIF file is twice the
  10942.                            size of the original.  Why is this?
  10943.  
  10944.                    Answer  There are two things which might cause this to
  10945.                            happen:
  10946.  
  10947.  
  10948.                            JPEG compression doesn't really work well for
  10949.                            images which have large areas which are all the
  10950.                            same colour.  The reason for this is that JPEG is
  10951.                            a lossy compression technique.  Therefore you are
  10952.                            not going to get back exactly the same values for
  10953.                            each pixel in an area that was one solid colour
  10954.                            before being JPEG compressed.  But GIF compression
  10955.                            works much better on areas which are one solid
  10956.                            colour, so, when you GIF compress these areas,
  10957.                            they are quite a bit larger than they were before.
  10958.                            The solution to this problem is to use HSI JPEG
  10959.                            compression, which automatically detects large
  10960.                            areas of solid colours and does not JPEG compress
  10961.                            them.  The problem with HSI JPEG compression is
  10962.                            that it isn't compatible with JPEG or JFIF.
  10963.  
  10964.  
  10965.  
  10966.  
  10967.  
  10968.  
  10969.  
  10970.  
  10971.  
  10972.  
  10973.  
  10974.  
  10975.           176          Image Alchemy
  10976.  
  10977.  
  10978.  
  10979.  
  10980.                            The other possibility is that the input GIF file
  10981.                            didn't have very many different colours.  When you
  10982.                            converted it to a JPEG file the number of colours
  10983.                            in the file was lost (JPEG gray-scale files always
  10984.                            use 256 shades, and JPEG colour files are always
  10985.                            true colour).  When the JPEG file was converted
  10986.                            back to a GIF file Alchemy assumed you wanted 256
  10987.                            colours in the file, and a 256 colour GIF file is
  10988.                            bigger than a 16 colour GIF file.  To prevent this
  10989.                            you can use a -c32 (or however many colours the
  10990.                            original had) option in the command line; this
  10991.                            forces Image Alchemy to use that many colours for
  10992.                            the output file.
  10993.  
  10994.  
  10995.                  Question  I keep getting "Out of Memory trying to ..."
  10996.                            messages.  Help!
  10997.  
  10998.                    Answer  Image Alchemy is running out of memory.  First try
  10999.                            to do the conversion again with the -$ (conserve
  11000.                            memory) option.  Next, if that doesn't help,
  11001.                            attempt to maximize the amount of memory available
  11002.                            by removing as many memory resident programs as
  11003.                            you can.  If this still doesn't help please
  11004.                            contact us with the following information: your
  11005.                            computer configuration (amount of available
  11006.                            memory, size of hard disk), operating system
  11007.                            version, and what you are trying to do (input file
  11008.                            information (size of image and type of file) and
  11009.                            options specified).  Alchemy can generally convert
  11010.                            images as larger than 2000 pixels wide and a
  11011.                            virtually unlimited number of pixels tall.
  11012.                            However there are certain conversions which
  11013.                            require more memory than others.
  11014.  
  11015.  
  11016.                  Question  I am using Alchemy to display a 320x400 IFF image
  11017.                            created by an Amiga.  When I use just the -v
  11018.                            option the image comes out tall and skinny.  When
  11019.                            I use the -V option, which is supposed to correct
  11020.                            the aspect ratio, things get worse instead of
  11021.                            better (the image is even skinnier).  What's going
  11022.                            on?
  11023.  
  11024.                    Answer  As near as we can tell, some Amiga software has a
  11025.                            different idea of what aspect ratio is than the
  11026.                            rest of the world.
  11027.  
  11028.  
  11029.  
  11030.  
  11031.  
  11032.  
  11033.  
  11034.                                                    Image Alchemy          177
  11035.  
  11036.  
  11037.  
  11038.  
  11039.                            For displays, aspect ratio is defined as the ratio
  11040.                            of the width of a single pixel to the height of a
  11041.                            single pixel.  So if you have square pixels (which
  11042.                            you do on a standard monitor in 640x480 mode) the
  11043.                            aspect ratio is 1 to 1 (commonly written as 1:1).
  11044.                            When you change display modes the height and width
  11045.                            of the total display area does not change; what is
  11046.                            changing is the width and height of each pixel,
  11047.                            which means that the aspect ratio changes.  For
  11048.                            example, a 640x400 display has an aspect ratio of
  11049.                            1:1.2 (that means each pixel is 1.2 times as tall
  11050.                            as it is wide (which makes sense since 480/400
  11051.                            equals 1.2)).  A 640x200 display has an aspect
  11052.                            ratio of 1:2.4.
  11053.  
  11054.  
  11055.                            Now this is where it gets interesting in terms of
  11056.                            IFF files.  The aspect ratio number stored in
  11057.                            Amiga IFF files for 320x400 images is 1:1.1,
  11058.                            meaning pixels are 1.1 times as tall as they are
  11059.                            wide, so therefore the actual image should be the
  11060.                            equivalent size of a 320x440 image with square
  11061.                            pixels.  And this is what Alchemy will attempt to
  11062.                            display when you use the -V option (Alchemy never
  11063.                            makes any dimension larger, so the actual image
  11064.                            Alchemy displays is 291x400, which is the same
  11065.                            ratio as 320x440).  However this is obviously
  11066.                            wrong, as you can tell when you examine an image.
  11067.                            As near as we can tell the correct aspect ratio of
  11068.                            these images is 5:3 (the math we used to come up
  11069.                            with this number is 640/320:480/400).  And if you
  11070.                            tell Alchemy to override the aspect ratio by using
  11071.                            a -D 167 option (167 because 5/3*100 is 166.6666)
  11072.                            the image displays correctly.  Why Amigas create
  11073.                            images which claim they are 1:1.1 remains a
  11074.                            mystery.
  11075.  
  11076.  
  11077.  
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.  
  11090.  
  11091.  
  11092.  
  11093.           178          Image Alchemy
  11094.  
  11095.  
  11096.  
  11097.  
  11098.                  Question  When I convert a 32 bit Targa file to a GIF file
  11099.                            and then to a JPEG file it doesn't look nearly as
  11100.                            good as if I convert the Targa File directly to
  11101.                            the JPEG file.  What can I do to maintain high
  11102.                            quality in JPEG compressed files?
  11103.  
  11104.                    Answer  When the Targa file was converted to the GIF file
  11105.                            Image Alchemy had to reduce the number of colours
  11106.                            in the file (the original Targa File had up to 16
  11107.                            million colours, GIF files are limited to 256
  11108.                            colours).  This step is known as colour
  11109.                            quantization (Image Alchemy uses the Heckbert
  11110.                            Median Cut method for quantization, see Appendix
  11111.                            B, Colour and Dithering, for more information).
  11112.                            The difficulty with colour quantization is that it
  11113.                            leaves artifacts known as colour banding.  To
  11114.                            reduce this phenomenon Image Alchemy dithers the
  11115.                            image (you can see the effect of colour banding by
  11116.                            turning off dithering by using the -d0 option).
  11117.                            Unfortunately a dithered image does not JPEG
  11118.                            compress very well (dithering adds a lot of high-
  11119.                            frequency information to an image; JPEG
  11120.                            compression attempts to remove much of that
  11121.                            information).  In addition JPEG images are always
  11122.                            continuous colour images, so when the JPEG file is
  11123.                            decompressed it has to be colour quantized and
  11124.                            dithered again.  Dithering a previously dithered
  11125.                            image reduces the quality even more.  The solution
  11126.                            is to use the best starting quality you can for
  11127.                            JPEG compression, ideally a continuous tone image.
  11128.                            The compressed image size will be smaller than if
  11129.                            you had started with a paletted image and the
  11130.                            quality will be better.
  11131.  
  11132.  
  11133.                  Question  I've converted an HP PCL file to a GIF file, but
  11134.                            the GIF file is missing some or all of the
  11135.                            information that was in the PCL file.  What
  11136.                            happened to it?
  11137.  
  11138.                    Answer  PCL files have the same problem as PICT files (see
  11139.                            above); they are a combination of drawing commands
  11140.                            (such as lines and rectangles) and raster areas
  11141.                            (called rasters) and Alchemy can only convert the
  11142.                            raster areas in PCL files.  PCL Files also contain
  11143.                            font and text information, which is also lost.
  11144.                            Unfortunately there isn't any general way to
  11145.                            preserve this data with Alchemy.
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.  
  11152.                                                    Image Alchemy          179
  11153.  
  11154.  
  11155.  
  11156.  
  11157.                            One thing which you can do if running Microsoft
  11158.                            Windows 3.0 is to install Adobe Type Manager
  11159.                            (ATM).  ATM automatically intercepts any text
  11160.                            commands and converts them to rasters.  In
  11161.                            addition, the standard Windows 3.0 HP PCL driver
  11162.                            only generates rasters, not vectors.  So the file
  11163.                            will appear in its entirety when converted by
  11164.                            Alchemy.  Contact us if you want further
  11165.                            information on using Alchemy with Windows 3.0.
  11166.  
  11167.  
  11168.                  Question  Why can't Image Alchemy read in JPEG files
  11169.                            produced by Kodak's ColorSqueeze (or Sun's
  11170.                            VFCtool)?
  11171.  
  11172.                    Answer  The JPEG standard is still in draft form.  Until
  11173.                            it is a mature standard, various manufacturer's
  11174.                            will implement different versions of it.  As of
  11175.                            March 1, 1991 Image Alchemy supports the JFIF
  11176.                            format and should work with any other JPEG
  11177.                            software which also claims JFIF compatibility.  If
  11178.                            other software you are using claims to support the
  11179.                            JFIF format and you are having trouble please
  11180.                            contact us.  If the other software does not
  11181.                            support JFIF, contact the manufacturer and tell
  11182.                            them they should send you an update which does
  11183.                            (you can tell them to contact us if they need a
  11184.                            copy of the JFIF standard).
  11185.  
  11186.  
  11187.                  Question  I converted a PCX file with 16 colours to a 16
  11188.                            shades of gray TIFF file using the -b and -t
  11189.                            options.  The 16 colour PCX file had some shades
  11190.                            of gray in it which were changed in the TIFF file.
  11191.                            How can I prevent this?
  11192.  
  11193.                    Answer  The problem is that gray-scale TIFF files have a
  11194.                            uniformly spaced gray palette.  If you create a
  11195.                            TIFF file with 16 shades of gray it will have the
  11196.                            following shades in it: 0, 17, 34, 51, 68, 85,
  11197.                            102, 119, 136, 153, 170, 187, 204, 221, 238, and
  11198.                            255.  However the 16 colour PCX file you started
  11199.                            with probably didn't have those exact colours in
  11200.                            it (for example, PCX files written out by
  11201.                            Windows 3.0 Paint have shades of gray which
  11202.                            correspond to 0, 128, 192, and 255).  So Alchemy
  11203.                            did the best it could and matched the input
  11204.                            colours to the output colours (and depending on
  11205.                            the other options that you specified may also have
  11206.                            dithered the image).
  11207.  
  11208.  
  11209.  
  11210.  
  11211.           180          Image Alchemy
  11212.  
  11213.  
  11214.  
  11215.  
  11216.                            The solution is to tell Alchemy to write out a 256
  11217.                            colour gray-scale TIFF file (which you do by
  11218.                            adding a -c256 to the -b and -t options).  This
  11219.                            file still has a uniform gray palette; but that
  11220.                            palette now contains every colour:  0, 1, 2, 3,
  11221.                            ..., 255.  Therefore Alchemy can map, for example,
  11222.                            the colours 128 and 192 to their exact match.
  11223.                            This does have the disadvantage of making the
  11224.                            resulting 256 colour TIFF file twice as large as
  11225.                            the 16 colour TIFF file, but this is the only way
  11226.                            to guarantee that Alchemy can find an exact match
  11227.                            for all the shades of gray in the input file.
  11228.  
  11229.  
  11230.                  Question  Why do you only allow specifying image resolution
  11231.                            in Dots Per Inch?  Don't you realize that most of
  11232.                            the world is metric?
  11233.  
  11234.                    Answer  Yes, we do realize that the entire world, with the
  11235.                            exception of the United States and Great Britain,
  11236.                            claims to use the metric system exclusively (and
  11237.                            Great Britain will presumably change in 1992).
  11238.                            However, this isn't actually true.  A laser
  11239.                            printer manufactured in Japan is still 300 dots
  11240.                            per inch (not 11.811... dots per mm) and a 19 inch
  11241.                            monitor sold in Europe is called a 19 inch monitor
  11242.                            (actually a 19 inch monitor is called a 20 inch
  11243.                            monitor in Europe, which is a measure of the total
  11244.                            picture tube diagonal, not just the viewing area).
  11245.  
  11246.                  Question  How do I get a copy of the current draft JPEG
  11247.                            standard?
  11248.  
  11249.                    Answer  The JPEG standard is a ISO/IEC standard currently
  11250.                            in Committee Draft form.
  11251.  
  11252.                            Contact your local ISO/IEC office to get a copy.
  11253.                            The reference numbers are ISO/IEC JTC 1 and /SC 2
  11254.                            N2215; the document number is ISO/IEC CD 10918-1.
  11255.  
  11256.                            In the United States you can contact ANSI at:
  11257.                               ANSI
  11258.                               11 West 42nd St.
  11259.                               New York, NY  10036
  11260.                               (212) 642-4900
  11261.  
  11262.  
  11263.                  Question  Do you give multiple copy discounts?  Do you have
  11264.                            site licenses?  Are you interested in licensing
  11265.                            the source code?
  11266.  
  11267.                    Answer  Yes.  Yes.  Yes.  Contact us for more information.
  11268.  
  11269.  
  11270.                                                    Image Alchemy          181
  11271.  
  11272.  
  11273.  
  11274.  
  11275.  
  11276.  
  11277.  
  11278.  
  11279.  
  11280.  
  11281.  
  11282.  
  11283.  
  11284.  
  11285.  
  11286.  
  11287.  
  11288.  
  11289.  
  11290.  
  11291.  
  11292.  
  11293.  
  11294.  
  11295.  
  11296.  
  11297.  
  11298.  
  11299.  
  11300.  
  11301.  
  11302.  
  11303.  
  11304.  
  11305.  
  11306.  
  11307.  
  11308.  
  11309.  
  11310.  
  11311.  
  11312.  
  11313.  
  11314.  
  11315.  
  11316.  
  11317.  
  11318.  
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.  
  11326.  
  11327.  
  11328.  
  11329.           182          Image Alchemy
  11330.  
  11331.  
  11332.  
  11333.  
  11334.                                                                             B
  11335.  
  11336.  
  11337.  
  11338.           Colour and Dithering
  11339.           -------------------------------------------------------------------
  11340.  
  11341.  
  11342.           Paletted vs.     Colour images are normally stored in one of two
  11343.           true colour      ways: as an array of direct colour values (usually
  11344.                            red, green, and blue) (referred to as a true
  11345.                            colour file in this document) or as an array of
  11346.                            indices into a colour-map which contains red,
  11347.                            green, and blue colour values (referred to as a
  11348.                            paletted file in this document).
  11349.  
  11350.  
  11351.                            The reason for the existence of paletted images is
  11352.                            that they take less memory, so the hardware to
  11353.                            display them is less expensive.  The dominance of
  11354.                            paletted hardware is changing as the price of
  11355.                            memory and the processing power it takes to update
  11356.                            large amounts of memory at a reasonable speed
  11357.                            drops (a Targa 32 board is an example of a true
  11358.                            colour board, a VGA board is an example of a
  11359.                            paletted board).
  11360.  
  11361.  
  11362.                            Until true colour graphics devices become the
  11363.                            norm, there is a need to convert images from true
  11364.                            colour to paletted.  This conversion is done in
  11365.                            two steps: the first is to generate a palette for
  11366.                            use by the image;  the second is to map the image
  11367.                            to the new palette.
  11368.  
  11369.           Colour cube      The colour model generally used by computers is a
  11370.                            cube with red, green, and blue as the axes (this
  11371.                            is known as a colour cube or RGB cube).  Each
  11372.                            point inside the cube is a different colour,
  11373.                            depending on the amount of red, green, and blue
  11374.                            used.  In nature each of the three axes is nearly
  11375.                            continuous, therefore there are a nearly infinite
  11376.                            number of colours available.  Computer hardware
  11377.                            and software represent colours in a discrete
  11378.                            fashion.
  11379.  
  11380.  
  11381.  
  11382.  
  11383.  
  11384.  
  11385.  
  11386.  
  11387.  
  11388.                                                    Image Alchemy          183
  11389.  
  11390.  
  11391.  
  11392.  
  11393.                            For true colour displays or file formats the
  11394.                            number of discrete positions along each axis of
  11395.                            the colour cube gives the colour resolution of the
  11396.                            output device.  For example, a Targa 24 board for
  11397.                            an IBM PC has 8 bits per red, green, and blue
  11398.                            channel for a total of 24 bits (or 256 discrete
  11399.                            shades of each colour, for a total of 16 million
  11400.                            colours (256x256x256)).  This is also the colour
  11401.                            resolution of most true colour file formats.
  11402.  
  11403.  
  11404.                            The new 15 bit SVGA boards have 5 bits per
  11405.                            channel, for a total of 32x32x32 different colours
  11406.                            (32,768).  This is the same colour resolution as a
  11407.                            Targa 15 file.
  11408.  
  11409.  
  11410.                            A paletted display or image file has the same
  11411.                            colour resolution limit as a true colour display
  11412.                            or image file, but in addition there is a limit on
  11413.                            how many points inside the cube can be used at the
  11414.                            same time.  An 8 bit file format, such as GIF,
  11415.                            allows 256 different colours out of 16 million.  A
  11416.                            normal SVGA board also only allows 256 different
  11417.                            colours at one time.
  11418.  
  11419.  
  11420.                            So, converting a true colour file to a paletted
  11421.                            file involves reducing the number of occupied
  11422.                            points in the colour cube.  There are several ways
  11423.                            this can be done.
  11424.  
  11425.  
  11426.           Generating a     Image Alchemy supports two methods of generating a
  11427.           palette          palette:
  11428.  
  11429.                   Uniform  The simplest and fastest method is to use a
  11430.                  palettes  palette containing colours which are uniformly
  11431.                            distributed in the RGB cube, referred to as a
  11432.                            uniform palette.  This has the advantage that it's
  11433.                            fast and the same palette can be used for any
  11434.                            image; the primary disadvantage is that most
  11435.                            images don't contain colours from everywhere in
  11436.                            the RGB cube, so palette entries are wasted
  11437.                            representing colours that aren't needed for the
  11438.                            particular image being converted.
  11439.  
  11440.  
  11441.  
  11442.  
  11443.  
  11444.  
  11445.  
  11446.  
  11447.           184          Image Alchemy
  11448.  
  11449.  
  11450.  
  11451.  
  11452.                   Optimal  To generate a palette which is better for
  11453.                  palettes  representing a particular image, Image Alchemy
  11454.                            supports Heckbert's median cut algorithm.  This
  11455.                            algorithm first builds a three dimensional table
  11456.                            (a histogram cube) indicating how popular any
  11457.                            given colour in the RGB cube is in the image being
  11458.                            converted.  It then proceeds to subdivide this
  11459.                            histogram cube (by dividing boxes in half) until
  11460.                            it has created as many boxes as there are palette
  11461.                            entries.  The decision as to where to divide a box
  11462.                            is based on the distribution of colours within the
  11463.                            box.  This algorithm attempts to create boxes
  11464.                            which have approximately equal popularity in the
  11465.                            image.
  11466.  
  11467.                            Palette entries are then assigned to represent
  11468.                            each box.  There are other methods of generating a
  11469.                            palette from an image, but Heckbert's algorithm is
  11470.                            generally regarded as the best tradeoff between
  11471.                            speed and quality.
  11472.  
  11473.  
  11474.             Modifying the  You can change the method used to select a colour
  11475.                   palette  to represent each box by use of the -z options.
  11476.                 selection
  11477.                   process  The default method is to use the mean of all the
  11478.                            colours in the box.  However for some images
  11479.                            slightly better results can be obtained by using
  11480.                            the center of the box (without regard to where the
  11481.                            pixels are in the box).
  11482.  
  11483.                            For images being reduced to a very small number of
  11484.                            colours (less than 16) better results can be
  11485.                            obtained by using a corner of the box (the boxes
  11486.                            tend to be large when reducing an image to a small
  11487.                            number of colours; therefore picking colours near
  11488.                            the centers of the boxes will give you muddy
  11489.                            colours, while using corners of the boxes will
  11490.                            give you more saturated colours).
  11491.  
  11492.  
  11493.  
  11494.           Mapping the      The next step is to map the image to the new
  11495.           image to the     palette; this is where dithering becomes
  11496.           palette          important.
  11497.  
  11498.  
  11499.  
  11500.  
  11501.  
  11502.  
  11503.  
  11504.  
  11505.  
  11506.                                                    Image Alchemy          185
  11507.  
  11508.  
  11509.  
  11510.  
  11511.              No dithering  The simplest approach is to map every colour in
  11512.                            the original image to the palette entry which is
  11513.                            closest to it (this is what Image Alchemy does if
  11514.                            you specify no dithering).
  11515.  
  11516.                            However, since the palette entries generally
  11517.                            represent several different colours in the
  11518.                            original image, this results in colour banding
  11519.                            where areas of smooth colour changes in the
  11520.                            original become areas of one solid colour in the
  11521.                            paletted version.
  11522.  
  11523.             Advantages of  This can be alleviated by dithering the image data
  11524.                 dithering  such that any given pixel might not be mapped to
  11525.                            its closest palette entry, but the average over
  11526.                            some area of the image will be closer to the
  11527.                            correct colour than it would otherwise be.  Image
  11528.                            Alchemy uses a class of algorithms called "error-
  11529.                            diffusion" to do dithering.
  11530.  
  11531.           Error diffusion  These algorithms work by using the closest palette
  11532.                 dithering  entry to a colour and then distributing the error
  11533.                            (the difference between the desired colour and the
  11534.                            chosen palette entry) to the nearby pixels.  This
  11535.                            process is repeated for every pixel in the image,
  11536.                            using the colour values which have been modified
  11537.                            due to the error from previous pixels.  The
  11538.                            different dithering algorithms spread the error
  11539.                            over a different area or use a different weighting
  11540.                            within the same area.
  11541.  
  11542.                Serpentine  Error diffusion can be done as a normal raster
  11543.                    raster  (left to right, top to bottom) or as a serpentine
  11544.                            raster (alternating left to right and right to
  11545.                            left, top to bottom).  A serpentine raster tends
  11546.                            to break up visible patterns introduced by
  11547.                            dithering.
  11548.  
  11549.                     Noise  Random noise can also be added to help break up
  11550.                            visible patterns in the resulting image.
  11551.  
  11552.  
  11553.           Further          For more information on Heckbert's median cut and
  11554.           information      dithering see the appropriate reference listed in
  11555.                            the References section below.
  11556.  
  11557.  
  11558.  
  11559.  
  11560.  
  11561.  
  11562.  
  11563.  
  11564.  
  11565.           186          Image Alchemy
  11566.  
  11567.  
  11568.  
  11569.  
  11570.                                                                             C
  11571.  
  11572.  
  11573.  
  11574.           What is JPEG Compression?
  11575.           -------------------------------------------------------------------
  11576.  
  11577.  
  11578.           Who are those    JPEG stands for the "Joint Photographic Experts
  11579.           JPEG guys?       Group".  This is a group of experts who defined a
  11580.                            standard compression scheme for still images,
  11581.                            commonly called JPEG Compression.  Currently the
  11582.                            standard is still in draft form.  The standard
  11583.                            should be finalized in 1991.
  11584.  
  11585.           Overview         JPEG Compression consists of a series of
  11586.                            reasonably complex mathematical operations.  These
  11587.                            include: colour space conversion, discrete cosine
  11588.                            transforms, quantization, and entropy coding.
  11589.                            After these steps you end up with an image which
  11590.                            takes fewer bits to store than you started out
  11591.                            with.
  11592.  
  11593.                            However, when you decompress a JPEG compressed
  11594.                            image you end up with an image that is not quite
  11595.                            the same as the original  (which is why JPEG
  11596.                            Compression is referred to as "lossy").
  11597.  
  11598.           Is lossy         You might well ask why anyone would want to
  11599.           compression      compress an image using a lossy technique.
  11600.           bad?             Compression ratios for lossy compression are much
  11601.                            better than for lossless compression and the loss
  11602.                            is generally very small.  And, in fact, every
  11603.                            operation of converting an image is lossy (the
  11604.                            original photographic or electronic process which
  11605.                            captured the image was lossy, scanning or
  11606.                            digitizing the image was lossy, displaying the
  11607.                            image on a monitor is lossy, and printing the
  11608.                            image is lossy).
  11609.  
  11610.  
  11611.           Details          JPEG compression involves the following steps:
  11612.  
  11613.  
  11614.  
  11615.  
  11616.  
  11617.  
  11618.  
  11619.  
  11620.  
  11621.  
  11622.  
  11623.  
  11624.                                                    Image Alchemy          187
  11625.  
  11626.  
  11627.  
  11628.  
  11629.                    Step 1  The image is converted to a colour space with
  11630.                            separate luminance and chrominance channels.  This
  11631.                            is done because the human eye is far more
  11632.                            sensitive to the luminance information (Y) than it
  11633.                            is to the chrominance information (Cb and Cr); by
  11634.                            separating them, it's possible to compress the
  11635.                            chrominance information more than the luminance
  11636.                            before the perceived image quality suffers.
  11637.  
  11638.                            This step isn't specified in the JPEG draft (it
  11639.                            doesn't discuss colour space at all), but is
  11640.                            standard practice.  Image Alchemy uses CCIR-601
  11641.                            YCbCr, which is the colour space specified by the
  11642.                            JFIF standard.
  11643.  
  11644.                    Step 2  The luminance and chrominance information are
  11645.                            separately transformed to the frequency domain
  11646.                            using a discrete cosine transform acting on 8x8
  11647.                            pixel blocks.
  11648.  
  11649.                            To reduce the amount of data which needs to be
  11650.                            compressed the chrominance information may be sub-
  11651.                            sampled first.  Alchemy uses 2h:1v:1h:1v:1h:1v
  11652.                            sub-sampling when writing JPEG files, which means
  11653.                            that the first component (luminance) has twice as
  11654.                            many samples horizontally as the other two
  11655.                            components (chrominance), and the same number of
  11656.                            samples vertically.  Alchemy can read JPEG files
  11657.                            with any sub-sampling allowed by the draft
  11658.                            standard.
  11659.  
  11660.                    Step 3  quantizationThe transformed data is quantized (so
  11661.                            some information is thrown away).  The samples
  11662.                            representing higher frequencies are generally
  11663.                            quantized using larger steps than those
  11664.                            representing low frequencies.
  11665.  
  11666.                            The quality level you specify is used to scale a
  11667.                            set of quantization values which have been found
  11668.                            to cause the quantized data to all have
  11669.                            approximately equal importance visually.  A lower
  11670.                            quality number will cause larger quantization
  11671.                            steps to be used, and hence increase the
  11672.                            compression ratio and decrease the image quality.
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.  
  11680.  
  11681.  
  11682.  
  11683.           188          Image Alchemy
  11684.  
  11685.  
  11686.  
  11687.  
  11688.                    Step 4  The quantized data is compressed using an entropy
  11689.                            coder.  Huffman and Arithmetic coding are allowed
  11690.                            by the draft JPEG standard; only Huffman coding is
  11691.                            allowed by the JFIF standard.  Huffman coding can
  11692.                            either be done with a set of fixed tables or
  11693.                            custom tables can be generated for an image.
  11694.                            Alchemy, by default, uses a fixed set of tables,
  11695.                            but can also generate custom tables which usually
  11696.                            produce 5-20% (depending on the image and quality
  11697.                            setting) better compression.  However, producing
  11698.                            custom tables requires an additional pass over the
  11699.                            image data and therefore takes a little longer.
  11700.  
  11701.                            Alchemy can write JPEG files using either Huffman
  11702.                            or arithmetic coding; arithmetic coding generally
  11703.                            results in a slightly smaller file, but at the
  11704.                            cost of non-JFIF compatibility and longer
  11705.                            compression and decompression times.
  11706.  
  11707.           JPEG             This data corresponds to the JPEG Interchange
  11708.           Interchange      Format and is ready to be stored in a file.
  11709.           Format           Unfortunately the JPEG Interchange Format does not
  11710.                            include enough information to actually be able to
  11711.                            convert the file back to an image.  Specifically
  11712.                            the colour space used and the aspect ratio or
  11713.                            resolution of the image are not included.  Until
  11714.                            recently there was no standard way of putting this
  11715.                            information in a JPEG file.
  11716.  
  11717.           JFIF             On March 1, 1991 representatives of several JPEG
  11718.                            hardware and software developers (including C-
  11719.                            Cube, Radius, NeXT, Storm Tech., the PD JPEG
  11720.                            group, Sun, and Handmade Software) met at C-Cube
  11721.                            and established the JPEG File Interchange Format
  11722.                            (JFIF).  If you would like more information on the
  11723.                            JFIF standard please contact us.
  11724.  
  11725.  
  11726.  
  11727.  
  11728.  
  11729.  
  11730.  
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.  
  11739.  
  11740.  
  11741.  
  11742.                                                    Image Alchemy          189
  11743.  
  11744.  
  11745.  
  11746.  
  11747.                                                                             D
  11748.  
  11749.  
  11750.  
  11751.           Customer Support
  11752.           -------------------------------------------------------------------
  11753.  
  11754.  
  11755.           Why might        We have made every effort to insure that Image
  11756.           Alchemy mess     Alchemy can read all files in its supported
  11757.           up?              formats.  However, because of poorly written
  11758.                            standards and non-adherence to standards there are
  11759.                            undoubtedly certain files that Image Alchemy does
  11760.                            not read correctly.
  11761.  
  11762.           What we need to  If you come across any files which Image Alchemy
  11763.           help you         has trouble with please contact us with as much of
  11764.                            the following information as you have:  version of
  11765.                            Image Alchemy you are using, type of file, type of
  11766.                            computer which generated it, name and version of
  11767.                            software which wrote the file, size of image, and
  11768.                            the number of colours in image.  We may ask you to
  11769.                            send us the file so that we can figure out what
  11770.                            went wrong.  If you send us a file we will attempt
  11771.                            to modify Image Alchemy so that it can read the
  11772.                            file.  Once Image Alchemy is modified, we will
  11773.                            send you an updated copy of Image Alchemy.
  11774.  
  11775.                            Similarly, if any files that Image Alchemy writes
  11776.                            cannot be read by other software please contact
  11777.                            us.  We may ask you to send us a copy of a file
  11778.                            that can be read by that software package for
  11779.                            comparison.
  11780.  
  11781.  
  11782.                            Please contact us even if you are just using a
  11783.                            demo copy of Alchemy.  In addition to helping fix
  11784.                            a potential bug, we feel the best way to get you
  11785.                            to purchase a copy of Alchemy is to demonstrate
  11786.                            how committed we are to customer support.
  11787.  
  11788.  
  11789.  
  11790.  
  11791.  
  11792.  
  11793.  
  11794.  
  11795.  
  11796.  
  11797.  
  11798.  
  11799.  
  11800.  
  11801.           190          Image Alchemy
  11802.  
  11803.  
  11804.  
  11805.  
  11806.           How to contact   Our address and phone numbers are:
  11807.           us
  11808.                               Handmade Software, Inc.
  11809.                               48820 Kato Road, Suite 110
  11810.                               Fremont, CA  94538
  11811.                               
  11812.                                1 800 358 3588 (Toll-free from the U.S.)
  11813.                               +1 510 252 0101 (Voice)
  11814.                               +1 510 252 0909 (Fax)
  11815.  
  11816.                            The most efficient way to contact us is by e-mail;
  11817.                            this is especially true if you can send us a
  11818.                            sample file which demonstrates the problem.  Our
  11819.                            e-mail addresses are:
  11820.  
  11821.                               Internet:  hsi@netcom.COM
  11822.                               CompuServe:  71330, 3136
  11823.  
  11824.                            We also have a 24 hour bulletin board BBS where
  11825.                            you can upload and download files.  It speaks 2400
  11826.                            baud, 9600 baud (v32, v42, and v42.bis), and PEP
  11827.                            and its number is:
  11828.  
  11829.                               +1 510 252 0929 (BBS)
  11830.  
  11831.  
  11832.  
  11833.  
  11834.  
  11835.  
  11836.  
  11837.  
  11838.  
  11839.  
  11840.  
  11841.  
  11842.  
  11843.  
  11844.  
  11845.  
  11846.  
  11847.  
  11848.  
  11849.  
  11850.  
  11851.  
  11852.  
  11853.  
  11854.  
  11855.  
  11856.  
  11857.  
  11858.  
  11859.  
  11860.                                                    Image Alchemy          191
  11861.  
  11862.  
  11863.  
  11864.  
  11865.                                                                             E
  11866.  
  11867.  
  11868.  
  11869.           Binary Information Files (BIF)
  11870.           -------------------------------------------------------------------
  11871.  
  11872.  
  11873.           Overview         Binary files are image files which are just data.
  11874.                            In other words, they do not contain any
  11875.                            information other than the actual pixels in the
  11876.                            image.  In order to read these files you must
  11877.                            create a file using a text editor which describes
  11878.                            to Alchemy the format of the file you are trying
  11879.                            to read in.  This is called a BIF file (and
  11880.                            normally has the extension .bif).
  11881.  
  11882.           Required         At the minimum a BIF file needs to contain the
  11883.           information      filename of the image file and either the height
  11884.                            or the width of the image.  Alchemy will make
  11885.                            assumptions about the other characteristics of the
  11886.                            image based on the information that it is given
  11887.                            and the total length of the image file.
  11888.  
  11889.  
  11890.           BIF file format  The first line contains the letters BIF, which
  11891.                            identifies the file as a BIF file.
  11892.  
  11893.                            Each of the rest of the lines in the BIF file
  11894.                            consist of an information tag followed by the
  11895.                            information.  The spelling of the tags must be
  11896.                            exact or Alchemy will report an unknown tag error.
  11897.  
  11898.  
  11899.  
  11900.  
  11901.  
  11902.  
  11903.  
  11904.  
  11905.  
  11906.  
  11907.  
  11908.  
  11909.  
  11910.  
  11911.  
  11912.  
  11913.  
  11914.  
  11915.  
  11916.  
  11917.  
  11918.  
  11919.           192          Image Alchemy
  11920.  
  11921.  
  11922.  
  11923.  
  11924.           Tags
  11925.  
  11926.                       Tag  Description
  11927.  
  11928.                  filename  The name of the file containing the binary data.
  11929.  
  11930.                     width  The width of the image data, in pixels.
  11931.  
  11932.                    height  The height of the image data, in pixels.
  11933.  
  11934.                    planes  The number of planes of image data (1, 2, 3, or
  11935.                            4).
  11936.                            A 1 plane image is assumed to be gray-scale, a 2
  11937.                            plane image is a gray-scale image with an alpha
  11938.                            channel, a 3 plane image is a RGB image, and a 4
  11939.                            plane image is a RGB image with an alpha channel.
  11940.  
  11941.                    header  The size of the header, in bytes.  This many bytes
  11942.                            will be skipped when reading the file.
  11943.  
  11944.               leftpadding  The number of bytes to remove from the beginning
  11945.                            of each scan line.
  11946.  
  11947.              rightpadding  The number of bytes to remove from the end of each
  11948.                            scan line.
  11949.  
  11950.                     order  The order of the pixels.
  11951.                            For 3 channel images, this can be any sequence of
  11952.                            r, g, and b: rgb, rbg, grb, gbr, brg, or bgr
  11953.                            (r=red, g=green, b=blue).
  11954.                            For 4 channel images, this can be any sequence of
  11955.                            a, r, g, and b (a=alpha).
  11956.                            Either ga or ag for 2 channel images (g=gray,
  11957.                            a=alpha).
  11958.  
  11959.                            The defaults are g, ga, rgb, and rgba, depending
  11960.                            on the number of planes.
  11961.  
  11962.                upsidedown  The presence of this tag indicates that the data
  11963.                            in the file is recorded from the bottom of the
  11964.                            screen up to the top of the screen.
  11965.  
  11966.  
  11967.  
  11968.           Comments         Lines beginning with a # are treated as comments.
  11969.                            Comments and blank lines are ignored when
  11970.                            processing the file.
  11971.  
  11972.  
  11973.  
  11974.  
  11975.  
  11976.  
  11977.  
  11978.                                                    Image Alchemy          193
  11979.  
  11980.  
  11981.  
  11982.  
  11983.           Palette files    If the binary file has a palette available, you
  11984.                            can use that palette by writing custom software to
  11985.                            convert it to a .PAL file and using the -F option
  11986.                            while reading the BIF file.
  11987.  
  11988.           Example          This is an example BIF file which can be used to
  11989.                            read a 640 pixel wide, true colour HSI Raw file.
  11990.                            Note that HSI raw files have a 32 byte header
  11991.                            which is being skipped.  Of course you could read
  11992.                            the Raw file directly using Alchemy, but this is
  11993.                            after all an example of a BIF file.
  11994.  
  11995.                                 BIF
  11996.                                 width    640
  11997.                                 #skip past header
  11998.                                 header    32
  11999.  
  12000.                                 filename  sample.raw
  12001.                                 planes     3
  12002.  
  12003.                                 #the tag below isn't actually needed,
  12004.                                 #since rgb is the default, but is
  12005.                                 #included here to give an example of
  12006.                                 #what an order tag looks like
  12007.  
  12008.                                 order   rgb
  12009.  
  12010.           Using the        Assuming the BIF file is called sample.bif, the
  12011.           example BIF      following Alchemy command can be used to convert
  12012.           file             the image to a GIF file:
  12013.  
  12014.                                 alchemy sample.bif -g
  12015.  
  12016.                            The height of the image will be automatically
  12017.                            calculated from the length of the file and the
  12018.                            width, header, and planes tags.
  12019.  
  12020.                            A BIF file is treated as an ordinary file, so all
  12021.                            the standard Alchemy commands may be used.
  12022.  
  12023.  
  12024.  
  12025.  
  12026.  
  12027.  
  12028.  
  12029.  
  12030.  
  12031.  
  12032.  
  12033.  
  12034.  
  12035.  
  12036.  
  12037.           194          Image Alchemy
  12038.  
  12039.  
  12040.  
  12041.  
  12042.                                                                             F
  12043.  
  12044.  
  12045.  
  12046.           HSI Raw Files
  12047.           -------------------------------------------------------------------
  12048.  
  12049.  
  12050.           History          The HSI Raw format was originally intended as an
  12051.                            internal format to Image Alchemy.  Because of user
  12052.                            demand the format has been documented to allow
  12053.                            others to read and write HSI Raw files.
  12054.  
  12055.           Overview         HSI Raw files are completely uncompressed,
  12056.                            unpacked, and unpadded image data files.
  12057.                            Therefore they tend to be larger than almost any
  12058.                            compressed file format.  However, they have the
  12059.                            advantage, as far as Alchemy is concerned, that
  12060.                            they are very fast to read and write and the
  12061.                            location of any pixel in the image may be found by
  12062.                            simple calculations.
  12063.  
  12064.                            If you need to convert custom files to a format
  12065.                            that Alchemy can read we recommend using a Raw
  12066.                            file; it is the simplest format to write and the
  12067.                            fastest for Alchemy to read.
  12068.  
  12069.           Variations       There are two types of HSI Raw Files:  paletted
  12070.                            and true colour.  Paletted images are stored one
  12071.                            byte per pixel with a palette at the beginning of
  12072.                            the file.  True colour files are stored three
  12073.                            bytes per pixel.
  12074.  
  12075.                Gray-scale  Gray scale files are stored as paletted files with
  12076.                            a palette that contains all gray values.  Alchemy
  12077.                            automatically recognizes such files during reading
  12078.                            and will treat them appropriately.
  12079.  
  12080.           Black and white  Black and White files are stored as paletted files
  12081.                            with a palette that contains two values, black and
  12082.                            white.  Alchemy automatically recognizes such
  12083.                            files during reading and will treat them
  12084.                            appropriately.
  12085.  
  12086.  
  12087.  
  12088.           Warning          Note that Handmade Software, Inc. reserves the
  12089.                            right to make changes to this format at any time
  12090.                            and without notice.  And while it is unlikely, it
  12091.                            is possible that future versions of Image Alchemy
  12092.                            will not support this format.
  12093.  
  12094.  
  12095.  
  12096.                                                    Image Alchemy          195
  12097.  
  12098.  
  12099.  
  12100.  
  12101.           Old version      This appendix describes version 4 Raw files.  This
  12102.           files            is the version that Image Alchemy has written
  12103.                            since March 1991.  Before this Alchemy wrote
  12104.                            version 2 and 3 raw files (version 2 were 8 bit
  12105.                            files, version 3 were 24 bit files).  Those raw
  12106.                            files can be read by current versions of Image
  12107.                            Alchemy but are not otherwise supported.  If you
  12108.                            run across any of these raw files the easiest
  12109.                            thing to do is to use a current copy of Alchemy to
  12110.                            convert them to a version 4 raw file.
  12111.  
  12112.  
  12113.  
  12114.           Details
  12115.  
  12116.                 Word size  All values which are not otherwise identified are
  12117.                            two byte integers (16 bits).  This is the native
  12118.                            integer size of most IBM PC C-compilers but not
  12119.                            for Macintosh and Sun C-compilers.
  12120.  
  12121.  
  12122.                Byte order  All integers are stored high byte first (big-
  12123.                            endian order).  This is the native mode for
  12124.                            Macintosh's and Sun's but not the native mode for
  12125.                            IBM PC's.
  12126.  
  12127.  
  12128.                            See below for a CPU independent method to read and
  12129.                            write 2-byte integers.
  12130.  
  12131.              Pixel format  Paletted files are stored one byte per pixel.
  12132.  
  12133.                            True colour files are stored as three bytes per
  12134.                            pixel in red, green, blue order.
  12135.  
  12136.                   Padding  Neither the palette information nor the pixel data
  12137.                            is padded to anything other than a byte boundary.
  12138.                            This means that if you store a file which is 13 by
  12139.                            11 pixels it will occupy 429 bytes if stored as a
  12140.                            true colour file (not including the header), or
  12141.                            143 bytes if stored as a paletted file (not
  12142.                            including the header and palette data).
  12143.  
  12144.                       Hex  Numbers including a 0x prefix are hex; all other
  12145.                            numbers are decimal.
  12146.  
  12147.  
  12148.  
  12149.           File format      The header for a paletted file is 32 bytes plus
  12150.                            the size of the palette.  The header for a true
  12151.                            colour file is exactly 32 bytes (a true colour
  12152.                            file contains no palette).
  12153.  
  12154.  
  12155.           196          Image Alchemy
  12156.  
  12157.  
  12158.  
  12159.  
  12160.              Magic number  Six bytes used to identify the file as a HSI Raw
  12161.                            file:
  12162.  
  12163.                                 0x6d 0x68 0x77 0x61 0x6e 0x68
  12164.  
  12165.                   Version  An integer used to identify the version HSI file:
  12166.  
  12167.                                 0x0004
  12168.  
  12169.                     Width  An integer indicating the width of the image (in
  12170.                            pixels).
  12171.  
  12172.                    Height  An integer indicating the height of the image (in
  12173.                            pixels).
  12174.  
  12175.              Palette size  An integer indicating the number of entries in the
  12176.                            palette.  Range is 2 to 256.  A 0  or -24
  12177.                            indicates a true colour image (which has no
  12178.                            palette data).
  12179.  
  12180.            Horizontal DPI  An integer indicating the horizontal resolution of
  12181.                            the image, in dots per inch.  A zero indicates
  12182.                            that the resolution is unknown.  A negative number
  12183.                            is used if only the aspect ratio is known.
  12184.  
  12185.              Vertical DPI  An integer indicating the vertical resolution of
  12186.                            the image, in dots per inch.  A zero indicates
  12187.                            that the resolution is unknown.  A negative number
  12188.                            is used if only the aspect ratio is known.
  12189.  
  12190.                     Gamma  An integer indicating the gamma of the image,
  12191.                            scaled by 100 (a gamma of 2.2 is stored as 220).
  12192.                            A zero indicates that the gamma is not known.
  12193.  
  12194.                  Reserved  Twelve bytes reserved for future use.  Should be
  12195.                            set to zero when writing.
  12196.  
  12197.                   Palette  The palette data is stored as 3 bytes per palette
  12198.                            entry.  The bytes are in red, green, blue order; 0
  12199.                            is black, 0xff is full intensity.
  12200.  
  12201.                            True colour raw files have no palette.
  12202.  
  12203.                Image data  The image data.
  12204.  
  12205.  
  12206.  
  12207.           Example files
  12208.  
  12209.  
  12210.  
  12211.  
  12212.  
  12213.  
  12214.                                                    Image Alchemy          197
  12215.  
  12216.  
  12217.  
  12218.  
  12219.           8 bit paletted,  6D 68 77 61 6E 68 00 04  01 40 00 C8 01 00 00 00
  12220.                320 x 200:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  12221.                            49 24 24 24 00 00 00 00  00 DB 6D 6D FF 92 92 FF
  12222.                            B6 B6 92 49 49 FF DB DB  FF B6 92 FF FF DB FF DB
  12223.                            B6 FF FF FF B6 6D 6D 6D  24 24 DB 92 6D 6D 49 49
  12224.                            ...
  12225.  
  12226.  
  12227.               24 bit true  6D 68 77 61 6E 68 00 04  01 40 00 C8 00 00 00 00
  12228.                   colour,  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  12229.                320 x 200:  49 24 24 49 24 24 49 24  24 49 24 24 49 24 24 49
  12230.                            24 24 49 24 24 49 24 24  49 24 24 49 24 24 49 24
  12231.                            24 49 24 24 49 24 24 49  24 24 49 24 24 49 24 24
  12232.                            ...
  12233.  
  12234.  
  12235.           Reading a two
  12236.           byte integer
  12237.                                 int getWord(int i, FILE *stream) {
  12238.                                    register int temp;
  12239.                                    temp=getc(stream)<<8;
  12240.                                    return(getc(stream) | temp);
  12241.                                 }
  12242.  
  12243.           Writing a two
  12244.           byte integer
  12245.                                 int putWord(int i, FILE *stream) {
  12246.                                    putc(i>>8, stream);
  12247.                                    return(putc(i&0xff, stream));
  12248.                                 }
  12249.  
  12250.  
  12251.  
  12252.  
  12253.  
  12254.  
  12255.  
  12256.  
  12257.  
  12258.  
  12259.  
  12260.  
  12261.  
  12262.  
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268.  
  12269.  
  12270.  
  12271.  
  12272.  
  12273.           198          Image Alchemy
  12274.  
  12275.  
  12276.  
  12277.  
  12278.                                                                             G
  12279.  
  12280.  
  12281.  
  12282.           Undercolour Removal Files
  12283.           -------------------------------------------------------------------
  12284.  
  12285.  
  12286.           Summary          Undercolour removal files are text files which
  12287.                            control the conversion from RGB to CMYK colour
  12288.                            space.
  12289.  
  12290.  
  12291.                            This conversion consists of four steps.  The first
  12292.                            is to convert an RGB value to an ideal CMY value;
  12293.                            this simply involves negating the RGB values.  The
  12294.                            next step is to determine how much black is in
  12295.                            that colour; this is done by finding the minimum
  12296.                            of the CMY values and using that as an index into
  12297.                            the black removal tables documented below.  These
  12298.                            tables have independent values for how much black
  12299.                            to use for that pixel and how much black to
  12300.                            subtract from the CMY values.  Next, a linear
  12301.                            transform is optionally applied to the CMY portion
  12302.                            of the CMYK pixel.  Finally the CMYK values are
  12303.                            optionally translated, independently, through the
  12304.                            CMYK density correction tables (this last step is
  12305.                            only used if Alchemy is going to dither the image
  12306.                            for output on a 1 bit per pixel per component
  12307.                            device).
  12308.  
  12309.           File format      Any line beginning with ';' is a comment and is
  12310.                            ignored.
  12311.  
  12312.  
  12313.             Black removal  The first 256 non-comment lines contain
  12314.                    tables  undercolour removal values corresponding to
  12315.                            computed black values of 0 (white) to 255 (black).
  12316.                            Each of these lines has two numbers; the first
  12317.                            indicates how much black to use in place of the
  12318.                            computed black value corresponding to the line,
  12319.                            and the second indicates how much black to
  12320.                            subtract from the cyan, magenta, and yellow
  12321.                            components (this value must not be greater than
  12322.                            the corresponding computed black value).
  12323.  
  12324.  
  12325.                            After the black removal block the remaining blocks
  12326.                            may appear in any order.
  12327.  
  12328.  
  12329.  
  12330.  
  12331.  
  12332.                                                    Image Alchemy          199
  12333.  
  12334.  
  12335.  
  12336.  
  12337.                CMY linear  If there is a line which says only "HSI CMY
  12338.                 transform  matrix" then the next 3 non-comment lines contain
  12339.                            a matrix representing a linear transform which is
  12340.                            applied to the cyan, magenta, and yellow
  12341.                            components after black removal and before applying
  12342.                            the density map.  The entries are normalized
  12343.                            around 256.  The first row and column represent
  12344.                            cyan, the second magenta, and the third yellow.
  12345.                            The rows are multiplied by the input cyan,
  12346.                            magenta, and yellow values to create the corrected
  12347.                            values.  A matrix of
  12348.  
  12349.                                 256   0   0
  12350.                                   0 256   0
  12351.                                   0   0 256
  12352.  
  12353.  
  12354.                            is equivalent to omitting the matrix and causes no
  12355.                            correction to take place.  In this case it would
  12356.                            be preferable to omit the matrix as the conversion
  12357.                            will run slightly faster without it.
  12358.  
  12359.  
  12360.              CMYK density  If there is a line which says only "HSI CMYK
  12361.                correction  density map" then the next 256 non-comment lines
  12362.                    tables  contain density correction tables, corresponding
  12363.                            to cyan, magenta, yellow, and black values of 0
  12364.                            (white) to 255.  Each of these lines has four
  12365.                            numbers representing, in order, the amount of
  12366.                            cyan, magenta, yellow, and black to use in place
  12367.                            of the corresponding computed values.  These
  12368.                            tables are only applied during dithering; they
  12369.                            will not be used for those CMYK output formats
  12370.                            which are continuous tone, as devices which take
  12371.                            continuous tone input data should be doing their
  12372.                            own correction.
  12373.  
  12374.           Example          The following undercolour removal file has
  12375.                            undercolour removal tables, CMYK density
  12376.                            correction tables, and a CMY colour correction
  12377.                            matrix.
  12378.  
  12379.  
  12380.                                 ; Undercolour removal file
  12381.                                 ;
  12382.                                   0   0
  12383.                                   1   1
  12384.                                   1   1
  12385.                                   2   2
  12386.                                   3   3
  12387.                                 ... (256 entries total)
  12388.                                 169 169
  12389.  
  12390.  
  12391.           200          Image Alchemy
  12392.  
  12393.  
  12394.  
  12395.  
  12396.                                 169 169
  12397.                                 170 170
  12398.                                 ;
  12399.                                 HSI CMY matrix
  12400.                                 ;the following matrix leaves the
  12401.                                 ; Cyan and Yellow planes alone, and
  12402.                                 ; subtracts a bit from the Magenta
  12403.                                 ; plane when there's Cyan present.
  12404.                                 ;
  12405.                                 256   0   0
  12406.                                 -32 256   0
  12407.                                   0   0 256
  12408.                                 ;
  12409.                                 HSI CMYK density map
  12410.                                 ;
  12411.                                   0   0   0   0
  12412.                                   0   0   0   0
  12413.                                   0   0   0   0
  12414.                                   0   0   0   0
  12415.                                 ... (256 entries total)
  12416.                                 246 246 246 246
  12417.                                 248 248 248 248
  12418.                                 251 251 251 251
  12419.                                 253 253 253 253
  12420.                                 255 255 255 255
  12421.  
  12422.  
  12423.  
  12424.  
  12425.  
  12426.  
  12427.  
  12428.  
  12429.  
  12430.  
  12431.  
  12432.  
  12433.  
  12434.  
  12435.  
  12436.  
  12437.  
  12438.  
  12439.  
  12440.  
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.  
  12447.  
  12448.  
  12449.  
  12450.                                                    Image Alchemy          201
  12451.  
  12452.  
  12453.  
  12454.  
  12455.                                                                             H
  12456.  
  12457.  
  12458.  
  12459.           PAL Files
  12460.           -------------------------------------------------------------------
  12461.  
  12462.  
  12463.           Overview         PAL files are text files which contain a palette
  12464.                            in an ASCII form.  Alchemy can extract palettes
  12465.                            from other file formats and write PAL files.
  12466.                            Alchemy can also use PAL files when converting
  12467.                            images.
  12468.  
  12469.           File format      The first line contains the letters "PAL"; this
  12470.                            identifies the file as a palette file.
  12471.  
  12472.                            The next line contains an integer indicating the
  12473.                            number of palette entries.  Valid values are 2
  12474.                            through 256.
  12475.  
  12476.                            The rest of the file consists of lines of 3
  12477.                            numbers each (separated by spaces) representing
  12478.                            the red, green, and blue values for each of the
  12479.                            colours.  These have a range of 0 (black) to 255
  12480.                            (full intensity).
  12481.  
  12482.           Example
  12483.                                 PAL
  12484.                                 8            ;# colours
  12485.                                   0   0   0  ;black
  12486.                                 255   0   0  ;bright red
  12487.                                   0 128   0  ;dark green
  12488.                                 255 255   0  ;yellow
  12489.                                   0   0 255  ;blue
  12490.                                 255   0 255  ;magenta
  12491.                                  63  63  63  ;gray
  12492.                                 255 255 255  ;white
  12493.  
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.  
  12508.  
  12509.           202          Image Alchemy
  12510.  
  12511.  
  12512.  
  12513.  
  12514.                                                                             I
  12515.  
  12516.  
  12517.  
  12518.           Acknowledgments
  12519.           -------------------------------------------------------------------
  12520.  
  12521.  
  12522.           Summary          Almost all the software which comprises Image
  12523.                            Alchemy was written in house.  However the TIFF
  12524.                            and 640x400 SVGA display modules are modifications
  12525.                            of software originally written by other people.
  12526.  
  12527.                            Both of these modules are free for anyone's use as
  12528.                            long as proper credit is given as to the origin of
  12529.                            the software.
  12530.  
  12531.  
  12532.                      TIFF  Image Alchemy's TIFF I/O is based on libtiff which
  12533.                            is copyright by Sam Leffler and is used with his
  12534.                            permission.  If you are interested in reading or
  12535.                            writing TIFF files we strongly suggest that you
  12536.                            start with libtiff.
  12537.  
  12538.                            Libtiff is available by anonymous ftp as
  12539.                            ucbvax.berkeley.edu:pub/tiff/*.tar.Z or
  12540.                            uunet.uu.net:graphics/tiff.tar.Z.
  12541.  
  12542.                            If you cannot get a copy of libtiff via anonymous
  12543.                            ftp please contact us for a free copy.
  12544.  
  12545.  
  12546.               VGA display  Image Alchemy's 640x400 SVGA display routines are
  12547.                            based on VGAKIT, written by John Bridges.
  12548.  
  12549.                            VGAKIT is available free of charge from a variety
  12550.                            of bulletin boards
  12551.  
  12552.                            If you cannot find VGAKIT locally please contact
  12553.                            us for a free copy.
  12554.  
  12555.  
  12556.  
  12557.  
  12558.  
  12559.  
  12560.  
  12561.  
  12562.  
  12563.  
  12564.  
  12565.  
  12566.  
  12567.  
  12568.                                                    Image Alchemy          203
  12569.  
  12570.  
  12571.  
  12572.  
  12573.                                                                             J
  12574.  
  12575.  
  12576.  
  12577.           Other Useful Software
  12578.           -------------------------------------------------------------------
  12579.  
  12580.  
  12581.           Summary          There are several image processing packages
  12582.                            available for little or no cost.
  12583.  
  12584.                            Please be aware that we mention these software
  12585.                            packages only as a service to Image Alchemy users.
  12586.                            We are not endorsing or recommending any
  12587.                            particular package.  Many of the packages are not
  12588.                            supported by their authors.
  12589.  
  12590.                            If you have trouble finding any of the listed
  12591.                            software please send us a blank tape or diskette
  12592.                            and we will send you a copy free of charge (please
  12593.                            be aware that the software may be quite large;
  12594.                            contact us first if you have any questions).
  12595.  
  12596.                            If you know of any other software which would be
  12597.                            appropriate to add to this list please let us
  12598.                            know.
  12599.  
  12600.                            If you are the author of any of these packages and
  12601.                            you would rather not be on this list please let us
  12602.                            know.
  12603.  
  12604.  
  12605.  
  12606.  
  12607.  
  12608.  
  12609.  
  12610.  
  12611.  
  12612.  
  12613.  
  12614.  
  12615.  
  12616.  
  12617.  
  12618.  
  12619.  
  12620.  
  12621.  
  12622.  
  12623.  
  12624.  
  12625.  
  12626.  
  12627.           204          Image Alchemy
  12628.  
  12629.  
  12630.  
  12631.  
  12632.           IBM PC
  12633.  
  12634.                    PicLab  A public-domain image file conversion and printing
  12635.                            tool.
  12636.                            Written by Lee Crocker and the Stone Soup Group.
  12637.                            Available via CompuServe.
  12638.  
  12639.  
  12640.                     Cshow  A shareware image viewing program.
  12641.                            Written by Bob Berry.
  12642.                            Available from:
  12643.                               Canyon State Systems and Software
  12644.                               PO Box 86
  12645.                               Sedona, AZ  86336
  12646.  
  12647.  
  12648.                     Vivid  A shareware ray-tracing program.
  12649.                            Written by Stephen B. Coy
  12650.                            Available from:
  12651.                               Stephen Coy
  12652.                               15205 NE 13th Pl., #2904
  12653.                               Bellevue, WA  98007
  12654.  
  12655.  
  12656.  
  12657.           Workstations     These programs are only available as source code
  12658.                            and generally require a workstation running UNIX
  12659.                            or one of its variants.
  12660.  
  12661.  
  12662.               Utah Raster  Written by Spencer W. Thomas, Rod G. Bogart, and
  12663.             Toolkit (URT)  James Painter.
  12664.                            Available via anonymous FTP as pub/urt-3.0.tar.Z
  12665.                            via anonymous ftp from cs.utah.edu,
  12666.                            weedeater.math.yale.edu, or
  12667.                            freebie.engin.umich.edu.
  12668.  
  12669.  
  12670.  
  12671.  
  12672.              Fuzzy Bitmap  Written by Michael Mauldin
  12673.              Manipulation  Available by anonymous ftp as
  12674.                     (FBM)  nl.cs.cmu.edu:/usr/mlm/ftp/fbm.tar.Z,
  12675.                            uunet.uu.net:pub/fbm.tar.Z, or
  12676.                            ucsd.edu:graphics/fbm.tar.Z.
  12677.  
  12678.  
  12679.           Portable BitMap  Written by Jef Poskanzer
  12680.                 (PBMPLUS)  Available by anonymous ftp as
  12681.                            expo.lcs.mit.edu:contrib/pbmplus.tar.Z or
  12682.                            ftp.ee.lbl.gov:pbmplus.tar.Z.
  12683.  
  12684.  
  12685.  
  12686.                                                    Image Alchemy          205
  12687.  
  12688.  
  12689.  
  12690.  
  12691.  
  12692.              Img Software  Written by Paul Raveling
  12693.                       Set  Available by anonymous ftp as
  12694.                            expo.lcs.mit.edu:contrib/img_1.3.tar.Z or
  12695.                            venera.isi.edu:pub/img_1.3.tar.Z.
  12696.  
  12697.  
  12698.  
  12699.  
  12700.  
  12701.  
  12702.  
  12703.  
  12704.  
  12705.  
  12706.  
  12707.  
  12708.  
  12709.  
  12710.  
  12711.  
  12712.  
  12713.  
  12714.  
  12715.  
  12716.  
  12717.  
  12718.  
  12719.  
  12720.  
  12721.  
  12722.  
  12723.  
  12724.  
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.  
  12743.  
  12744.  
  12745.           206          Image Alchemy
  12746.  
  12747.  
  12748.  
  12749.  
  12750.  
  12751.  
  12752.  
  12753.  
  12754.           Glossary
  12755.           -------------------------------------------------------------------
  12756.  
  12757.  
  12758.             Anonymous FTP  An easy way to transfer files via the Internet.
  12759.                            If you don't have Internet access you can't use
  12760.                            anonymous FTP; if you do have Internet access you
  12761.                            probably already know about it (if you don't, ask
  12762.                            your system administrator or local network guru).
  12763.  
  12764.           Black and white  An image which contains just two colours, black
  12765.                            and white.  Many file formats, such as TIFF and
  12766.                            Sun Raster, have special variations for black and
  12767.                            white images.  You can force Alchemy to write a
  12768.                            black and white image by specifying -b -c2 as
  12769.                            options.
  12770.  
  12771.                 Dithering  A technique for reducing the amount of colour
  12772.                            banding in an image when converting from a large
  12773.                            number of different colours to a small number of
  12774.                            different colours.  Different dithering techniques
  12775.                            are usually named after the person or persons who
  12776.                            first invented them.  Alchemy supports Floyd-
  12777.                            Steinberg, Stucki, and JJN dithering; these are
  12778.                            further described in "Digital Halftoning", by
  12779.                            Robert Ulichney, MIT Press.
  12780.  
  12781.                Gray-scale  An image which contains just shades of gray.  Many
  12782.                            file formats, such as TIFF and Silicon Graphics,
  12783.                            have special variations for gray-scale images.
  12784.                            You can force Alchemy to write a gray-scale image
  12785.                            by specifying -b -8 as options.
  12786.  
  12787.                    Header  The portion of an image file that is not the
  12788.                            actual image data.  The data in a header generally
  12789.                            includes the image size (in pixels), the image
  12790.                            depth (in number of bits per pixel or number of
  12791.                            colours), and the palette (if the image has a
  12792.                            palette).  Some file formats include quite a bit
  12793.                            of additional data in the header, such as:  the
  12794.                            name of the image, the date and time the image was
  12795.                            created, and the latitude and longitude of the
  12796.                            image (primarily used by satellite image data).
  12797.                            The header is called the header because it usually
  12798.                            appears at the head of the file.  Some file
  12799.                            formats store information which is usually found
  12800.                            in the header in a separate file.
  12801.  
  12802.  
  12803.  
  12804.                                                    Image Alchemy          207
  12805.  
  12806.  
  12807.  
  12808.  
  12809.           Heckbert colour  A technique for reducing the number of colours
  12810.              quantization  needed by an image, typically used to convert a
  12811.                            true colour image to a paletted image.  Named
  12812.                            after Paul Heckbert who originally described the
  12813.                            technique in "Color Image Quantization for Frame
  12814.                            Buffer Display", SIGGRAPH '82 Proceedings, p. 297.
  12815.  
  12816.              Magic Number  A number or sequence of numbers that is found at
  12817.                            or near the start of an image file so that
  12818.                            software may determine what type of format the
  12819.                            file is.  Most formats have a well defined magic
  12820.                            number; some formats do not, in which case Alchemy
  12821.                            examines various parameters in the header of the
  12822.                            file and guesses what format the image is.
  12823.  
  12824.                  Paletted  An image which isn't true colour.  Each pixel in
  12825.                            the image is an index into a table of values
  12826.                            (typically red, green, and blue) which describe
  12827.                            the colour of that pixel.  Most paletted images
  12828.                            are limited to 8 bits of information, which allows
  12829.                            256 unique colours.  Most display adapters only
  12830.                            allow the display of paletted images (Alchemy can
  12831.                            display true colour images on those display
  12832.                            adapters by using a uniform palette).
  12833.  
  12834.               True colour  An image which does not contain a palette.  Each
  12835.                            pixel in the image is represented by at least
  12836.                            three values, typically red, green, and blue.
  12837.                            True colour images are generally produced by
  12838.                            scanners and digitizers and are better quality and
  12839.                            much larger than paletted images.  Most display
  12840.                            systems cannot display true colour images.
  12841.  
  12842.  
  12843.  
  12844.  
  12845.  
  12846.  
  12847.  
  12848.  
  12849.  
  12850.  
  12851.  
  12852.  
  12853.  
  12854.  
  12855.  
  12856.  
  12857.  
  12858.  
  12859.  
  12860.  
  12861.  
  12862.  
  12863.           208          Image Alchemy
  12864.  
  12865.  
  12866.  
  12867.  
  12868.  
  12869.  
  12870.  
  12871.  
  12872.           References
  12873.           -------------------------------------------------------------------
  12874.  
  12875.  
  12876.           General          Computer Graphics - Principles and Practice,
  12877.           Computer         Second Edition
  12878.           Graphics         (Commonly referred to as Foley and van Dam)
  12879.                            J.D. Foley, A. van Dam, S.K. Feiner, and J.F.
  12880.                            Hughes
  12881.                            Addison-Wesley
  12882.                            ISBN 0-201-12110-7
  12883.  
  12884.  
  12885.                            Principles of Interactive Computer Graphics
  12886.                            (Commonly referred to as Newman and Sproull)
  12887.                            W.M. Newman and R.F. Sproull
  12888.                            McGraw-Hill
  12889.                            ISBN 0-07-046338-7
  12890.  
  12891.  
  12892.                            Algorithms for Graphics and Image Processing
  12893.                            Theo Pavlidis
  12894.                            Computer Science Press
  12895.                            ISBN 0-914894-65-X
  12896.  
  12897.  
  12898.                            Graphics Gems
  12899.                            Andrew S. Glassner
  12900.                            Academic Press
  12901.                            ISBN 0-12-286165-5
  12902.  
  12903.  
  12904.                            Graphics Gems II
  12905.                            James Arvo
  12906.                            Academic Press
  12907.                            ISBN 0-12-064480-0
  12908.  
  12909.  
  12910.                            Bit-Mapped Graphics
  12911.                            Steve Rimmer
  12912.                            Windcrest
  12913.                            ISBN 0-8306-3558-0
  12914.  
  12915.  
  12916.  
  12917.  
  12918.  
  12919.  
  12920.  
  12921.  
  12922.                                                    Image Alchemy          209
  12923.  
  12924.  
  12925.           Specific Topics
  12926.  
  12927.                    Colour  The Reproduction of Colour in Photography,
  12928.                            Printing & Television
  12929.                            R.W.G. Hunt
  12930.                            Fountain Press
  12931.                            ISBN 0 85242 356 X
  12932.  
  12933.  
  12934.                 Dithering  Digital Halftoning
  12935.                            Robert Ulichney
  12936.                            MIT Press.
  12937.                            ISBN 0-262-21009-6
  12938.  
  12939.  
  12940.             Image Scaling  Digital Image Warping
  12941.                            George Wolberg
  12942.                            IEEE Computer Society Press Monograph
  12943.                            ISBN 0-8186-8944-7
  12944.  
  12945.  
  12946.           VGA Programming  Programmer's Guide to the EGA and VGA Cards,
  12947.                            Second Edition
  12948.                            Richard F. Ferraro
  12949.                            Addison-Wesley
  12950.                            ISBN 0-201-57025-4
  12951.  
  12952.  
  12953.  
  12954.  
  12955.  
  12956.  
  12957.  
  12958.  
  12959.  
  12960.  
  12961.  
  12962.  
  12963.  
  12964.  
  12965.  
  12966.  
  12967.  
  12968.  
  12969.  
  12970.  
  12971.  
  12972.  
  12973.  
  12974.  
  12975.  
  12976.  
  12977.  
  12978.  
  12979.  
  12980.  
  12981.           210          Image Alchemy