~ubuntu-branches/ubuntu/trusty/tiff/trusty

« back to all changes in this revision

Viewing changes to tools/gif2tiff.c

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2012-06-24 13:45:42 UTC
  • mfrom: (15.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120624134542-u7dltcqwnb6orprf
Tags: 4.0.2-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: gif2tiff.c,v 1.8.2.2 2010-12-15 00:22:05 faxguy Exp $ */
 
1
/* $Id: gif2tiff.c,v 1.12 2010-12-15 00:22:44 faxguy Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright (c) 1990-1997 Sam Leffler
44
44
# include <unistd.h>
45
45
#endif
46
46
 
 
47
#ifdef NEED_LIBPORT
 
48
# include "libport.h"
 
49
#endif
 
50
 
47
51
#include "tiffio.h"
48
52
 
49
53
#define GIFGAMMA        (1.5)           /* smaller makes output img brighter */
250
254
    global = buf[4] & 0x80;
251
255
    if (global) {
252
256
        globalbits = (buf[4] & 0x07) + 1;
253
 
        fread(globalmap,3,1<<globalbits,infile);
 
257
        fread(globalmap,3,((size_t)1)<<globalbits,infile);
254
258
    }
255
259
}
256
260
 
285
289
 
286
290
        fprintf(stderr, "   local colors: %d\n", 1<<localbits);
287
291
 
288
 
        fread(localmap, 3, 1<<localbits, infile);
 
292
        fread(localmap, 3, ((size_t)1)<<localbits, infile);
289
293
        initcolors(localmap, 1<<localbits);
290
294
    } else if (global) {
291
295
        initcolors(globalmap, 1<<globalbits);