Skip to content
/ ansi2gif Public
forked from deater/ansi2gif

convert ASCII/ANSI art to a graphics files

Notifications You must be signed in to change notification settings

tim0s/ansi2gif

 
 

Repository files navigation

*****************  ansi2gif version 0.10.0  ***************
*****************                           ***************
                      by Vince Weaver
                         vince _at_ deater.net
			    http://www.deater.net/weave/
			       github.com/deater/ansi2gif.git
			 
Requirements:  Designed for Linux, but any platform with gcc will probably 
               work.

-------------------------------------------------------------------------     
 HISTORY
-------------------------------------------------------------------------

      I was thinking of extending my "fontprint" program to make it 
      work better with gif output.  But then I thought, if I am going
      to do that, why not make it so it can print colors?
      I went a bit overboard, one thing led to another, and here is ansi2gif.
      
      I decided to leave "fontprint" behind  because it does its job 
      well.  ansi2gif is specialized, and while it shares some code, it
      is a completely different program.
      
      The included example_ansis are ones I drew myself back in the
      period of 1992-1996 or so.  My friends Jason Grimm and John Clemens
      ran a WWIV BBS called "Utopia".  The BBS no longer exists, please
      do not try to call.  I made about 100 different ANSIs, mostly
      animations.  It was a desire to see them again that was the
      real impetus behind this project.
            
-------------------------------------------------------------------------
HOW IT WORKS
-------------------------------------------------------------------------

     I built an "ANSI" escape-code interpreter using a reference
     someone sent me once while I was working on linux_logo.
     
     I used Tom Boutell's [http://www.boutell.com] excellent "gd"
     gif library to make the basis gifs.
     
     I used a slightly modified version of the "whirlgif" utility to 
     do the animations.  [http://www.danbbs.dk/~dino/whirlgif]

     A temporary file is created in /tmp/ansi2gif_%i.gif [where %i is
     the pid of ansi2gif] in which all the transitory gifs for an
     animation are made. (NOTE TO SELF.. INSECURE.  FIX THIS)

     The fonts used are standard "vga" fonts.  Basically they are just
     4k files holding a set of 256x8x16 data, where there are 256 characters,
     16 lines, and then each line is reperesented as a 8bit character.  The
     8 bit character, in binary, tells what bits to turn on and off to make
     an 8x16 font.  
     
     The EPS output works a bit differently.  It uses the "pcfont"
     Postscript font, and does some tricks to try to keep the size
     of the resulting file as small as possible.
     
------------------------------------------------------------------------
INSTALLING
------------------------------------------------------------------------

    Get the "gd" utility from http://www.libgd.org/
    (Or else install the version that comes with your operating system).
    Install it.

    Now install ansi2gif
    
    Uncompress the file 
       tar -xzvf ansi2gif-0.10.0.tar.gz
       
    Enter the created directory
       cd ansi2gif-0.10.0
       
    The Makefile should be OK.  If you have "gd" installed in a 
    non-standard directory, you might have to edit the makefile to
    tell it where you have the gd libraries installed.
    
    Compile the program
       make
       
    Copy the program to where binaries are kept.
       make install
    
    That's it!  It should be all installed!
     
---------------------------------------------------------------------
USAGE
---------------------------------------------------------------------

 ansi2gif [--animate] [--blink] [--eps] [--font fontfile]
          [--gif] [--help] [--png] [--version] [--timedelay T]
	  [--xsize X] [--ysize Y] input_file output_file
		     
       --animate          : Create an animated gif if an animated ansi
       --blink            : Create an animated gif enabling blinking
       --eps              : output an EPS file
       --font fontfile    : Use vgafont "filename" to create gif
       --gif              : output a GIF file
       --help             : show this help
       --png		  : output a PNG file
       --timedelay T      : Delay T 100ths of seconds between each displayed
                            character in animate mode.
       --version          : Print version information
       --xsize X          : Make the output X characters wide
       --ysize Y          : Make the output Y characters long.
                            use "auto" to figure out on the fly.
      
    Instead of the long option, a single dash and the first letter of the
    option may be substituted.  That is, "-a" instead of "--animate"


------------------------------------------------------------------------
WHERE TO DOWNLOAD
------------------------------------------------------------------------
  http://www.deater.net/weave/vmwprod/ansi2gif/
  http://metalab.unc.edu/pub/linux/apps/graphics/convert

------------------------------------------------------------------------
NON-LINUX ARCHITECTURES
------------------------------------------------------------------------

Solaris:
  ansi2gif has been reported to work fine under Solaris, however you need
  to find gnu "getopt()" code.  [You can steal it from the gdb package].
  [thanks to arthurj _at_ uccs.jpl.nasa.gov]
  
If you have reports of ansi2gif working on other architectures, feel free to
e-mail me about them.

-------------------------------------------------------------------------
THANKS
-------------------------------------------------------------------------
       Thanks to Tom Boutell, author of the "gd" library
       Thanks to the various whirlgif authors
              http://www.danbbs.dk/~dino/whirlgif/

       Also special thanks to my lovely wife.


-------
Vince Weaver (6 January 2014)
vince _at_ deater.net

About

convert ASCII/ANSI art to a graphics files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 76.8%
  • PostScript 19.7%
  • Makefile 3.5%