home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / mm / alchemy / manual.exe / ALCHEMY.DOC
Text File  |  1994-04-15  |  448KB  |  13,697 lines

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