yj1214,
> Now i'm little confused...
>
> According to these posts,
[snip]
And rightly so.
What you see there is a problem where a row of elements (pixels) does not
need to be a multiple of the required alignment. Just think of 24-bit (3
byte) pixels. If you just put the first pixel of the second line directly
behind the last pixel of the first line it might not start on an alignment
boundary. In such cases the video card may require (to speed up
processing) every line of pixels being started on an alignment boundary
(padding the previous line of pixels to become a multiple of the alignment).
Actually, if you take a look at the BMP file format, thats exactly how an
image is stored in it (a single line of pixels is padded to become a
multiple of the alignment, in this case 4 bytes). :-)
> I think this illustrates your explanation of how alignment works,
[Snip]
> Am I not correct? i'm really confused about how alignment works...
Well, although that wasn't exactly what I ment (I was thinking about the
alignment of a full block of data/pixels, not its individual elements), I
can imagine that a per-pixel alignment could be possible/required somewhere
too (it could speed up the provcessing). It all depends on how the data is
used (which functions are going to use the stored data/how its provided to
the video-card).
In short, an alignment is a requirement of called functions, and below that
of the hardware under it (the video-card or other). There is therefore no
strictly defined rule about when to use an alignment, and which alignment is
needed.
Regards,
Rudy Wieser
-- Origional message:
yj1214 <
vmgxbq2...@user.narkive.com> schreef in berichtnieuws
GRey4bF6-cBO...@narkive.com...