home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!gumby!destroyer!news.iastate.edu!IASTATE.EDU!kv07
- From: kv07@IASTATE.EDU (Warren Vonroeschlaub)
- Subject: Re: pixels -> GIF
- Message-ID: <1992Nov11.163524@IASTATE.EDU>
- Sender: news@news.iastate.edu (USENET News System)
- Reply-To: kv07@IASTATE.EDU (Warren Vonroeschlaub)
- Organization: Ministry of Silly Walks
- References: <1992Nov9.163801@IASTATE.EDU> <BxIMJx.9w@portal.hq.videocart.com>
- Date: Wed, 11 Nov 1992 22:35:24 GMT
- Lines: 32
-
- In article <BxIMJx.9w@portal.hq.videocart.com>, dfuller@portal.hq.videocart.com
- (Dave Fuller) writes:
- > the GIF file format is not that easy. it includes headers for the
- information
- > in the rest of the file. (compression mode, color mapping patterns, total
- > length of image, graphic x & y sizes, etc . .) these parts MAY be written
- > out first, then gone back and rewritten after an fseek, but it's not very
- > reliable. any algorithm would probably assume it had the entire image
- > available, then try to compress it, then write out ALL of the information
- > about the file at once. you could go ahead and write out a default file
- > header, not compress the stuff, and then accumulate all of the pixels into
- > respective bytes. The process may be easier with the others, i don't know
- > anything about them. But i do know the GIF creation won't be that easy
- > using the method you are talking about.
-
- I guess I didn't make myself completely clear. I have all the information
- about the image available to me before hand. I know the size, and the type. I
- even know exactly what colors will be used and what won't.
-
- The problem is that resulting image is huge. I cannot display it all at once,
- or load the whole thing into an array. I can only read one or two rows of
- pixels into memory at once, so I have to be able to output them pixel by pixel.
- I can easily do a pass of the data to find any values I might need first.
-
- | __L__
- -|- ___ Warren Kurt vonRoeschlaub
- | | o | kv07@iastate.edu
- |/ `---' Iowa State University
- /| ___ Math Department
- | |___| 400 Carver Hall
- | |___| Ames, IA 50011
- J _____
-