Re: How to correct upside down image?
- From: "Everett Joline" <ejoline@xxxxxxxxxxxxx>
- Date: Fri, 24 Jun 2005 09:46:02 -0400
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.
>
.
- Follow-Ups:
- Re: How to correct upside down image?
- From: Rhett Gong [MSFT]
- Re: How to correct upside down image?
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: How to correct upside down image?
- References:
- How to correct upside down image?
- From: Everett Joline
- Re: How to correct upside down image?
- From: Everett Joline
- Re: How to correct upside down image?
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: How to correct upside down image?
- From: Everett Joline
- Re: How to correct upside down image?
- From: Rhett Gong [MSFT]
- How to correct upside down image?
- Prev by Date: Re: mmioOpen memory leak
- Next by Date: Re: How to correct upside down image?
- Previous by thread: Re: How to correct upside down image?
- Next by thread: Re: How to correct upside down image?
- Index(es):
Relevant Pages
|