justinstenning / Direct3DHook

DirectX Capture and Overlays by using Direct3D API hooks
http://spazzarama.com/2011/03/14/c-screen-capture-and-overlays-for-direct3d-9-10-and-11-using-api-hooks
MIT License
583 stars 176 forks source link

Retrieving texture data is not resulting in correct image data #30

Open justinstenning opened 9 years ago

justinstenning commented 9 years ago

Original image: image

As Jpeg/Bitmap results in correct image however:

Retrieving raw pixel data: image

As PNG: image

ghost commented 9 years ago

This bug still remains. I though might have been fixed by earlier commits but no. Still PixelData and PNG shots not giving correct image data. Also got a error message from the BasicHLSL11.exe file after these types of screenshots. The error says : The Direct3D device has a non-zero reference count, meaning some objects were not released.

justinstenning commented 9 years ago

No Farukh, this still remains a problem, which is why the issue is still open.

You can ignore the non-zero reference count message.

ghost commented 9 years ago

I have tested 5 Games with it and posting their png and pixeldata result here.

1st Game : Call Of Duty 4 Modern Warfare = All the formats works fine. No Problem at all. DirectX9 Game.

2nd Game : Counter Strike Source = png and pixeldata have problem. DirectX9 Game The screenshots of the two different types are below:

PNG Format: pngdata

PixelData: pixel-data

3rd Game : FIFA 11 = png problem. Is not providing correct image data. Pixeldata is not getting any image data. Whole screenshot is blank. DirectX9 Game.

4th Game : Need For Speed Most Wanted = DirectX9 Game. Both png and Pixeldata problem here.

5th Game : Watch Dogs = DirectX11 Game. PNG problem not providing correct image data. Pixeldata format is not proving any image at all. Blank.

Hope this information will help you to solve this bug. Please feel free to ask me if any test you need to run regarding this bug.

Hope you will solve it soon. Thanks in advance...