screen-capture

C# Capture screen to 8-bit (256 color) bitmap

纵饮孤独 提交于 2019-12-09 23:03:02
问题 I'm using this code to capture the screen: public Bitmap CaptureWindow(IntPtr handle) { // get te hDC of the target window IntPtr hdcSrc = User32.GetWindowDC(handle); // get the size User32.RECT windowRect = new User32.RECT(); User32.GetWindowRect(handle, ref windowRect); int width = windowRect.right - windowRect.left; int height = windowRect.bottom - windowRect.top; // create a device context we can copy to IntPtr hdcDest = GDI32.CreateCompatibleDC(hdcSrc); // create a bitmap we can copy it

Is it possible to capture only a part of the screen, or even of a particular view of another app?

只谈情不闲聊 提交于 2019-12-09 21:41:50
问题 Android allows to capture a full screen into an image or a video, using the MediaProjection class (shown here for example for images). I was wondering how far can we go with this : Is it possible to capture only a specific area of the screen? Is it possible to capture an image of a specific view of another app ? Is it possible to get the bitmap of an ImageView of another app (the one that's saved using setImageBitmap, for example) ? 回答1: No, no and no. This API basically gives you access to a

Android: Screencap to bytes directly - Skip saving to file

送分小仙女□ 提交于 2019-12-09 19:29:53
问题 I use the following code to take screenshot on a rooted device: sh = Runtime.getRuntime().exec("su", null,null); os = sh.getOutputStream(); os.write(("/system/bin/screencap -p " + "/sdcard/img.jpg" + "\n").getBytes("ASCII")); os.flush(); os.close(); sh.waitFor(); myBitmap = BitmapFactory.decodeFile("/sdcard/img.jpg"); As i want to take screenshots frequently, I don't want to first save it to the file and then read the bytes. Is there a better way to get the screenshot bitmap directly? I just

fastest method to capture game screen shots in c#?(more than20 images per second)

南楼画角 提交于 2019-12-09 00:15:11
问题 How can i make screenshoots to the entire game screen very fast? Somthing like 20-30 per second?(i want to convert them to video) [[1]] I've tried WMEncoder.Results were that WMEncoder can capture the screen and regions of screen only in a video format (wma) using a set of preconfigured codecs. (29 fps best encode result).WMEncoder can not make screenshots. [[2]] I've tried DirectX : Surface s = device.CreateOffscreenPlainSurface( Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds

Using xuggle without installing for a java web application

依然范特西╮ 提交于 2019-12-08 14:18:23
I have created a Screencast applet for WIndows OS. The applet uses xuggle to encode and decode videos. It gives the following error when xuggle is not installed on the system as it tries to load some native code: 2012-07-29 12:40:28,452 [AWT-EventQueue-2] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-ferry; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem Exception in thread "AWT-EventQueue-2" java.lang.UnsatisfiedLinkError: no xuggle-ferry in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java

How to retrieve the ajax data whose loading requires a mouse click with PhantomJS or other tools

这一生的挚爱 提交于 2019-12-08 09:08:38
I'm using PhantomJS to retrieve this page: Target Page Link . The contents I need are under the "行政公告" and "就業徵才公告" tabs. Because this page is written in Chinese, in case you cannot find the tabs, you can use "find" function of the browsers to find the "行政公告" and "就業徵才公告" tabs. Because the contents under the "行政公告" tab are the loaded as the default option, I can easily use the script below to retrieve the page: var page = require('webpage').create(); var url = 'http://sa.ttu.edu.tw/bin/home.php'; page.open(url, function (status) { var js = page.evaluate(function () { return document; });

How to retrieve the ajax data whose loading requires a mouse click with PhantomJS or other tools

一世执手 提交于 2019-12-08 07:10:39
问题 I'm using PhantomJS to retrieve this page: Target Page Link. The contents I need are under the "行政公告" and "就業徵才公告" tabs. Because this page is written in Chinese, in case you cannot find the tabs, you can use "find" function of the browsers to find the "行政公告" and "就業徵才公告" tabs. Because the contents under the "行政公告" tab are the loaded as the default option, I can easily use the script below to retrieve the page: var page = require('webpage').create(); var url = 'http://sa.ttu.edu.tw/bin/home

Using xuggle without installing for a java web application

人盡茶涼 提交于 2019-12-08 06:40:16
问题 I have created a Screencast applet for WIndows OS. The applet uses xuggle to encode and decode videos. It gives the following error when xuggle is not installed on the system as it tries to load some native code: 2012-07-29 12:40:28,452 [AWT-EventQueue-2] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-ferry; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem Exception in thread "AWT-EventQueue-2" java.lang

ScreenCapture via MediaProjection without user intervention in Kiosk apps - Android

爱⌒轻易说出口 提交于 2019-12-07 17:04:13
问题 I work for a digital signage company which has Android devices running in kiosk mode. Lately, we wanted to add screen capture for debugging. The easiest way to do that was to use getWindow().getDecorView().getRootView().getDrawingCache() to create bitmap and to send it over the network, but this will not capture videos as it's been rendered in surface view. MediaProjection's createVirtualDisplay seems promising, but the explicit permission needed to use this feature is not acceptable. Even

How to disable some part to be displayed as TVOut in iOS 5?

£可爱£侵袭症+ 提交于 2019-12-06 04:58:33
问题 As we all know in iOS 5 we don't require to add separate lines of code of TVOut feature. They have integrated that functionality as an in-built feature. What my question is: What if in my application there are some my custom views available, which i don't want to showcase as TVOut presentation. It should be display on device only, not on projection board. I have checked the TVOut code which we use for iOS version <5.0, but there they are capturing window image and passing it. How to prohibit