screenshot

Getting a list of window WIds in QT

倖福魔咒の 提交于 2020-01-21 13:58:26
问题 I'm writing a library in QT which will take screenshots of arbitrary external windows. I know how to take the screenshot using QScreen::grabWindow() , but this takes as an argument a WId , and I would like to know if there is a way to get a list of WId s for all windows on the screen and/or desktop (or something similar, such as getting a WId for a specific window using a title name), via QT. I am aware that I can do this in a platform dependent way, such as EnumWindows in Windows, but I was

I need to set the path for saving the pictures with an application for Android and IOS with UNITY

最后都变了- 提交于 2020-01-21 07:17:48
问题 My actual code: function Update() { if(Input.GetMouseButtonDown(0)) { Debug.Log("foto"); Application.CaptureScreenshot(Application.dataPath + "Screenshot.png"); } } I need the path for the output of every photo for this function. Thanks! 回答1: You can save files to Application.persistentDataPath. Unity apps do not have write permissions to Application.dataPath on Android or iOS devices. Also, don't forget to join the path and the folder name with a forward slash: Application.CaptureScreenshot

Preventing snapshot view of your app when coming back from multi-tasking

末鹿安然 提交于 2020-01-21 01:43:46
问题 The problem is this - My app lets you passcode protect itself. I use an interface just like passcode protecting the phone. This has always worked fine, until multi-tasking came along. The passcode protection still works, but there is one issue. Apple does something special to make it look like our apps are loading quicker when they come back from the background. The os takes a picture of our screen just before the user leaves the app, and it displays that while the rest of the app is still

Preventing snapshot view of your app when coming back from multi-tasking

亡梦爱人 提交于 2020-01-21 01:42:51
问题 The problem is this - My app lets you passcode protect itself. I use an interface just like passcode protecting the phone. This has always worked fine, until multi-tasking came along. The passcode protection still works, but there is one issue. Apple does something special to make it look like our apps are loading quicker when they come back from the background. The os takes a picture of our screen just before the user leaves the app, and it displays that while the rest of the app is still

How can i take/merge screen shot of Google map v2 and layout of xml both programmatically?

你说的曾经没有我的故事 提交于 2020-01-19 05:04:05
问题 I am taking screenshot of Google Map v2 by using code of this answer which is giving me output : Which is fine to take screen shot of Map With following code i can take the screen shot of Layout with black map screen thats ok as with following code Map will black in ScreenShot String mPath = Environment.getExternalStorageDirectory().toString() + "/" + "myTestScr" + System.currentTimeMillis() + ".jpeg"; Bitmap bitmap; View v1 = (View) findViewById(R.id.rootviewtest); v1.setDrawingCacheEnabled

Python cross platform compatible multi screen screenshot

情到浓时终转凉″ 提交于 2020-01-17 05:44:08
问题 Python interpretor used: 2.7 (having trouble with python3.5 py2app on OSX 10.11 I am working on an interesting screenshot app using python and pygame but i am stuck at 1 screen limit since pygame doesn't seem to implicitly support multiple screens. My problem is that right now I use pyautogui screenshot function to capture the whole screen and i open it in a pygame fullscreen window where i can modify the image and such. I would like to know if there is a way to screenshot multiple displays

Need to improve resolution of screenshot from OpenGL

旧城冷巷雨未停 提交于 2020-01-16 13:18:33
问题 I want to get a screen shot from current scene in OpenTK with good resolution. I am using GL.ReadPixels to get a photo for the scene.If I save the photo to disk; I found it with low resolution/quality. following C# code is used to get a photo for the scene : Bitmap bmp = null; if (GraphicsContext.CurrentContext != null) { glControl_window.Invalidate(); int w = glControl_window.ClientSize.Width; int h = glControl_window.ClientSize.Height; bmp = new Bitmap(w, h); System.Drawing.Imaging

Reading osx screenshot image in sandbox

纵然是瞬间 提交于 2020-01-16 01:14:19
问题 I want to get the screenshot triggered by different osx shortcuts. So i add an observer with kMDItemIsScreenCapture . Following code was used to add observer. _query = [[NSMetadataQuery alloc] init]; [_query setDelegate:self]; [_query setPredicate:[NSPredicate predicateWithFormat:@"kMDItemIsScreenCapture = 1"]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenshotQueryUpdated:) name:NSMetadataQueryDidUpdateNotification object:_query]; [_query startQuery];

A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll

让人想犯罪 __ 提交于 2020-01-15 07:35:09
问题 I'm trying to make a fullscreen screencapture and load it into an pictureBox, but it's giving me this error: A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll Additional information: Ongeldige parameter. Code: using (Bitmap bmpScreenCapture = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)) { using (Graphics g = Graphics.FromImage(bmpScreenCapture)) { g.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen

how to screenshot a div using phantomJS

痞子三分冷 提交于 2020-01-15 05:17:26
问题 Hi does anyone here can help me to screenshot my div using phantomJS? How can i Screenshot my #dropzone then append it on the same page? Please help. 回答1: There are two ways you can partially render a webpage. 1) Make an extra page with just the div, screenshot it using render, and use the result on your actual page. 2) Use the clipRect functionality (as described here): var clipRect = document.querySelector(selector).getBoundingClientRect(); page.clipRect = { top: clipRect.top, left: