Capture fast ingame screen in DirectX in C++ or C# - c#

For a project i'm trying to capture the screen of a game using c++ or c#.
I know there are a lot of solutions on the web but none of them are working 100%
I'm wondering if someone can explain how I can capture it or give me a working example..
I'm curious if it's possible in c# with sharpDX or something else...
Kind regards!

You can use the SaveDDSTextureToFilefrom the DirectXTK library. It saves the current RenderTargetView Resource to a DDS file. Include ScreenGrab.h.
Usage:
ID3D11Resource* test = NULL;
mRenderTargetView->GetResource(&test);
SaveDDSTextureToFile(mContext, test, L"test.dds");
test->Release();

Related

How to pass images between C# and Ironpython with opencv (or Emgucv)

I'm working on a project which involves image processing being done in Python and finally the result must be displayed on a WPF UI. I've heard that it is possible to pass data (integer, string, ... etc) between C# and Python using Ironpython, but I couldn't find any solution for my problem. Can somebody help me out, I really appreciate it. Thank you !

control a wpf from matlab by using a c# dll

i would like to know weather it is possible to control some wpf application written in c# by using a c# dll out of matlab.
what i need is the possibility to start the MainWindow and i have to be able
to get some values into my controller.
What i found so far was things working from c# that use matlab, but the other way round seems not to be that much populatet, as i found nothing i could really use.
I allready tried to import a .net Library, but i dont seem to be able to open a external class from my dll.
So if you could help me on this it would be great.
Regards,
justSomeone
Ok, i did just find out, that i can also import my .exe file into Matlab instead of only dlls .
I am using the function NET.addAssebly('Path.exe') to do this.
Path.exe is just a symbol that it is directed to the place of the .exe file.
I achieved to be able to use my methods as i wanted i do have my instance of the class. So i am happy now. :D
But if you have other solutions which are more handy, dont hesitate to post them. There might still be interesting things to discover :)
Regards,
justSomeone

GraphEditPlus VideoInputDevices are missing

I am completly new with DirectShow and filters. I was reading some articles, tried some examples with C# and I've used libraries like AForge or DirectShow.NET. I've excluded AForge from my project because of huge latency and bad performance in my project. I've found good example where DirectShow.NET was used and after some refactoring performance of the code was fair enought so I want to try with that.
I couldn't make ISambleGrabber to work so now I'm trying to use GraphEditPlus, connect the graph and generate C# code as example for future use, but...
I cannot find VideoInputDevices filter there, I need to start Previewing and Capturing from webcam, but I cannot find it on the list. It is shown on VLC and is working with AForge and DirectShow.NET.
Mayebe I'm blind or I'm missing something? Any hints?
Yup, I'm blind - it's named here as Video Capture Sources which I haven't seen before.

Monotouch - select multiple photos

Is there a way to do this in MonoTouch?
http://definelabs.com/blogs/?p=17
I don't understand much of that Objective-C code...
I wrote an article on this: Accessing iPhone Album
I know this is an old post, but there is a demo app that I've created that lets you do the features Nicklas Savonen requested.
What this demo app does is, it will get the list of images from AssetLibrary and will load them in a UItableview, then maintain a selection status, the Tick image is just an overlay image that will be hidden/visible based on selection.
The following link explains the basic steps you need to take, since it would be difficult to understand by the project:
http://helpalittle.wordpress.com/2014/03/28/monotouch-multiple-image-picker/
And you can find the complete solution at the following path: https://onedrive.live.com/redir?resid=697F540B0A2F1506%21107
hope this helps.
I know am not helping much at this point, but you need to learn at least a bit of ObjectiveC to be able to read it. The issues is, that all the samples and plenty of resources for iOS development is in ObjC and converting it to Monotouch is not that complex, in fact all the constructs there have C# equivalent (the blocks in the sample you posted, are in fact anonymous methods).
More to the point, multiselection of the images is done in the iOS SDK 4.x, if I find some spare time this would be a nice little exercise for my blog.
As to what APIs to check for this, these are asset library APIs:
ALAssetsLibrary & ALAsset & ALAssetsGroup
in Monotouch there are classes in (pseudo code):
using MonoTouch.AssetsLibrary;
MonoTouch.AssetsLibrary.ALAsset;
MonoTouch.AssetsLibrary.ALAssetsLibrary;
MonoTouch.AssetsLibrary.ALAssetsGroup;

What's a good API for recording/capturing and playing back sound in Delphi and/or C#?

<flavor> I want to create a spelling test program for my grade schoolers that would let them enter and record their spelling words then test them on them through out the week.</flavor>
What's a good Delphi API with which I could select a recording device, capture and save sound files, then play them back?
I'm also toying with doing the same project in C#, so C# Sound capture/playback API recommendations would also be appreciated.
An alternative to recording would be to use the MS Speech API with C#, enter the words via keyboard, and have it state what was keyed in.
Just a thought... Good luck on your app -- it sounds like a really cool program!
I've found New Audio Components to be quite good for Delphi.
This component set looks promising though I've never used it myself. AudioLab 3.1 has both VCL components as well .NET 2.0 components which should allow you to use it whether you stay with developing your application in Delphi or move to C#. Finally, it appears to be Free for non-commercial use.
The best place to look for Delphi Components
(Audio)
http://www.torry.net/pages.php?id=167
Why not use the TMediaPlayer that comes with Delphi (in the System Tab of the Palette)?
It can record and play wave files very easily
I was also going to suggest AudioLab.

Categories