Commits on Source (6)
-
BITMAPINFO is actually BITMAPINFOHEADER and a dummy RGBQUAD. It's better to have our own with the 3 fields. The red/green/blue fields were not used, just taking enough space in the structure. We could pass the proper sizeof in the BITMAPINFOHEADER when the 3 values are used. It works with it on my machine, but it may not on older Windows or older GPU drivers.
219ad8ea -
It has to be done before the picture planes are updated.
3cff2b38 -
It doesn't matter if the source has some padding with a different pitch than our buffer. The plane copies will work regardless.
088ae9eb -
It's cleaner than using a dummy picture. We only support formats with a single plane. And we don't need to recompute planes each time. Also picture_UpdatePlanes() can fail (but not on RGB format). We don't need to fix that.
e14aaa9a -
It's already stored in bih->biBitCount anyway.
a7575405 -
The values are stored on 16 bits, so we must not use biBitCount to compute the pitch of a line but the actual number of bytes per pixel.
e5d248af