[lazarus] io-bmp.c fails on line 282?

Andrew Johnson aj_genius at hotmail.com
Wed Sep 25 22:34:53 EDT 2002

On Wed, 25 Sep 2002 15:38:37 -0400
"Michael A. Hess" <mhess at miraclec.com> wrote :

>That's what has me concerned.

don't let it, its a minor issue, really, as a result of a temporary 
gdk-pixbuf dependency. Once this code no longer requires gdk-pixbuf, it 
won't matter what version is installed

>That's another point. I do have pixbuf and everything required on my 
>machine, it is just an earlier version. (0.11) It is obviously OK as far as 
>Lazarus is concerned because I make nightly binaries with this machine.
>So I downloaded your source and rebuilt it on my machine.
>I still get the same error even though it should have been built against 
>the libraries I have on my machine. I'm not sure what is going on.

Simple, really. I just lloked through the notes and then the source tree of 
gdk-pixbuf. It looks like there were alignment problems in the io-bmp.c file 
in version prior to 0.13, and some more that weren't fixed until 0.15, there 
also may have been fixes in 0.16, but I started working with gdk-pixbuf in 
version 0.13, with only a few bitmaps that didn't work(it's been awhile so I 
don't remember what kind) and all problems dissapeared for me in 0.15, and 
the header we currently use was based on the gdk-pixbuf version 0.16 header 
from my old laptop, which at the time had (I believe) Mandrake 8.1 with 
Ximian( err. maybe  helix?) installed. So basically most things should work 
on systems with 0.15 and higher, and all things should compile fine on 0.11 
and higher, aka things compiled against 0.11 will work with >=0.11, and 
things compiled against 0.18 will work on >=0.11, however the bitmap code is 
broken on versions <0.15.

I hope I am making sense here.  But basically regardless of your GTK 
version(>=1.2.1)  and gdkpixbuf (>=0.11)  all lazarus programs should work 
for stretcblt'ing etc, but for  bitmap loading gdk-pixbuf >=0.15 is required 
for stable functionality. Preferably >=0.18 since that is what I am using so 
that is what I can debug with. If you were to recompile without gdk-pixbuf 
this error would go away, but all stretching and bitmap loading would do 
nothing.. the same as if you removed the bitmaps entirely(like what Tony has 
done in the exp. build) except that they will still be streamed in(so they 
still need to be present), they just won't be decoded and displayed.

Okay now.. I am going to make a suggestion to Tony I probably should have to 
begin with... but I am a dope... so, use Gimp to create pixmap(aka .xpm) 
versions of your bitmaps.  This can be done by opening them in Gimp and save 
as, and select xpm from the file extension list, (and change the name 
extension to .xpm), Pixmap support is native in all supported versions of 
GTK, and don't use gdk-pixbuf for the loading process so it doesn't matter 
if the user has a broken version or not. so long as they have a version 

BTW I AM working on native support for DIB Sections in the GTK interface, it 
just requies that I do a lot of redesigning of Drawing code throughout the 
interface, so I am being carefull before I send in a Patch that will break 
everybody's  build. Once it is in place, Bitmaps should load properly with 
or without gdk-pixbuf support enabled. Its just taking longer than I thought 
because Win32 design is STUPID!!!


Send and receive Hotmail on your mobile device: http://mobile.msn.com

More information about the Lazarus mailing list