Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
Data Structures | Macros | Functions | Variables
aliastorle.c File Reference
#include <stdio.h>
#include <math.h>
#include "rle.h"
Include dependency graph for aliastorle.c:

Go to the source code of this file.

Data Structures

struct  alias_hdr
 
struct  bitmap_hdr
 

Macros

#define byte   unsigned char
 
#define Fread(p, s, n, f)    if ( fread(p, s, n, f) != n ) error(3)
 
#define Fwrite(p, s, n, f)    if ( fwrite(p, s, n, f) != n ) error(4)
 
#define VPRINTF   if (verbose) fprintf
 

Functions

static char * Malloc (long int)
 
static char * read_file (FILE *, int *)
 
static long filelen (FILE *)
 
static int read_alias (FILE *, bitmap_hdr *)
 
static void write_rle (FILE *, bitmap_hdr *)
 
static void read_alias_header (FILE *, alias_hdr *)
 
static void create_alias_cmap (bitmap_hdr *)
 
static void uncode_alias24 (unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *)
 
static void uncode_alias (unsigned char *, unsigned char *, unsigned char *)
 
static int read_line_alias24 (FILE *, unsigned char *, unsigned char *, unsigned char *, int)
 
static int read_line_alias (FILE *, unsigned char *, int)
 
static void error (int)
 
void main (int argc, char **argv)
 
static void bitmapcmap_to_rlecmap (bitmap_hdr *bitmap, rle_hdr *rle)
 

Variables

static char rcs_id [] = "$Header: /l/spencer/src/urt/cnv/RCS/aliastorle.c,v 3.0.1.1 1992/04/29 20:01:12 spencer Exp $"
 
int verbose = 0
 
rle_hdr the_hdr
 

Macro Definition Documentation

#define byte   unsigned char

Definition at line 39 of file aliastorle.c.

#define Fread (   p,
  s,
  n,
 
)    if ( fread(p, s, n, f) != n ) error(3)

Definition at line 40 of file aliastorle.c.

#define Fwrite (   p,
  s,
  n,
 
)    if ( fwrite(p, s, n, f) != n ) error(4)

Definition at line 41 of file aliastorle.c.

#define VPRINTF   if (verbose) fprintf

Definition at line 42 of file aliastorle.c.

Function Documentation

static void bitmapcmap_to_rlecmap ( bitmap_hdr bitmap,
rle_hdr rle 
)
static

Definition at line 399 of file aliastorle.c.

402 {
403  register int i;
404  rle_map *rch, *gch, *bch;
405  byte *ptr;
406 
407  /* Allocate memory */
408  rle->cmap= (rle_map *) Malloc(bitmap->colors * 3 * sizeof(rle_map));
409 
410  /*
411  * We'll use 3 ptrs, first to R channel, second to G channel, ...
412  */
413  ptr = bitmap->cmap;
414  rch = rle->cmap;
415  gch = &(rle->cmap[bitmap->colors]);
416  bch = &(rle->cmap[2 * bitmap->colors]);
417  for (i= 0; i< bitmap->colors; i++) {
418  *rch++ = (*ptr++ << 8);
419  *gch++ = (*ptr++ << 8);
420  *bch++ = (*ptr++ << 8);
421  }
422 }
rle_map * cmap
Definition: rle.h:112
unsigned int byte
Definition: hilbert.c:47
int * ptr
Definition: scanargs.c:57
int i
Definition: rletorla.c:82
static char * Malloc(long int)
Definition: aliastorle.c:590
unsigned short rle_map
Definition: rle.h:57
unsigned char * cmap
Definition: aliastorle.c:62
int colors
Definition: aliastorle.c:60
static void create_alias_cmap ( bitmap_hdr image)
static

Definition at line 381 of file aliastorle.c.

383 {
384  register int i;
385  byte *ptr;
386 
387  /*
388  * Alias 8 bits files are b&w, so ...
389  */
390  ptr = (byte *) image->cmap;
391  for (i= 0; i< image->colors; i++) {
392  *ptr++ = i;
393  *ptr++ = i;
394  *ptr++ = i;
395  }
396 }
unsigned int byte
Definition: hilbert.c:47
int * ptr
Definition: scanargs.c:57
int i
Definition: rletorla.c:82
unsigned char * cmap
Definition: aliastorle.c:62
int colors
Definition: aliastorle.c:60
static void error ( int  code)
static

Definition at line 559 of file aliastorle.c.

