The README file for ATV ___________________________ --------------------------- atv Another Targa Viewer Copyright (C) 2005 Ben Teschendorff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Contact the author: email - software@eyedropvideo.com ******************************************************************************* 1) General Info 2) Usage 3) Compiling 4) Installing 5) ToDo 6) ChangeLog ************ General Info ************* atv-0.2 ATV (Another Targa Viewer) displays uncompressed 8, 24 and 32 bit TGA files along with information on size, row order and what (if anything) is in the CREATOR field. I wrote this application in C and using XLib because I wanted to learn how to diplay an image on an X-window without being dependant on any particular window manager and associated libraries. So it ended up taking me the better part of a weekend to come up with the original 'kludge' and that seemed to do the trick. As well when I was researching the project I ran across a lot of references to people asking the same question, "How do you open and display an image using only XLib?". Here's my answer, read the source, hope it helps ya. Besides source and text files there are 6 supplied TGA files in the archive that you can test the application with. ATV reads 6 different types of uncompressed (not color mapped) TGA files. These can have their row order starting at either the top or bottom and be 8, 24 or 32 bit. ***** Usage ***** Call ATV from the command line and pass along the name of the TGA file as an argument. atv tga_file_name If the file is the right type it will display, otherwise you'll get an error message. To toggle the INFO window use 'h' or 'H' and to QUIT use 'q' or 'Q'. ********* Compiling ********* I've only compiled this on Fedora Core 3 but I'll assume it will compile on for any system running X-window. If you use the supplied Makefile you'll need GNU Make (or compatible). The easiest thing to do is use the Makefile and run the command ... make all ... this will compile and strip the binary. You can use 'make clean' to remove the binary from the source directory and there's a 'make test' you can run which will display one of the supplied TGA files. -------- To compile from the command line, gcc -Wall -O2 atv.c makewin.c -o atv -L/usr/X11R6/lib -lX11 The switch after -Wall is a capital "o" (for optimize), not a zero. You don't need to include it but I've found it doesn't affect program operation plus makes for a smaller binary. After you've compiled strip the binary of unneeded symbols with, strip --strip-all atv If you want to run a test use one of the TGA files that came with this archive. For example ... atv atv_bkgnd_t32.tga ********** Installing ********** Put atv anywhere that's in your PATH. **** ToDo **** Fix small problem with Info/Help window not being redrawn after an Expose event. Parse RLE files Add more functionality. ********* ChangeLog ********* 0.2 - July 02 2005 - Now displays 8 bit (Grayscale). - Help/Info window now gives info on row order. 0.1 - June 20 2005 - Initial release. ******************************************************************************* email the author: software@eyedropvideo.com