www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/02/16/22:34:18

Date: Wed, 16 Feb 1994 21:34:42 -0400 (EDT)
From: JMILLER AT CHESS DOT EISC DOT UTOLEDO DOT EDU
Subject: Here is the requested repost of the LUG info
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Organization: Edison Industrial Systems Center

From:	IN%"rivero AT pinon DOT ccu DOT uniovi DOT es"  "Raul Rivero" 12-JAN-1994 03:52:46.21


Two (or three :-) months ago I released the LUG library, but there was
a problem, the manuals were in spanish. 

This is the announcement of the english version. So ... welcome to 
the LUG Library v1.0 !!!.


What is LUG ?

LUG is "Libreria de Utilidades Graficas" or, in english, "Graphic
Utilities Library", and it's what is: a library of subroutines for 
image manipulation.

What you get ?

	 i . interfaces with file formats:

		- compuserve's gif
		- zsoft's pcx
		- truevision's targa
		- sgi's rgb
		- aldus' tiff
		- aldus' postscript 
		- alias' pix
		- wavefront's rla
		- urt's rle
		- pbm/pgm/ppm
		- rgb
		- raw
		- rayshade's heightfield
		- jpeg

	ii . image editing functions:

		- resampling
		- blur
		- sharpening
		- cut
		- paste
		- median filter
		- masks
		- histogram equalization
		- ... and so on ...

	iii . image viewers:

		- for Silicon Graphics and IBM RISC 6000 ( GL Library )
		- for HP9000 series ( Starbase Library )
		- for any kind of X11 plattforms ( Xlib Library )
		- for PC386/486 with DJGPP compiler ( GRX Library )
		- for Linux ( VGA and VGAGL libraries, text mode )


... and it's a LIBRARY!!!, not a program. YOU! will be the person who
write the programs, not others. Excitant, isn't it?.

And example?.

You have a wonderful 735 (hp9000) which calculates the fast fourier 
transform in nano-seconds, but what if you have to display all these 
images on a PC ?:

	#include <lug.h>
	#include <lugfnts.h>

	main( int argc, char **argv )
	{
  	  bitmap_hdr in;

	  read_8bitmap_file( argv[1], &in, 512, 512 );
	  write_gif_file( argv[2], &in );
	}

Too easy, isn't it ?. A more complex example ?.

We wanna add a signature to a lot of images, display it in our SGI and
write it in 256 colors TIFF format:

	#include <lug.h>
	#include <lugfnts.h>
	#define SIGNATURE	"/usr/people/rivero/.signature.tga"

	main( int argc, char **argv )
	{
	  bitmap_hdr in, super, out;
	  bitmap_hdr aux;

	  /* Read the input file ( any format ) */
	  read_lug_file( argv[1], &in );

	  /* We'll need a true color image */
	  if ( in.depth < 24 ) {
	    copy_bitmap( &in, &aux );
	    freebitmap( &in );
	    to24( &aux, &in );
	    freebitmap( &aux );
	  }

	  /* Read the super image */
	  read_tga_file( SIGNATURE, &super );

	  /* Fade them */
	  chroma_bitmaps( &in, &super, &aux );

	  /* But we wanna a 256 colors image */ 
	  quantize( &aux, &out, 256 );

	  /* Show it (the true color image) */
	  show_bitmap( argv[2], &aux, 0 );

	  /* And write it */
	  write_tiff_file( argv[2], &out );

	}

I hope you get it :-). 

LUG have been tested on SGI, HP9000 (s300/400/800), INTERGRAPH, DEC,
IBM R6000 and PC (Linux/MSDOS) machines, and it appears work fine.

If your machine is a PC with MSDOS, you'll need the DJGPP compiler ( or
an equivalent ).

The original site distributor of this package is telva.ccu.uniovi.es 
(156.35.31.31): /uniovi/mathdept/src/liblug-1.0.1.tar.gz.

Enjoy !.

--
                     ===================================
                                 Raul Rivero
                        Vicerrectorado de Estudiantes
                            Universidad de Oviedo
                              Arguelles, 39, 2o.
                                33003 - Oviedo
                                    Spain
                      ---------------------------------
                          rivero AT pinon DOT ccu DOT uniovi DOT es
                      ---------------------------------
                        "Es muy duro ser romantica  y
                         ninfomana a la vez", Ariadna
                         Gil en el corto El Columpio.
                     ===================================


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019