561 {
562  fprintf(stderr, "%s: ", the_hdr.cmd);
563  switch (code) {
564  case 0:
565  break;
566  case 1: fprintf(stderr, "Cannot open file\n");
567  break;
568  case 2: fprintf(stderr, "Out of memory\n");
569  break;
570  case 3: fprintf(stderr, "Error while reading input file\n");
571  break;
572  case 4: fprintf(stderr, "Error while writing output file\n");
573  break;
574  case 5: fprintf(stderr, "Input file is not an Alias pix\n");
575  break;
576  case 6: fprintf(stderr, "File corrupt ( uncompress too bytes )\n");
577  break;
578  case 99: fprintf(stderr, "Not ready\n");
579  break;
580  default: fprintf(stderr, "Unknow error code (%d)\n", code);
581  break;
582  }
583  exit(1);
584 }
rle_hdr the_hdr
Definition: aliastorle.c:100
const char * cmd
Definition: rle.h:133
static long filelen ( FILE *  handle)
static

Definition at line 643 of file aliastorle.c.

645 {
646  long current_pos;
647  long len;
648 
649  /* Save current position */
650  current_pos= ftell(handle);
651 
652  /* Get len of file */
653  fseek(handle, 0, 2);
654  len= ftell(handle);
655 
656  /* Restore position */
657  fseek(handle, current_pos, 0);
658 
659  return len;
660 }
void main ( int  argc,
char **  argv 
)

Definition at line 121 of file aliastorle.c.

124 {
125  char *inname = NULL;
126  char *outname = NULL;
127  FILE *infile;
128  FILE *outfile;
129  int oflag = 0;
131 
132  the_hdr = *rle_hdr_init( (rle_hdr *)NULL );
133  /*
134  * Get options
135  */
136  if ( !scanargs( argc, argv, "% v%- o%-outfile!s infile%s",
137  &verbose, &oflag, &outname, &inname ))
138  exit( 1 );
139 
140  /* An input file name ? */
141  rle_names( &the_hdr, cmd_name( argv ), inname, 0 );
142  infile= rle_open_f(the_hdr.cmd, inname, "r");
143 
144 
145  /*
146  * Translate Alias "pix" format into my bitmap.
147  */
148  read_alias(infile, &bitmap);
149  rle_close_f(infile); /* We finish with this file */
150 
151  /*
152  * We have a bitmap with the image, so we open the
153  * new rle file and write it.
154  */
155  outfile = rle_open_f(cmd_name(argv), outname, "w");
156  write_rle(outfile, &bitmap);
157  fclose(outfile); /* it is not necesary, but ... */
158 
159  exit(0);
160 }
rle_hdr the_hdr
Definition: aliastorle.c:100
int scanargs(int argc, char **argv, const char *format,...)
Definition: scanargs.c:94
FILE * outfile
Definition: giftorle.c:61
static int read_alias(FILE *, bitmap_hdr *)
Definition: aliastorle.c:163
static void write_rle(FILE *, bitmap_hdr *)
Definition: aliastorle.c:473
int verbose
Definition: aliastorle.c:96
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
const char * cmd
Definition: rle.h:133
Definition: rle.h:96
void rle_close_f(FILE *fd)
Definition: rle_open_f.c:244
FILE * infile
Definition: targatorle.c:102
gpr_ $bitmap_desc_t bitmap
Definition: getap.c:110
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
char * cmd_name(char **argv)
Definition: cmd_name.c:31
int oflag
Definition: painttorle.c:45
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
Definition: rle_hdr.c:267
static char * Malloc ( long int  size)
static

Definition at line 590 of file aliastorle.c.

592 {
593  char *ptr;
594 
595  if ((ptr = (char *) malloc(size)) == NULL)
596  error(2);
597 
598  /*
599  * Usually compilers fill buffers with zeros,
600  * but ...
601  */
602  bzero( ptr, size );
603  return ptr;
604 }
static void error(int)
Definition: aliastorle.c:559
int * ptr
Definition: scanargs.c:57
void * malloc()
gpr_ $offset_t size
Definition: getap.c:96
static int read_alias ( FILE *  handle,
bitmap_hdr image 
)
static

Definition at line 163 of file aliastorle.c.

