Re: How to correct upside down image?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



To capture the DX9 screen I first created an OffscreenPlainSurface
and then called GetRenderTargetData to put the data in a buffer.
D3DSURFACE_DESC VDesc;

vidGen::vidGen() //constructor for the video generator

{

//Get front buffer screen size

LstErr= g_pd3dDevice->GetRenderTarget( 0, &ppRenderTarget);

LstErr= ppRenderTarget->GetDesc(&VDesc);

//create the surface to store the captured bitmaps

LstErr= g_pd3dDevice->CreateOffscreenPlainSurface(

VDesc.Width, VDesc.Height, VDesc.Format, D3DPOOL_SYSTEMMEM, &pBuf, NULL);

} //vidGen

After locking the buffer I called avi.AppendNewFrame.

Attempting to change the sign of Desc.Height during this process
was not well received since it is typed as unsigned.

So where do I change it?

Thanks Rhett for all your effort on this,
E-Jo

"Rhett Gong [MSFT]" <v-raygon@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:MPiokUIeFHA.4856@xxxxxxxxxxxxxxxxxxxxxxxx
>I downloaded the code from codeproject. It uses gdi drawing and following
> line to save each frame.
> avi.AppendNewFrame(hBackBitmap);if(nCount>=20) DestroyWindow(hWnd);
>
> But you used DX whose direction of y is different from Windows, so could
> you let us know how you grabbed the frame in your code please?
>
> Thanks,
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn
>
> This posting is provided "AS IS" with no warranties and confers no rights.
>


.



Relevant Pages

  • Re: Capturing a really long clip
    ... second one fires you know the second half has data. ... interrogate the position of the buffer at all. ... I have set notification positions for the capture ... When I check the read and capture cursor positions it seems ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Capturing from 2 secondarybuffers
    ... >>> Is it possible to capture from 2 multiple buffer using directsound ... I nned to capture these ... > And also if possible is there any equalization method using directsound as ... > i`ve got stuck as the Parameq effect class was of no use ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Capturing from 2 secondarybuffers
    ... >> Is it possible to capture from 2 multiple buffer using directsound ... I nned to capture these ... And also if possible is there any equalization method using directsound as ... i`ve got stuck as the Parameq effect class was of no use ...
    (microsoft.public.win32.programmer.directx.audio)
  • Play is Skipping whenever there is some activity on PC
    ... private Label labelMainInputformatText; ... public CaptureBuffer applicationBuffer = null; ... // Create DirectSound.Capture using the preferred capture device ... Creates a capture buffer and sets the format ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Real time effects
    ... > I want to be able to do real time effects on an input audio signal, ... > sound card from an external input. ... I know I can capture the sound ... You want to start with a FullDuplex buffer (if you plan ...
    (microsoft.public.win32.programmer.directx.audio)