Menu

#20 color conversion bug in blit()

closed
nobody
5
2012-10-09
2001-04-18
No

In my latest Allegro project, i store all my gfx as 24
bit bitmaps in datafiles. I want to make the program
independent of the existing video hardware, i.e. it
should support all color depths from 8 to 32. For this
purpose, i load the datafiles with set_color_conversion
(COLORCONV_NONE) and then blit the loaded bitmaps onto
output-device specific bitmaps, letting blit to the
conversion. However, if the bitmaps contain pink
colors, they get sometimes transparent. And, if i use
COLORCONV_DITHER, at the borders between transparent
and non transparent areas of my bitmaps, i get a lot
of pink pixels.
I have this behaviour at least when converting to
16bit and 8bit - and looking at the source code in
blit.c shows that blit() doesn't care about
transparency, even in the opposite conversion from
8bit to 32bit.

Discussion

  • Elias Pschernig

    Elias Pschernig - 2001-04-18

    very basic test case for the bug

     
  • Elias Pschernig

    Elias Pschernig - 2001-04-29

    added timing to the test

     

Log in to post a comment.