AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 1998

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

1998.03.02 14:32 "Urgently needed: Fast CCITT G4 (TIFF T6) to GIF with scaling. Small footprint", by Michel Plungjan
1998.03.02 16:37 "Re: Urgently needed: Fast CCITT G4 (TIFF T6) to GIF with scaling. Small footprint", by Alberto Accomazzi
1998.03.02 16:42 "Re: Urgently needed: Fast CCITT G4 (TIFF T6) to GIF with scaling. Small footprint", by Simon Wieczner

1998.03.02 16:37 "Re: Urgently needed: Fast CCITT G4 (TIFF T6) to GIF with scaling. Small footprint", by Alberto Accomazzi

In message <98Mar2.163330gmt+0100.19713@gate.epo.nl>, Michel Plungjan writes:

> Hi,
> 
> I need to convert A4/Letter sized images from CCITT G4
> (can be presented as TIFF T6 if needed) to GIF and scale from
> 2592x3508 to 1200x817 in the process
> 
> ImageMagick/libTiff can do this with a Mitchell filter but this is
> REALLY
> a pig, hogging both memory/swap file and cpu.
> 
> Normally this would not be a problem, but since this will be done on the
> 
> fly and perhaps several times concurrently I am really unhappy.
> 
> Does anyone have any alternatives?

Ok, I know that I may end up regretting this some day, but here it goes...

<DISCLAIMER>
I wrote a C program that uses libtiff to do precisely what you describe
(it was written so that it would do fast integer resampling, conversion
to grayscale GIF and possibly caching on the fly;  it can be compiled
so that it runs as a CGI script).  The reason why I have been hesitant 
to give the code out is that it's real ugly and some parts of it are 
very specific to the way we use it on our web site.  Despite my 
intention to clean it up some day so that it would be more useful to
others, I've never gotten around to it, and I can't spend any time 
supporting the code or enhancing it further to meet other people's needs.
</DISCLAIMER>

If you're still reading and don't mind hacking the code, feel free to
fetch it from:  http://cfa-www.harvard.edu/~alberto/tiff/tiff2gif.c

Cheers,

-- Alberto

****************************************************************************
Alberto Accomazzi                 NASA Astrophysics Data System / SIMBAD USA
aaccomazzi@cfa.harvard.edu             Smithsonian Astrophysical Observatory
v/f: 617-495-7076/617-496-7577                60 Garden Street, Mail Stop 83
http://cfa-www.harvard.edu/~alberto                 Cambridge, MA 02138  USA
****************************************************************************