GDI GetPixel not supported.........

Started by
1 comment, last by granat 24 years ago
It says in the MSDN library that the GDI-functions SetPixel & GetPixel are not supported by all devices. That sucks!! It guess only very old cards will not support these functions ?? (like 1 mb cards???)
-------------Ban KalvinB !
Advertisement
I think the devices mention in MSDN that don''t support are something like printers/plotters.
Other than that, I believe every graphics card support GetPixel/SetPixel.

PS: Anyone, do printers/plotters support GetPixel/SetPixel?
"after many years of singularity, i'm still searching on the event horizon"
Dot-matrix printers definitely won't support it, due to their sequential nature.

Plotters should be able to support it, and I don't see why laser printers can't, either. Both of these provide some "random access" to the page.

Who can tell? Even if the fundamental technology supports them in theory, the manufacturers and/or driver writers might not care to.

Maybe Microsoft have crippled the printer areas of GDI to not allow it. One way to definitely allow it would be to build the printer output on an in-memory GDI bitmap, then Blt that to the printer DC.

None of this relates to DirectX/OpenGL, though. In DirectDraw, you can call GetDC on a surface, and the returned GDI device context does support GetPixel/SetPixel, always.

Slowly, of course. 1) because GetDC and ReleaseDC do internal forms of Lock and Unlock, and 2) because GetPixel/SetPixel work with COLORREFs, which are always 24bit (4 bytes, one of which is always 0), and so have to do conversion to/from the surface pixelformat.

It should be possible to write your own asm GetPixel/SetPixel which are considerably faster than the GDI alternatives, although I don't really know, because I don't do asm, having got bored of 68k asm at Uni. I think I might have to pick x86 asm up soon, though.

TheTwistedOne
http://www.angrycake.com

Edited by - TheTwistedOne on 4/12/00 6:36:30 AM

Edited by - TheTwistedOne on 4/12/00 6:38:09 AM
TheTwistedOnehttp://www.angrycake.com

This topic is closed to new replies.

Advertisement