Short: GsAView - View ghostscript output with anti-aliasing Author: olethros@geocities.com (Christos Dimitrakakis) Uploader: olethros geocities com (Christos Dimitrakakis) Type: text/dtp Version: 0.11 (Alpha) Requires: 1MB Chip, 4.5MB Fast Architecture: m68k-amigaos Latest Changes -------------- Bugfix - It was crashing when FBlit was running Overview ======== This program was put together rather quickly :) It converts a monochrome 1700x2200 (200dpi) page output from ghostscript into a 850x1100 anti-aliased 8-color grayscale page, which is then displayed onto a screen. Useful for those of us who do not have 1700 pixel wide displays :) Usage ===== Syntax: GsAView [-m] [filename] View a single file ------------------ GsAView filename (Exit by holding down the RMB) View a list of files -------------------- GsAView -m filename This tries to read a list of files named filename_xxxx.ilbm Where xxxx is a list of numbers {0001,0002,....} This is the default output of the amiga_ilbm device in gs5.1.0 Look below for more details Using with gs5.1.0 ================== (gs5.1.0 is available from aminet:text/dtp/) /- Viewing a single page -/ -------------------------- gs -r200 -g1700x2200 -sDEVICE=amiga_ilbm -sOutputFile=path/filename document (The -g1700x2200 argument is not strictly necessary, but it is safer.. ) ..then, when the page is rendered just start GsAView,or otherwise run it like this: GsAView path/filename_XXXX.ilbm Use L-Amiga and the mouse button to drag the screen. Click the right mouse button to exit. /- Viewing a complete document -/ --------------------------------- Because amiga_ilbm device appends _XXXX.ilbm to the filename it is possible to shift through pages using GsAView: First, prepare the output files: gs -dNOPAUSE -r200 -g1700x2200 -sDEVICE=amiga_ilbm -sOutputFile=path/filename document Then, GsAView -m path/filename (Note: You do not have to wait for all files to be created before you start viewing them.) Press -,+ on the main keyboard to change pages, or use the GUI on the workbench screen. Close the GUI to exit. Problems (aka BUGS) ------------------- No error checking is done when loading the bitmap! It must be a single bitplane 1700x2200 bitmap! If any other file or a directory, is supplied, GsAView will crash horribly!! Technical details ----------------- The program was quickly put together using blitz, which has a fast operation for loading an image into a bitmap (faster than datatypes, I guess) A custom screen is then opened with this bitmap as a custom bitmap. A 3.7MB buffer is initialized and ReadPixelArray8 is used to get the data from the screen to the buffer. The bitmap data is then freed. A 0.8Mb buffer is initialized for the scaled image. The scaling operation is a 5-point filter with a highly optimized assembly innerloop (it uses reduces mem-reads from 5 to 3). The scaling takes 1s on my 68030@50Mhz. A new screen, with depth 3, and using the SA_LikeWorkbench attribute, is created and WritePixelArray8 is used to display the data. I decided not to support other BitMap sizes because 2->1 scaling is much faster than arbitrary scaling, which would need a real filter matrix, which in turn necessitates the use of multiplication operations and more memory accesses. The Future ---------- I might, just might, extend this program to work with arbitrary image sizes, (but still 2->1 scaling), and use datatypes!. Ooh! I guess it could be done using the datatype.library render methods onto a window and then get it using ReadPixelArray8. Might be an easier way? If you have any ideas, suggestions, comments, or bug reports (apart from the known ones), please send me an email. PS. It is possible that I might have no access to email starting from March. In case you want to communicate something important to me (dunno what, how about sending some money? :) send snail-mail to: Christos Dimitrakakis Agias Sofias 4 Drama 66100 Greece Look at other weird stuff from me: /demo/aga/nebula.lha - Cool Spacey demo /dev/basic/bgp.lha - Blitz Genetic-Programming Environment /dev/basic/gasp.lha - Genetic Algorithm Sample Packer in Blitz /dev/misc/SimpTrans.lha - Simple Automatic Translation of .ct files! /dev/misc/ST_uk2gr.lha - Uk2Gr phrasebook for SimpTrans /dev/misc/YAAV.lha - YAAV V0.99 - Yet Another Autodoc Viewer /game/shoot/allrox.lha - HardCore FRENETIC shootem'up - HARD! FAST! OUCH! /game/actio/wreckage.lha - Experimental Driving Sim /game/actio/wreckage_src.lha - Source for driving sim (older version) /gfx/show/gsaview.lha - View ghostscript output with anti-aliasing /mus/misc/filtersound.lha - Cli-Based FIR/IIR sample filter /util/pack/agf.lha - AGF V0.9 n*8-bit Sample Pre-Packing Processor Olethros -------- http://members.xoom.com/cdimita http://www.mp3.com/olethros