locked
Can I crop the DirectX::ScratchImage DxImage?(C++/CX/DirectX/Win 8) RRS feed

  • Question

  • I saved a image file from DirectX. Below my code.

    DirectX::ScratchImage DxImage; HRESULT hr_0 = DirectX::CaptureTexture( m_d3dDevice.Get() , m_d3dContext.Get() , d3DTexture.Get() , DxImage ); const Image* img = DxImage.GetImages(); auto Folder = ApplicationData::Current->LocalFolder; Platform::String ^szPath = Folder->Path + "\\frame.jpg"; HRESULT hr = SaveToWICFile( *img, DirectX::WIC_FLAGS_NONE , GUID_ContainerFormatJpeg , szPath->Data() );

    But My picture like this.

    Sometimes, I want to save Picture 1 so the Image need to be cut.

    How to cut it(DirectX::ScratchImage DxImage) half or other size?


    • Edited by KC-Steven Wednesday, January 29, 2014 5:17 AM
    Tuesday, January 28, 2014 9:01 AM

Answers