-
bits per pixel
Now this seems simple enough, but it doesn't seem to work.....
Code:
'first surface is created from file into imgDesc
Dim ImageWidth As Long
Dim ImageHeight As Long
Dim ImageBPP As Long
ImageWidth = imgDesc.lWidth 'this works
ImageHeight = imgDesc.lHeight 'this works too
ImageBPP = imgDesc.ddpfPixelFormat.IRGBBitCount 'this always returns 0
0 bpp? :confused:
-
did you flag the DDSD_PIXELFORMAT bit on dwFlags before passing the DDSURFACEDESC2
-
If I do this:
Code:
imgDesc.lFlags = DDSD_CAPS Or DDSD_PIXELFORMAT
When I come to blit the image using Blt, I get invalid procedure call. But blitting works without DDSD_PIXELFORMAT set.
I'm totally confused! :confused: :confused: :confused: