On Fri, 5 Feb 2021 11:01:43 +0100, R.Wieser wrote:
>
> I cannot help but wonder : What would you need to do on Vista, 7, 8 and 10 ?
> And why didn't they mention it ? <whistle>
While it might be due to incompetence of the one who filter the
documentation, the filtering itself exist because MS hate their
bad-for-bussiness old Windows versions.
> but I imagined it could just have been a
> "hardlink" to Kernel32's SetLastError.
Ideally, yes. But it's like copy-pasted source code of SetLastError which
was renamed to GdiSetLastError instead.
> Not supporting 2bpp is unexpected to me. For the rest ? Yup, either
> values that cleanly divide 8 bits (no remainder) or multiples of it.
If I read the Windows history, Windows never did support 2-bit display.
Windows (v1.0) development started when EGA doesn't yet exist. CGA's 2-bit
320x200 display is equal to 40x25 text display mode, whose pixel resution is
way too low for Windows. So, Windows uses 1-bit 640x200 display mode instead
- which is used when it was first presented to puclic (at 1983, before EGA
was born). 4-bit display wasn't possible and officially supported until 1
year later after EGA was born.
In EGA display adapter, 640x350 was the only other 2-bit display. But EGA
also has 4-bit 640x350. MS think that, there's no point of using 4-colors
graphics when 16-colors one is already available - especially if the code
for handling 2-bit graphic is not yet available. BMP's lack of support for
2-bit graphics is simply because there's no code for handling 2-bit image.
1-bit image handling on the other hand, is still needed and supported,
because it is used by fax machines and printers. But only for image
processing. Speaking of 1-bit, it'll be interresting if we can use 1-bit
1024x768 screen. :)
> Actually ... Although the 16bpp mode uses 16 bits to /store/ the pixel, by
> default CreateDIBSection uses just 5 bits for each of the red, green and
> blue colors - adding up to a total of just 15 bits. :-)
Oh, right. I forgot about that.
But it depends on the compression type. If it's RGB, it uses R5G5B5. If it's
Bitfields, it uses R5G6B5.
15-bit Super VGA display adapter's native pixel format is R5G5B5, so BMP
can't actually store that format, because it can only store is as RGB
format.
> That stuff makes my brain hurt - just by trying to imagine why such choices
> where made.
Likely due to new innovasions and adaptations. If we have VGA as the first
display technology, we might not have 1-bit and 4-bit pixel formats.