166 {
167  register int i;
169  int total_size;
170  register int xsize;
171  byte *end;
172  byte *r, *g = 0, *b = 0;
173  int can_read_all;
174  byte *buffer = 0, *ptr = 0;
175  int filesize;
176  int allplanes = 0;
177  int error;
178  int cmapsize;
179 
180  /*
181  * Alias "pix" is a bad format to read line per line. If every
182  * triplet is different to its next, then we read 2 bytes, 2 bytes ...
183  * ... and read a file of 1 Mb. with this form ... hmmmmmm !!!
184  * This is necesary if we are reading from stdin, but if we have
185  * a file, we'll read the file into memory ( one access to disk ).
186  */
187  can_read_all = (handle != stdin); /* a regular file ? */
188  VPRINTF(stderr, "Reading Alias from %s\n",
189  (can_read_all ? "file" : "stdin"));
190 
191  if (can_read_all) {
192  /*
193  * We are using a regular file ( not a pipe ), so we can
194  * read it into memory.
195  */
196  ptr= buffer= (byte *) read_file(handle, &filesize);
197  VPRINTF(stderr, "File size: %d\n", filesize);
198  /* Copy the header */
199  bcopy(ptr, &header, sizeof(alias_hdr));
200  ptr += sizeof(alias_hdr); /* skip the header */
201  }else {
202  /*
203  * We are using stdin so ...
204  */
205  /* We need the header of Alias pix */
206  VPRINTF(stderr, "Reading Alias header\n");
207  read_alias_header(handle, &header);
208  }
209 
210  /* Size in pixels */
211  total_size = header.xsize * header.ysize;
212 
213  /* Fill our header */
214  image->xsize = header.xsize;
215  image->ysize = header.ysize;
216  image->depth = header.depth;
217  image->colors = 1 << image->depth;
218  allplanes = ( image->depth > 8 ); /* an image with 24 planes ? */
219  VPRINTF(stderr, "Image size: %dx%d\n", image->xsize, image->ysize);
220  VPRINTF(stderr, "Depth: %d\n", image->depth);
221 
222  /* Get some memory */
223  if ( allplanes ) {
224  /*
225  * We have a image with 24 planes, so we need three buffers to
226  * store it.
227  */
228  r= image->r = (byte *) Malloc(total_size);
229  g= image->g = (byte *) Malloc(total_size);
230  b= image->b = (byte *) Malloc(total_size);
231  }else {
232  /*
233  * The image has less than 256 colors, so we use one plane,
234  * for the bitmap, and the cmap.
235  */
236  r= image->r = (byte *) Malloc(total_size);
237  cmapsize= image->colors * 3; /* size in bytes */
238  image->cmap = (byte *) Malloc(cmapsize);
239  /* Creating the cmap from file */
240  VPRINTF(stderr, "Creating cmap\n");
241  create_alias_cmap(image);
242  }
243 
244  /*
245  * We are ready to uncompress Alias file.
246  */
247  VPRINTF(stderr, "Uncompressing Alias file\n");
248  if (can_read_all) {
249  /*
250  * We have the file into memory so we uncode it directly.
251  */
252  end = r + total_size; /* the end of main buffer */
253  if ( allplanes )
254  uncode_alias24(ptr, r, g, b, end);
255  else uncode_alias(ptr, r, end);
256  /*
257  * We have read the file and uncompressed, so we can
258  * free the memory ( and exit ).
259  */
260  free(buffer);
261  }else {
262  /*
263  * We'll read each line from Alias file ( stdin ) until we
264  * fill our buffers or we get an error.
265  */
266  xsize = image->xsize;
267  for (i= 0; i< image->ysize; i++) {
268  /*
269  * Read and decode the Alias raster information, two cases:
270  * with planes > 8 => a triplet (RGB), else a index.
271  */
272  if ( allplanes ) {
273  /* An image with 24 planes */
274  error= read_line_alias24(handle, r, b, g, xsize);
275  }else {
276  /* An image with indexes to cmap */
277  error= read_line_alias(handle, r, xsize);
278  }
279  if (error) {
280  /* An error, so we exit */
281  fprintf(stderr, "Error while reading line %d\n", i);
282  return 1;
283  }else {
284  /* A line has been read, so we increment theirs pointers */
285  r += xsize;
286  if ( allplanes ) {
287  g += xsize;
288  b += xsize;
289  }
290  }
291  }
292  } /* end of reading from stdin */
293 
294  /* Finish with no problems */
295  return 0;
296 }
static unsigned char g
Definition: getami.c:692
static char * read_file(FILE *, int *)
Definition: aliastorle.c:607
short xsize
Definition: aliastorle.c:48
short depth
Definition: aliastorle.c:50
static unsigned char r
Definition: getami.c:692
static void uncode_alias(unsigned char *, unsigned char *, unsigned char *)
Definition: aliastorle.c:452
static void read_alias_header(FILE *, alias_hdr *)
Definition: aliastorle.c:299
static int read_line_alias(FILE *, unsigned char *, int)
Definition: aliastorle.c:349
static void uncode_alias24(unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *)
Definition: aliastorle.c:425
int xsize
Definition: read98721.c:58
unsigned char * r
Definition: aliastorle.c:61
static unsigned char b
Definition: getami.c:692
static int read_line_alias24(FILE *, unsigned char *, unsigned char *, unsigned char *, int)
Definition: aliastorle.c:315
static void create_alias_cmap(bitmap_hdr *)
Definition: aliastorle.c:381
unsigned char * g
Definition: aliastorle.c:61
static void error(int)
Definition: aliastorle.c:559
unsigned int byte
Definition: hilbert.c:47
int header
Definition: pgmtorle.c:52
int * ptr
Definition: scanargs.c:57
#define VPRINTF
Definition: aliastorle.c:42
int i
Definition: rletorla.c:82
static char * Malloc(long int)
Definition: aliastorle.c:590
short ysize
Definition: aliastorle.c:48
unsigned char * cmap
Definition: aliastorle.c:62
int colors
Definition: aliastorle.c:60
unsigned char * b
Definition: aliastorle.c:61
unsigned char * buffer
Definition: getsun.c:87
static void read_alias_header ( FILE *  handle,
alias_hdr header 
)
static

Definition at line 299 of file aliastorle.c.

302 {
303  /* Read the header */
304  Fread(header, sizeof(alias_hdr), 1, handle);
305 
306  /* Check some things */
307  if ( header->xsize < 1 || header -> xsize > 2560 ||
308  header->ysize < 1 || header -> ysize > 2560 )
309  error(5);
310  if ( header->depth > 24 || header->depth < 1 )
311  error(5);
312 }
short xsize
Definition: aliastorle.c:48
short depth
Definition: aliastorle.c:50
int xsize
Definition: read98721.c:58
#define Fread(p, s, n, f)
Definition: aliastorle.c:40
static void error(int)
Definition: aliastorle.c:559
int ysize
Definition: read98721.c:59
short ysize
Definition: aliastorle.c:48
static char * read_file ( FILE *  handle,
int bytes 
)
static

Definition at line 607 of file aliastorle.c.

610 {
611  char *buffer;
612 
613  /* Get size of file and allocate memory */
614  *bytes= (int) filelen(handle);
615  if ( *bytes > 0 ) /* Ok, it's a regular file. */
616  {
617  buffer= (char *) Malloc(*bytes);
618 
619  /* Read it */
620  Fread(buffer, (int) (*bytes), 1, handle);
621  }
622  else /* Oops! It's a pipe. */
623  {
624  int n = 0, bufsize = 0;
625  /* Read in chunks of BUFSIZ. */
626  buffer = Malloc( BUFSIZ );
627  while ( (n = fread( buffer + bufsize, 1, BUFSIZ, handle )) == BUFSIZ )
628  {
629  bufsize += BUFSIZ;
630  buffer = realloc( buffer, bufsize + BUFSIZ );
631  RLE_CHECK_ALLOC( the_hdr.cmd, buffer, "input image" );
632  }
633  if ( n >= 0 )
634  n += bufsize;
635  else
636  n = bufsize;
637  }
638 
639  /* Return the buffer */
640  return buffer;
641 }
rle_hdr the_hdr
Definition: aliastorle.c:100
static long filelen(FILE *)
Definition: aliastorle.c:643
const char * cmd
Definition: rle.h:133
#define Fread(p, s, n, f)
Definition: aliastorle.c:40
int
Definition: getami.c:848
static char * Malloc(long int)
Definition: aliastorle.c:590
unsigned char * buffer
Definition: getsun.c:87
#define RLE_CHECK_ALLOC(pgm, ptr, name)
Definition: rle.h:86
static int read_line_alias ( FILE *  handle,
unsigned char *  r,
int  size 
)
static

Definition at line 349 of file aliastorle.c.

