screenshot

How to properly take a screenshot, globally?

∥☆過路亽.° 提交于 2019-12-18 12:17:31
问题 Background Since Android API 21, it's possible for apps to take screenshots globally and record the screen. The problem I've made a sample code out of all I've found on the Internet, but it has a few issues: It's quite slow. Maybe it's possible to avoid it, at least for multiple screenshots, by avoiding the notification of it being removed till really not needed. It has black margins on left and right, meaning something might be wrong with the calculations : What I've tried MainActivity.java

Disable screenshots in android ics

谁说我不能喝 提交于 2019-12-18 11:42:59
问题 For one of our secure apps, there is a requirement to disable the screenshot capability for the app in Android ICS. Is this possible on a non-rooted device? Thanks, Rajath 回答1: Why don't you add this line in your activity class. This will do the trick. // This disables screen shot to be taken for current activity getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE); You may want to have a look at Mark Murphy's blog post. 回答2: This will never be possible, period end of

Taking a screenshot with C\GTK

自古美人都是妖i 提交于 2019-12-18 11:14:02
问题 I'm trying to take a screenshot of the entire screen with C and GTK. I don't want to make a call to an external application for speed reasons. I've found Python code for this (Take a screenshot via a python script. [Linux]); I just need to figure out how to do that in C. 回答1: After looking at the GNOME-Screenshot code and a Python example, I came up with this: GdkPixbuf * get_screenshot(){ GdkPixbuf *screenshot; GdkWindow *root_window; gint x_orig, y_orig; gint width, height; root_window =

Emailing full screen of iPhone app

孤人 提交于 2019-12-18 11:13:56
问题 I am developing an iPhone app for creating images using built in graphics and user defined text. I want to be able to have my app, with built in graphics and user defined text, which can then be sent as a single image (much like a screenshot) to the email app to be emailed. Is there a way to do this without taking a screenshot, leaving the app, going into the Photos app, selecting the screenshot, and emailing it from there? Ultimately I would like to be able to have a button in my app that

How can I programmatically create a screen shot of a given Web site?

a 夏天 提交于 2019-12-18 11:11:37
问题 I want to be able to create a screen shot of a given Web site, but the Web site may be larger than can be viewed on the screen. Is there a way I can do this? Goal is to do this with .NET in C# in a WinForms application. 回答1: There are a few tools. The thing is, you need to render it in some given program, and take a snapshot of it. I don't know about .NET but here are some tools to look at. KHTML2PNG imagegrabwindow() (Windows PHP Only) Create screenshots of a web page using Python and

How can I programmatically create a screen shot of a given Web site?

那年仲夏 提交于 2019-12-18 11:11:03
问题 I want to be able to create a screen shot of a given Web site, but the Web site may be larger than can be viewed on the screen. Is there a way I can do this? Goal is to do this with .NET in C# in a WinForms application. 回答1: There are a few tools. The thing is, you need to render it in some given program, and take a snapshot of it. I don't know about .NET but here are some tools to look at. KHTML2PNG imagegrabwindow() (Windows PHP Only) Create screenshots of a web page using Python and

c++ fast screenshots in linux for use with opencv

一曲冷凌霜 提交于 2019-12-18 10:22:10
问题 I'm trying to find a fast way to take screenshots (as in 30 fps or over) for use with opencv in c++ All the information I've found online either involved windows.h or were too slow. Could someone provide me with some code that achieves this or at least point me in the right direction so I can solve this my self? 回答1: You can use this to get the screenshot into a structure of raw pixels. Pass that to OpenCV along with the Width & Height & BitsPerPixel and you should be good. #include <X11/Xlib

How do I include screenshots of the full page in my serenity report (and not only of the viewport)?

佐手、 提交于 2019-12-18 09:34:48
问题 This question is a part of another question I asked. However, I already found the answer to this part and thought it would be useful for other people as well. Part of my other question: I am using serenity in combination with cucumber for automated screen tests and want to include full-page screenshots in my serenity report. The screenshots in the report are normally only a capture of the viewport. Oftentimes however, this doesn't provide enough information as this is only a part of the

Take a screenshot of open website in python script

偶尔善良 提交于 2019-12-18 09:18:05
问题 I need to write a python script which opens a website and when the website is completly opened it takes a screenshot of the opened website. I wrote sth like this: import webbrowser import wx wx.App() link = "http://stackoverflow.com/questions" webbrowser.get('firefox %s').open_new_tab(link) screen = wx.ScreenDC() size = screen.GetSize() bmp = wx.EmptyBitmap(size[0], size[1]) mem = wx.MemoryDC(bmp) mem.Blit(0, 0, size[0], size[1], screen, 0, 0) del mem bmp.SaveFile('screenshot.png', wx.BITMAP

How do I flip an image horizontally flip with glReadPixels() Bufferedimage and out put with ImageIO?

自作多情 提交于 2019-12-18 08:53:38
问题 How do I flip an Screenshot image? I can't find my problem anywhere else. Example code: /* *@param fileLoc //Location of fileoutput destination *@param format //"png" *@param WIDTH //Display.width(); *@param HEIGHT //Display.height(); */ private void getScreenImage(){ int[] pixels = new int[WIDTH * HEIGHT]; int bindex; // allocate space for RBG pixels ByteBuffer fb = ByteBuffer.allocateDirect(WIDTH * HEIGHT * 3);//.order(ByteOrder.nativeOrder()); // grab a copy of the current frame contents