You may need to do some tracing at your end.
TBitmap is derived from
TRasterImage.
TRasterImage.
LoadFromIntfImage(IntfImage: TLazIntfImage) calls
IntfImage.
CreateBitmaps()
IntfImage.
CreateBitmaps calls
RawImage_CreateBitmaps for the platform widget set.
I'm using Gtk, so when I searched the LCL source for
RawImage_CreateBitmaps, I can find the implementations for GTk.
I can see a number of comments like:
// check if the depth is supported
// try some alternative (I'm not sure if we should fail here instead)
// if we don't have a visual we cannot draw anyway
// this is only a rough implementation, there is no check against bitsperpixel
// The gdk_pixmap_create_from_data creates only a two-color pixmap so we can not use it
// this is only a rough implementation, there is no check against bitsperpixel
The point being, my system throws a 'Failed to create handles'. Which means, the pixel format was identified as "not supported", and failed correctly. I checked a couple of the 24bit pixel formats, and they all failed. This is the ideal result.
I didn't get a divide by zero, so I'm guessing, whatever setup you have, is passing though a safety check and hitting a div/divmod command.
Either way, it looks like 24bit rawimages have little to no bitmap handle support. (Most likely because its not possible)