353 {
354  register int i;
355  register int count = 0;
356  byte *end;
357  byte buffer[2];
358 
359  end = r + size;
360  while (count < size) {
361  /*
362  * Alias code format: <repeat><index> => 2 bytes.
363  */
364  if ( !fread(buffer, 2, 1, handle) ) /* read next buffer */
365  return 1; /* hey !, an EOF here ?. Hmmmm, this is an error ! */
366 
367  count += buffer[0]; /* # of repetitions */
368  /* repeat 'buffer[0]' times these index */
369  for (i= 0; i< buffer[0]; i++) {
370  *r++ = buffer[1];
371  }
372  if ( r > end )
373  error(6); /* uncompress more bytes than size */
374  }
375 
376  /* No problems */
377  return 0;
378 }
static unsigned char r
Definition: getami.c:692
static void error(int)
Definition: aliastorle.c:559
unsigned int byte
Definition: hilbert.c:47
int i
Definition: rletorla.c:82
gpr_ $offset_t size
Definition: getap.c:96
unsigned char * buffer
Definition: getsun.c:87
static int read_line_alias24 ( FILE *  handle,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b,
int  size 
)
static

Definition at line 315 of file aliastorle.c.

319 {
320  register int i;
321  register int count = 0;
322  byte *end;
323  byte buffer[4];
324 
325  end = r + size;
326  while (count < size) {
327  /*
328  * Alias code format: <repeat>BGR => 4 bytes.
329  */
330  if ( !fread(buffer, 4, 1, handle) ) /* read next buffer */
331  return 1; /* hey !, an EOF here ?. Hmmmm, this is an error ! */
332 
333  count += buffer[0]; /* # of repetitions */
334  /* repeat 'buffer[0]' times these triplet */
335  for (i= 0; i< buffer[0]; i++) {
336  *r++ = buffer[3];
337  *g++ = buffer[1];
338  *b++ = buffer[2];
339  }
340  if ( r > end )
341  error(6); /* uncompress more bytes than size */
342  }
343 
344  /* No problems */
345  return 0;
346 }
static unsigned char g
Definition: getami.c:692
static unsigned char r
Definition: getami.c:692
static unsigned char b
Definition: getami.c:692
static void error(int)
Definition: aliastorle.c:559
unsigned int byte
Definition: hilbert.c:47
int i
Definition: rletorla.c:82
gpr_ $offset_t size
Definition: getap.c:96
unsigned char * buffer
Definition: getsun.c:87
static void uncode_alias ( unsigned char *  ptr,
unsigned char *  rbuf,
unsigned char *  end 
)
static

Definition at line 452 of file aliastorle.c.

456 {
457  register int i;
458  byte r;
459 
460  while ( rbuf < end ) { /* while not end of buffer */
461  if ( (i= *ptr++) > 1 ) { /* how mary repetitions ? */
462  r= *ptr++;
463  while( i-- ) { /* copy these index 'i' times */
464  *rbuf++ = r;
465  }
466  }else { /* else, copy these index */
467  *rbuf++ = *ptr++;
468  }
469  }
470 }
static unsigned char r
Definition: getami.c:692
unsigned int byte
Definition: hilbert.c:47
int * ptr
Definition: scanargs.c:57
int i
Definition: rletorla.c:82
short rbuf[8192]
Definition: iristorle.c:31
static void uncode_alias24 ( unsigned char *  ptr,
unsigned char *  rbuf,
unsigned char *  gbuf,
unsigned char *  bbuf,
unsigned char *  end 
)
static

Definition at line 425 of file aliastorle.c.

429 {
430  register int i;
431  byte r, g, b;
432 
433  while ( rbuf < end ) { /* while not end of buffer */
434  if ( (i= *ptr++) > 1 ) { /* how mary repetitions ? */
435  b= *ptr++;
436  g= *ptr++;
437  r= *ptr++;
438  while( i-- ) { /* copy these triplet 'i' times */
439  *rbuf++ = r;
440  *gbuf++ = g;
441  *bbuf++ = b;
442  }
443  }else { /* else, copy these triplet */
444  *bbuf++ = *ptr++;
445  *gbuf++ = *ptr++;
446  *rbuf++ = *ptr++;
447  }
448  }
449 }
static unsigned char g
Definition: getami.c:692
static unsigned char r
Definition: getami.c:692
static unsigned char b
Definition: getami.c:692
unsigned int byte
Definition: hilbert.c:47
int * ptr
Definition: scanargs.c:57
int i
Definition: rletorla.c:82
short bbuf[8192]
Definition: iristorle.c:33
short rbuf[8192]
Definition: iristorle.c:31
short gbuf[8192]
Definition: iristorle.c:32
static void write_rle ( FILE *  handle,
bitmap_hdr image 
)
static

