|
From: Elias P. <el...@us...> - 2003-06-29 07:30:36
|
On Sun, 2003-06-29 at 05:52, Gillius wrote: > I'm using Allegro, I believe version 4.1.9, and a user e-mailed me saying > that libjpeg doesn't work anymore. > > When the library dissapeared some 4-5 years ago I put it up on my site > since it didn't have a home page. Until recently it compiled perfectly on > Windows without a single warning. Amazing since it was written for Allegro > 3, and the JPEG code written in 1996 and the library in 1998, that it > lasted so long! > > But alas now it doesn't compile, there is only one error -- the symbol > _color_depth is no longer defined. I figure this is some internal symbol > undocumented in Allegro. > > Why this is, I'm not sure. From a brief glance in the code it appears that > it uses _color_depth to discover the bit depth of the bitmap created in > create_bitmap, but it uses it lots of times, both before and after the > create_bitmap call. > > With some effort I might be able to use bitmap_color_depth can > create_bitmap to simulate a get_color_depth() Allegro call, since > create_bitmap uses the current color depth, I can create a dummy bitmap to > find the depth set by set_color_depth. > > Any comments? Is my guess on the symbol wrong? Am I right in saying it > doesn't exist anymore, but used to be an internal Allegro symbol? > I think it still exists, but you have to include: allegro/internal/aintern.h. At least grep shows me that file if I look for it. Also note that there's a new function get_color_depth() in the unstable branch now. My advice would be to use this instead: http://www.allegro.cc/depot/project.php?_id=522 It is a very recently written library, by Angelo Mottola himself - so it is sure to work, and also is maintained in case a bug is found. I think the comments on allegro.cc are about an old version, and it can decode every .jpg out there now, as well as encode. (But I never used it myself yet) -- Elias Pschernig <el...@us...> |