Re: [AD] COLORCONV_KEEP_TRANS in datafiles + cleanup

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> > Oh, I see. I'm wondering what reason there is for this? Storing 15 bit
> > bitmaps as 16 bit. It's what had confused me and led to the mistake..
> 
> Dunno... anyway the format is set in stone
> (tools/plugins/datimage.c:save_datafile_bitmap() is the master source).
> 
> I've attached a little program that demonstrates the bug: create a 24-bit
> pink.bmp bitmap with your pink.c code, convert it to 15-bit with the grabber
> and save it in a datafile. Then display it with read_pink. Not very nice...
> 

Yes, of course. I fixed it by just replacing makecol16 in the 15/16: case
with makecol_depth(bits,

Is that ok? Doubling the complete case for 15 bits might be sligthly faster,
but I guess not when loading a datafile..

--
Elias Pschernig



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/