RE: [AD] Extra byte in 24 bit bitmaps

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


> >Anyway, you'd better allocate one byte at the end of each *line* so it
> >is more likely to work with all kinds of BITMAPs
Well, strictly speaking, it would work for BITMAPs created with
create_bitmap_ex, but all BITMAPs are not. One might fancy play around
with pointers....
And when coming to writing, you would maybe overwrite one pixel at the end
of
the line, which would place garbage on the BITMAP depending on the order of
the draw. But it's fine if you only read regular BITMAPs. I just wanted to
say this could be made more generic, and thus maybe of use to other people.

> Why would that be needed? All scanlines are allocated at the same time as
> one chunk of data, so if you read past the end of one you just wrap to the
> beginning of the next. This ought never to be a problem, except for the
> very last scanline where you will read from an unallocated byte.

> Lyrian? Is this Vincent or Lyrian I am talking to? :-)
Hmm, both actually :) I have split personalities and I never remembered
who I killed when I was the other me ;)

--
Lyrian, who senses another personality transfer coming ....
(Lyrian is my nickname, who was a (dice & paper) RPG character of mine)



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