home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!chalmers.se!news.chalmers.se!dtek.chalmers.se!d8klojo
- From: d8klojo@dtek.chalmers.se (Johan Klockars)
- Newsgroups: comp.sys.atari.st
- Subject: MGIF bug fixed, patch included (was MGIF 4.0 problem....)
- Message-ID: <BxzFKK.G0w@news.chalmers.se>
- Date: 19 Nov 92 21:26:44 GMT
- References: <olk.721921925@rzdspc1> <1992Nov18.110007.11018@jyu.fi> <1992Nov19.165420.23954@jyu.fi>
- Sender: news@news.chalmers.se
- Organization: Chalmers University of Technology
- Lines: 56
- Nntp-Posting-Host: hacke5.dtek.chalmers.se
-
- In article <1992Nov19.165420.23954@jyu.fi> ehs@jyu.fi (Eero H. Sarkkinen) writes:
- >In article <1992Nov18.110007.11018@jyu.fi> I wrote:
- >
- >>Also, anybody else having problems launching this version under
- >>tcsh? It works just fine until it says "copy to transform array"
- >>at which point it just exits.
- >(and so on...)
- >To clarify things, further experiments have revealed that
- >this seems to happen whenever there's less than some 2.5 meg
- >free RAM available. So it was not a tcsh bug/incompatibility,
- >only this mgif version being quite the memory hog.
- >
- >EeroS
-
- The problem is that MGIF allocates too much memory for the image buffers. Only
- 32k remains if you have less than 2Mb free when you start.
- The 96k needed for the flicker screens is not allocated until after the
- unpacking and the program does an exit(-1) if the allocation fails.
-
- Below you'll find a small uuencoded program that will patch MGIF if you run it
- in the directory where you keep MGIF.TTP. It does exactly the same thing as the
- source code change described.
- With this fix it should be possible to run MGIF even on a 520.
-
- By the way, I'm working on v4.1 now. I've already added a quick preview using
- ordered dither (a little over a second for a full screen).
- Please, let me now what you'd like to see in MGIF.
- JPEG? Medium res? More image processing? GIF writing?
- If you think you could help, please mail.
-
- ------
- If you have the sources and can compile them:
-
- The following line is what causes the problem(at the start of main() in mgif.c)
-
- MAXIMG = MAXRAW = ((long)Malloc(-1L) - 32768) / 2;
- ^^^^^
- This is the amount of memory left in the system after allocation of the image
- buffers. Try changing this to 131072 (=128k) for example.
- This will solve the problem.
-
- ----- cut here ----
- begin 755 patch.prg
- M8!H "T "@ 0 "IO 0@+0 ,T*T %-"M !P&
- M@ 0 &@ 0 B#=* H'____^+D$O "\-0F<_/ !*3D%/[P ,/SP DAZ
- M '8_/ ]3D%0CTJ :TXX &$ $Y*@&LZ2?H 9B\,+SP $/P0_/ _3D%*
- M@&L>#)3__X 9A9A F2H!K .*+S__@ /KP 0$Y!3^\ ##\$/SP /DY!
- J6(]"9TY!0F<_!"\\ BK#\\ $).04_O I.=4U'248N5%10
-
- end
-
- --
- Chalmers University | Why are these | e-mail : d8klojo@dtek.chalmers.se
- of Technology | .signatures | Address: Johan Klockars
- | so hard to do | Foreningsgatan 32/408
- Gothenburg, Sweden | well? | 411 27 Gothenburg, SWEDEN
-