screenshot

Screenshot shows black

会有一股神秘感。 提交于 2019-12-22 04:27:07
问题 I'm taking snapshots and creat thumbnails and then share this image. But the thumbnail shows all black. I have used the following code Bitmap bitmap; View v1 = v.getRootView(); v1.setDrawingCacheEnabled(true); bitmap = Bitmap.createBitmap(v1.getDrawingCache()); String url = Images.Media.insertImage( mContext.getContentResolver(), bitmap, "title", null); Can anyone tell me what is wrong with this code. EDIT private View.OnClickListener shareListener = new View.OnClickListener() { public void

Using completionSelector and completionTarget with UIImageWriteToSavedPhotosAlbum

左心房为你撑大大i 提交于 2019-12-21 22:22:30
问题 I'm trying to figure out a way to have my iOS app save a screenshot to the Camera Roll and then pop up an alert to tell the user that the screenshot was saved successfully. The only way I can think to do this would be with some form of an if/else loop (as you'll see in my pseudocode comments below), but I can't think of any syntax to work with the UIImageWriteToSavedPhotosAlbum function from UIKit. I've come across suggestions that say to use completionSelector and completionTarget on Apple's

Take screenshot of wpf popup window

倾然丶 夕夏残阳落幕 提交于 2019-12-21 21:27:12
问题 I try to take a screenshot of an application writen in WPF and the application is not captured, must I use a special tool to take the screenshot? 回答1: You can use RenderTargetBitmap to generate an image from your WPF control. public const int IMAGE_DPI = 96; public Image GenerateImage(T control) where T : Control, new() { Size size = RetrieveDesiredSize(control); Rect rect = new Rect(0, 0, size.Width, size.Height); RenderTargetBitmap rtb = new RenderTargetBitmap((int)size.Width, (int)size

Cucumber Java screenshots

我的梦境 提交于 2019-12-21 21:17:32
问题 Is there a way to take screenshots in between steps in Java Cucumber ? I have the following scenario : @Scenario_1 Given I log into url And I see the home page is displayed in English //Take screenshot And I click on 'Edit Profile' And I see the language set to 'English' When I change the language to Chinese //Take screenshot And I navigate to home page Then everything is displayed in Chinese //Take screenshot I want to take screenshots for certain steps of the scenario. I am currently taking

Screenshot of a webpage with Flash elements

可紊 提交于 2019-12-21 20:28:21
问题 I would like to take a screenshot of a page displayed in a WebView. The page contains flash elements - and here is the problem. When I take a screenshot all the flash parts of the page are blank. I am using this piece of code to take a screenshot: WebView webView = (WebView) findViewById(R.id.webview); Picture picture = webView.capturePicture(); Bitmap screenshot = Bitmap.createBitmap(picture.getWidth(), picture.getHeight(), Bitmap.Config.ARGB_8888); Canvas c = new Canvas(screenshot); picture

Webservice/API to grab a screenshot of another website? (known solutions are too slow) [closed]

南笙酒味 提交于 2019-12-21 17:04:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . From this question:- https://stackoverflow.com/questions/1342611/is-there-a-webservice-api-to-grab-a-screenshot-of-another-website and

Screen Capture in andengine gives upside down mirror image

纵然是瞬间 提交于 2019-12-21 16:17:08
问题 In my situation i haven't use RenderSurfaceView. I want to take a screen capture of my scene. But when i save the screen shot it shows upside down mirror image. Cant understand what im doing wrong here. Here is my code attachChild(screenCapture); share_clicked = 1; final int viewWidth = (int)camera.getWidth(); final int viewHeight = (int)camera.getHeight(); Log.d("camera width", "View width :" + viewWidth); Log.d("camera height", "View height :" + viewHeight); File direct = new File(

Automatic screenshot uploading on Mac like Cloud App

十年热恋 提交于 2019-12-21 10:57:49
问题 Cloud App has this neat feature wherein it automatically uploads new screenshots as they are added to the Desktop. Any ideas how this is done? 回答1: You can do similar things yourself without much in the way of programming. In OSX, you can configure "Folder Actions" to run a script, for example, when a new item appears in a folder, including the Desktop. You can then use the script to do whatever you want with the new files. This article at TUAW includes an example of uploading files to a web

How to make a screenshot of all the content of a Scrollview?

那年仲夏 提交于 2019-12-21 09:11:12
问题 I want to create a screenshot of a UIScrollView which should contain the whole content of the scroll view, even that content, which is currently not visible to the user. For that I tried the following two methods: func snapShot(view:UIView) -> UIImage { UIGraphicsBeginImageContextWithOptions(view.bounds.size, true, 0); view.drawViewHierarchyInRect(view.bounds, afterScreenUpdates: true); let image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; } func

Take screenshot in Unity3D with no lags

霸气de小男生 提交于 2019-12-21 06:03:13
问题 I have tried each of variants: http://wiki.unity3d.com/index.php/ScreenCapture Afterall, simple Application.Capturescreenshot(...) is the least laggy. Please, tell me, How I can take screenshots without ANY lags? Lots of games on Android has thiis feature, so it's not impossible. 回答1: The cause of lag while taking picture is when you try to perform all steps at the same time without waiting after each step. To fix this, you perform one action and wait for many frames then perform the next