screenshot

Create rectangle with mouse drag, not draw

删除回忆录丶 提交于 2019-12-17 16:41:03
问题 I want create a rectangle using the whole screen. By using the whole screen, I mean something like this: To start, is that even possible in Java, using the whole screen like that? Second, how would I go about doing it? Another thing, I do not want to draw an actual rectangle, I want to create on, as in a new java.awt.Rectangle . 回答1: nb- First thing to note, this is done using Java 7, creating a transparent window in Java 6 is done differently and is not possible below update 10 (I believe)

How to take screenshot programmatically on Android? [duplicate]

不打扰是莪最后的温柔 提交于 2019-12-17 16:26:27
问题 This question already has answers here : How to programmatically take a screenshot on Android? (24 answers) Closed 5 years ago . I want to take a fullscreen screenshot programmatically , for example, one of the android home screen or a menu. How can I get a view of the home screen in my application? I want to take it programmatically!!! It doesn't matter if it requires root mode! Help me please and sorry for my English! 回答1: Use following code Bitmap bitmap; View v1 = MyView.getRootView(); v1

How can I take a screenshot and save it as JPEG on Windows?

China☆狼群 提交于 2019-12-17 10:33:06
问题 I'm trying to find a (somewhat) easy way to take a screenshot on window and save the resulting HBITMAP as a JPEG. The tricky part here is that since the code is in C I can't use GDI+ and since the code is a module for a bigger program I can't neither use an external lib (like libjpeg). This code takes a screenshot and returns a HBITMAP. Saving that bitmap into a file is easy. the problem is that the bitmap is 2 or 3mb. HDC hDCMem = CreateCompatibleDC(NULL); HBITMAP hBmp; RECT rect; HDC hDC;

create screenshot of webpage using html2canvas (unable to initialize properly)

戏子无情 提交于 2019-12-17 08:59:32
问题 I am attempting to use http://html2canvas.hertzen.com/ to take screenshots of my webpage. I am unable to initialize a canvas element using... var canvas = $('body').html2canvas(); If I were able to get a proper canvas I would follow with something like var dataUrl = canvas.toDataURL(); //get's image string window.open(dataUrl); // display image Unfortunately, the documentations is very limited IMO. http://html2canvas.hertzen.com/documentation.html . I do not believe I need to preload as I am

Best way to take screenshots of tests in Selenium 2?

扶醉桌前 提交于 2019-12-17 07:10:27
问题 I need a way to take screenshots of my functional tests. Right now I'm using Selenium 2 with C# bindings. I pretty much want to take a screenshot at the end of the test to make sure the desired page is displayed. Are there any particular tools you guys know of that I can incorporate into my C# code that will trigger a screenshot? I couldn't find a built-in Selenium 2 solution (without looking it over). 回答1: To do screenshots in Selenium 2 you need to do the following driver = new

Why does my programmatically created screenshot look so bad on iOS 7?

萝らか妹 提交于 2019-12-17 07:05:43
问题 I am trying to implement sharing app with facebook. I used this code to take the screenshot: CGSize imageSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height); UIGraphicsBeginImageContext(imageSize); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); It works great on iOS 6, but in iOS 7 the image looks very bad. I used this answer: iOS: what's the fastest, most

Disabling iPhone screenshot feature

主宰稳场 提交于 2019-12-17 04:32:09
问题 I'm working on an enterprise iPhone application for a client, the issue at hand is customer information will show up on the phone. My client is worried that the information could be caught using the iphone screen capture feature (home + power button), then emailed or synced from the phone. Is there any way to disable the screen capture feature? Can this be done programatically or is is possible through a configuration profile? 回答1: if your customer could retain the ownership of a handset,

How to take screenshots fast in Java?

匆匆过客 提交于 2019-12-17 04:30:24
问题 I am implementing a simple eye tracker, which requires fast screenshoting of what is happening on the screen simultaneously with capturing the video from webcam. The thing is that the way of doing it with Robot, mentioned here: https://stackoverflow.com/questions/2475303/java-library-for-capturing-active-window-screenshot is extremely slow. By the way, retrieving the video from a webcam works much faster and returns the byte array, which is very fast to be processed. Does anybody know a

How to prevent Screen Capture in Android

纵饮孤独 提交于 2019-12-17 02:41:33
问题 Is it possible to prevent the screen recording in Android Application? I would like to develop an Android Secure Application. In that I need to detect screen recording software which are running background and kill them. I have used SECURE FLAG for prevent screenshots. But I dont know is it possible to prevent Video capturing of Android Screen also. Let me know how to prevent screen capturing (video / screenshots). 回答1: I'm going to say that it is not possible to completely prevent screen

How to convert a UIView to an image

一曲冷凌霜 提交于 2019-12-17 02:10:12
问题 I want to convert a UIView to an image and save it in my app. Can someone please tell me how to take screenshot of a view or convert it to an image and what is the best way to save it in an app (Not camera roll)? Here is the code for the view: var overView = UIView(frame: CGRectMake(0, 0, self.view.frame.width/1.3, self.view.frame.height/1.3)) overView.center = CGPointMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds)-self.view.frame.height/16); overView.backgroundColor =