screenshot

Web Page Screenshots with PHP?

筅森魡賤 提交于 2019-12-18 08:46:25
问题 I know there is not a direct way to take a screen shot of a web page with PHP. What would be the most straightforward way to accomplish this? Are there any command line tools that could do this that I might be able to execute from a PHP script (I'm thinking something that would run in a 'NIX OS (OS X and/or Linux in particular)? Edit: Or maybe some sort of web service I could access via SOAP or REST or ... Edit #2: I found a related question discussing the CLI option, but I'd still be open to

Change the Location of Screen Shots Saved by the iOS Simulator

泄露秘密 提交于 2019-12-18 07:28:16
问题 I'd like to change the location that screenshots created via File > Save Screen Shot in the iOS Simulator are saved from the desktop to a folder of my choice. How can this be done? Perhaps there's a user defaults value I could change, much like the one specifying the location of standard screenshots on OS X? 回答1: In Xcode 9 you can hold down Option while saving a screenshot and we will prompt you for the location. Check the "Use this as the default location" box to make the selected directory

Getting screenshot of a child window running OpenGL in it (Windows)

↘锁芯ラ 提交于 2019-12-18 07:06:11
问题 I have a main window with children. I need to take screenshots programmatically to crop and draw them back on my main window. The way I do this is: HDC hDC = GetWindowDC(hWnd); HDC memDC = CreateCompatibleDC(hDC); HBITMAP memBM = CreateCompatibleBitmap(hDC, Width, Height); HBITMAP OldBM = (HBITMAP)::SelectObject(memDC, memBM ); BitBlt(memDC, 0, 0, Width, Height , hDC, BEGINX, BEGINY, SRCCOPY); int Bpp = GetDeviceCaps(hDC,BITSPIXEL); int size = Bpp/8 * ( Width * Height ); BYTE *lpBits = new

Take screenshot of desktop when Windows is locked (Win+L)

不打扰是莪最后的温柔 提交于 2019-12-18 06:56:51
问题 I want to take a screenshot of desktop while Windows is locked (with Win+L). Standard methods make a black screen, with code of pixel: COLORREF color = GetPixel(hdc, x, y); equal -1. Neither a user mode program nor a service could capture a useful image. Any ideas? 回答1: GetPixel and BitBlt won't work when the desktop isn't physically displayed on the monitor. You may have some luck capturing individual windows with PrintWindow. However, not all applications respond to PrintWindow calls the

Faster alternative to java.awt.Robot.createScreenCapture?

流过昼夜 提交于 2019-12-18 05:59:27
问题 I'm making a program that requires at least 24 screenshots per second to be captured. Currently with the code below I'm only getting 1 per every ~94 milliseconds, so about 10 per second. I'd prefer not to use any 3rd party libraries because I'm trying to keep it as small as possible, but if I'd get significant performance increase I'd be willing to. I'm also trying to keep this platform independent, but again, if it would be a really significant performance increase I'd be willing to keep it

How can I get screenshot of specified element using WebDriver in C#

旧城冷巷雨未停 提交于 2019-12-18 05:24:09
问题 I have my little project written on Java and I need to rewrite it in C#. It's almost done, but I am stuck on getting screenshot of element using Selenium webdriver. I did it in Java in the next way: public String saveImage(){ String src = ""; try{ File screenshot = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); BufferedImage fullImg = ImageIO.read(screenshot); Point point = elementToScreent.getLocation(); int eleWidth = elementToScreent.getSize().getWidth(); int eleHeight =

Capturing EAGLview content WITH alpha channel on iPhone

拜拜、爱过 提交于 2019-12-18 05:13:30
问题 have been struggling with this issue for quite some time now and couldn't find an answer so far. Basically, what I want to do, is capturing the content of my EAGLview and then use it to merge it with other images. Anyway, the mainproblem is, that everything transparent in my EAGLview renders opaque when saving it to the photoalbum or putting it into a UIImageView. Let me share some code with you, I found somewhere else: - (CGImageRef) glToUIImage { unsigned char buffer[320*480*4];

screenshot of a winforms control through C#

…衆ロ難τιáo~ 提交于 2019-12-18 04:22:20
问题 Is it possible to get a screenshot of a control in winforms without actually displaying it on the screen? How about a webBrowser component? 回答1: Yes. This can be done. I whipped up a sample program to do it. Forgive my naming conventions and code organization, this was whipped up very quickly. You can modify it to better fit your needs, but this shows the basics. I have a single form with three controls: button1: Button with the default settings. button2: Button with the Visible property set

Screenshots using Selenium IDE Firefox plugin

假装没事ソ 提交于 2019-12-18 04:19:10
问题 Using Selenium IDE Firefox plugin, I want to take automated screenshots. The test script contains of two lines: Command: open; Target: http://www.google.com Command: captureEntirePageScreenshotAndWait The log shows: [info] Executing: |open | http://www.google.com | | [info] Executing: |captureEntirePageScreenshotAndWait | | | [error] Unexpected Exception: [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath]" nsresult:

view.getDrawingCache() is deprecated in Android API 28

这一生的挚爱 提交于 2019-12-18 03:16:05
问题 In android API 28 view.getDrawingCache() has been deprecated. Is there any newer solution to generate a Bitmap of a particular view in android. 回答1: Two ways to get bitmap of view Using Canvas Using Pixel Api Canvas Example public Bitmap getBitmapFromView(View view) { Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); view.draw(canvas); return bitmap; } public Bitmap getBitmapFromView(View view,int defaultColor)