Definition at line 473 of file aliastorle.c.

476 {
477  register int i, j;
478  rle_pixel **row;
479  byte *r;
480  int offset_last;
481 
482  VPRINTF(stderr, "Writing RLE file\n");
483  /*
484  * Fill the rle header with our ( little ) information.
485  */
486  the_hdr.rle_file = handle;
487  the_hdr.xmin = 0;
488  the_hdr.ymin = 0;
489  the_hdr.xmax = image->xsize - 1;
490  the_hdr.ymax = image->ysize - 1;
491  if (image->depth > 8) {
492  the_hdr.ncolors = 3; /* 24 planes */
493  the_hdr.ncmap = 0;
494  }else {
495  the_hdr.ncolors = 1;
496  the_hdr.ncmap = 3;
497  the_hdr.cmaplen = image->depth;
498  /* Convert our cmap to rle cmap */
500  }
501  the_hdr.alpha = 0; /* we don't use alpha channels */
502 
503  /* Write the header */
505 
506  /*
507  * RLE write raster lines in reverse order, so we'll put
508  * pointers to the last line.
509  */
510  offset_last = image->xsize * image->ysize - image->xsize;
511 
512  VPRINTF(stderr, "Compressing RLE lines\n");
513  if (image->depth > 8) {
514  /*
515  * 24 planes, rle_putrow functions use a buffer which contains
516  * a line, so we need do it.
517  */
518  /* Allocate some memory */
519  row = (rle_pixel **)Malloc( 3 * sizeof(rle_pixel *) );
520  if ( row == 0 )
521  error(2);
522 
523  /* Pointers to last line */
524  row[0] = image->r + offset_last;
525  row[1] = image->g + offset_last;
526  row[2] = image->b + offset_last;
527 
528  /* Write each line */
529  for (i= 0; i< image->ysize; i++) {
530  rle_putrow(row, image->xsize, &the_hdr);
531  /*
532  * Back up to the previous line.
533  */
534  for ( j = 0; j < 3; j++ )
535  row[0] -= image->xsize;
536  }
537  /* free rle row buffer */
538  free(row);
539 
540  }else {
541  /*
542  * A image with cmap.
543  */
544  /* if a simple plane => stored on R component */
545  r = image->r + offset_last;
546  for (i= 0; i< image->ysize; i++) {
547  rle_putrow(&r, image->xsize, &the_hdr);
548  r -= image->xsize;
549  }
550  }
551 
552  /*
553  * Put an EOF into the RLE file ( and THE END ! )
554  */
556 }
rle_hdr the_hdr
Definition: aliastorle.c:100
int xmin
Definition: rle.h:100
static unsigned char r
Definition: getami.c:692
void rle_putrow(rle_pixel *rows[], int rowlen, rle_hdr *the_hdr)
int ymin
Definition: rle.h:100
unsigned char * r
Definition: aliastorle.c:61
void rle_puteof(rle_hdr *the_hdr)
Definition: rle_putrow.c:474
int xmax
Definition: rle.h:100
unsigned char * g
Definition: aliastorle.c:61
static void error(int)
Definition: aliastorle.c:559
static void bitmapcmap_to_rlecmap(bitmap_hdr *bitmap, rle_hdr *rle)
Definition: aliastorle.c:399
unsigned int byte
Definition: hilbert.c:47
#define VPRINTF
Definition: aliastorle.c:42
int ncmap
Definition: rle.h:100
int ymax
Definition: rle.h:100
unsigned char rle_pixel
Definition: rle.h:56
int cmaplen
Definition: rle.h:100
int i
Definition: rletorla.c:82
int alpha
Definition: rle.h:100
static char * Malloc(long int)
Definition: aliastorle.c:590
void rle_put_setup(rle_hdr *the_hdr)
Definition: rle_putrow.c:453
unsigned char * b
Definition: aliastorle.c:61
int row
Definition: rle.c:27
FILE * rle_file
Definition: rle.h:114
int ncolors
Definition: rle.h:100

Variable Documentation

char rcs_id[] = "$Header: /l/spencer/src/urt/cnv/RCS/aliastorle.c,v 3.0.1.1 1992/04/29 20:01:12 spencer Exp $"
static

Definition at line 29 of file aliastorle.c.

rle_hdr the_hdr

Definition at line 100 of file aliastorle.c.

int verbose = 0

Definition at line 96 of file aliastorle.c.