GDI+ uses advanced cpu op codes as well as whatever GDI uses, since it sits on top of GDI for alot of its basic functionality. GDI funcs are definitely hardware accelerated, but of course your mileage will vary depending upon your video card's driver. They (supposedly) do the same thing, but with different formats of information. I'm still not sure what was going on, but I tried everything I could think of (which was quite a bit) and none of it made StretchDIBits behave in a manner consistant with its documentation.Īnyways, the difference is that StretchDIBits uses a device independant bitmap (DIB) as the source, while StretchBlt uses a device-dependant bitmap (DDB) as a source. I found several knowledge-base articles describing problems with StretchDIBits, but none of them covered the issues I was seeing (such as the function doing nothing or drawing parts of the image upside down or drawing black rectangles) were caused by any of the documented problems. I then decided to just create memoryDCs, select the DIB into them, and use StretchBlt and it worked fine with the obvious parameters. ![]() ![]() In a project I did for work where I was working with DIBs, I spent days trying to get StretchDIBits to work and the closest I cam basically involved using random magic numbers for the various parameters. ![]() Well, in my experience, StretchDIBits isn't actually implemented properly so you can't compare it to StretchBlt at all.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |