FAQ Database Discussion Community


Why does my iPhone app overflow?

iphone,xcode,screenshot
I'm new to iPhone development and was wondering why my app overflows the content despite being in the middle of the storyboard? ...

How to make a screen shot of my actual window

delphi,screenshot,delphi-2009
I defined a Tactionlist which contains all actions to show/hide my forms. This could be modal (showmodal) or non modal (visible:=true). I found some code to catch the screen shots by this: procedure GetScreenShot(shotType: TScreenShotType; var img: TJpegImage); var w,h: integer; DC: HDC; hWin: Cardinal; r: TRect; tmpBmp: TBitmap; begin...

Can Media Projection api take a screenshot from my home screen on lollipop?

android,screenshot,android-5.0-lollipop
Still not understanding if this is possible without root or not.I think that if it is possible to record the screen on video, this is also possible, have anyone done it yet? Been learning some code from this project, but still nothing...

How to take a screenshot with low quality

objective-c,image,osx,screenshot,resolution
Is there a way to a take a screenshot (low level quality) on osx programmatically? I developed a function like below: CGImageRef resizeImage(CGImageRef imageRef) { CGRect thumRect; CGPoint point; point.x = 0; point.y = 0; thumRect.origin = point; thumRect.size.height = 225; thumRect.size.width = 360; CGImageAlphaInfo alphaInfo = CGImageGetAlphaInfo(imageRef); if (aplhaInfo...

Getting View from activity in android for screenshot?

android,screenshot
I want trying to implement a screenshot feature for android. For that i want a view from android's activity. I am not allowed to use the R.id.viewid as I am implementing this as part of library and not application. so I am trying to use activity.getWindow().getDecorView Please let me know...

GTK/GDK Algorithm to take full screenshots of all monitors

linux,gtk,screenshot,gdk
Hi all I'm fairly new to the whole GTK game and needed some help with an algorithm to take screen shot of all monitors. I was thinking something along these lines can you please guide me: gdk_display_manager_list_displays each display can have multiple screens (screens means monitors?) so use gdk_display_get_n_screens to...

phantomjs image width not getting as expected

javascript,phantomjs,screenshot,viewport,browser-width
when i take screenshots using phanomjs using the following code works fine and I am getting width as 1920px and height is not a problem for me. var webPage = require('webpage'); var page = webPage.create(); page.viewportSize = { width: 1920, height: 1080 }; page.open("http://www.google.com", function start(status) { page.render('google_home.png'); phantom.exit(); but,...

Black part of page during capture with CasperJS

javascript,phantomjs,screenshot,casperjs,capture
I have a strange problem. I have to take screenshots from vk.com in album with comments. In this case everything is ok: But when i click to load more comments, the screenshot has a black lower part: The code is pretty simple: // click on image casper.waitForSelector(".photo_row_img", function() { this.click('.photo_row_img');...

When does firefox take website screen shot for its home page?

firefox,screenshot
When ever I earn a reputation, firefox understand and refresh my thumbnail. I want to know how it works and when does firefox take website screenshot for its home page? Is there any meta tag or something like this to force firefox to take screenshot? ...

How to take a screenshot with C++ Builder? [closed]

c++,screenshot,c++builder,firemonkey,vcl
I know that there are a lot of answers about my question, but I never understand what I showld do. I just need to take a screenshot of part of my Form on Windows OS, for example: I need to take a screenshot from the position X=30 untill X=80 and...

Xcode Objective-C ShotBlocker: How to detect and block screenshots [duplicate]

objective-c,xcode,block,screenshot,detect
This question already has an answer here: Notification of or detecting screenshot being taken? 4 answers iOS Detection of Screenshot? 4 answers In an app I'm creating, you're not allowed to take screenshots. I was wondering how you could detect and block screenshots. I found out you could do...

No image in Clipboard after PrintScreen. How to wait while it will available?

wpf,image,screenshot,clipboard
I created a global keyboard hook. It works correctly, PreentScreen press is caught. But after pressing need wait for some time until the image on the clipboard will appear. If at once try to get a picture - there will be null. How is it better to implement? My code:...

Video stream in AVSampleBufferDisplayLayer doesn't show up in screenshot

ios,ios8,uiimage,screenshot,cmsamplebufferref
I've been using the new Video Toolbox methods to take an H.264 video stream and display it in a view controller using AVSampleBufferDisplayLayer. This all works as intended and the stream looks great. However, when I try to take a "snapshot" or "screenshot" of the entire view, the contents of...

Reading osx screenshot image in sandbox

objective-c,osx,screenshot,sandbox,appstore-sandbox
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]; Implementation of screenshotQueryUpdated is as...

A generic error occurred in GDI+ (screenshot SaveAsFile, ExternalException)

c#,file,selenium,path,screenshot
Hello I tried looking through questions that may have my answer but none of them did. I am doing web automation testing and trying to take a screenshot of when an error occurs and save it to a file in another folder. My program has a 30 second timeout when...

Launch an App by key press or a combination of key press - Window phone 8.1, iphone, Android

android,iphone,windows-phone-8.1,screenshot
I am planning to build an app which needs a screenshot. My requirement is to launch the app when the designated key presses are executed. (i.e. like volume up+lock key for taking screen shot in windows phone). My app will then launch automatically for further processing of that image. Is...

What is the difference between screenshot and screencap in adb shell?

android,adb,screenshot
I have a Galaxy S i9000 with CyanogenMod 10 on it which supports both of these commands in adb shell and both take screenshots. They look a little different however. Using adb shell screenshot: And using adb shell screencap: It seems that adb shell screenshot takes only one colour channel,...

How to capture a part of webpage using jquery

jquery,screenshot
I want to capture a part of webpage using jQuery but instead, it captures the whole page. Something like this: <html> <body> <div id="top"><p>Hello World!</p></div> <div id="middle"><p>World Hello!</p></div> <div id="bottom"><p>Hello World!</p></div> </body> </html> I want to capture only the <div id="bottom"></div> part. Please tell me how to do this. Thanks....

Not losing resolution on ios screen snapshot

ios,objective-c,screenshot
If I set the scale to 2 in the below function when taking a snapshot of a view, will that prevent losing resolution when the image is diSplayed on a larger device such as from iphonE 5 to iphone 6+? void UIGraphicsBeginImageContextWithOptions ( CGSize size, BOOL opaque, CGFloat scale );...

Java - Capturing screenshot with screen coordinates

java,image,coordinates,screenshot,area
I'm trying to capture area screenshots based on user entered coordinates. Basically user clicks on the screen gets x,y coordinates then clicks elsewhere for another pair of x,y coordinates which are then are put into a rectangle and create a screen capture using the robot library. Problem i'm having is...

take a screenshot in android then use it in another activity

android,bitmap,screenshot
So I have seen alot of questions and answers on how to take a screenshot and save it to external storage, but what I would like to know is how after I have done this I can read it into the next activity, I will also be using the image...

Screenshot of website using PHP

php,screenshot,wkhtmltoimage
Working on a small concept of taking screenshots of website by url now. By referring lot of websites used wkhtmltoimage. Currently using Mac. Installed wkhtmltoimage successfully, Also tried wkhtmltoimage www.google.com ggss.png in terminal. It successfully outputs the screenshot of website. But when i try executing the above command using PHP...

Capturing Entire ScreenShot Of PC in WIndows 8.1

c++,windows,screenshot
I'm making a C++ program which takes screenshot of the entire screen. I am facing quite a problem. When I run the program, it takes screenshot of the console screen only, not the entire desktop. HDC Screen = CreateDC(L"DISPLAY", NULL, NULL, NULL); HDC Capture = CreateCompatibleDC(Screen); int width = GetDeviceCaps(Screen,...

Coordinates of a JTextPane to make a Screenshot in Java

java,swing,coordinates,screenshot,jtextpane
I hope some one can help me, this is what I want to do. I have a JTextPane and I want to take a screenshot to that specific JTextPane coordinates and size, so far I can do a screenshot with the size of the JTextPane but I can't get the...

What would be the best way to create a firefox plugin for taking desktop screenshots?

firefox-addon,screenshot
I need to create a firefox plugin that allows a user to take screenshots of any part of their desktop and have them uploaded to a server. There seems to be lots of plugins for screen capturing a webpage, but nothing for capturing anything outside of firefox. So after a...

How to obtain app screenshots for different iphone sizes (4S, 5, 6) in XCode

ios,iphone,xcode,screenshot,dimensions
If I would like a certain screenshot to be displayed for all iphone screen size dimensions, how would I do this through the Xcode simulator? For example, when I select the simulator to run on the iphone 6 and hit cmd+s, a screenshot is saved but only for the iphone...

Screen capture to Direct2D compatible bitmap

c++,bitmap,rendering,screenshot,direct2d
I need to capture the screen of a windows given its HWND handle and store the capture in a ID2D1Bitmap object in order to draw this bitmap by means of my render target. How can I achive this result?...

c# Bitmap is already locked screenshots

c#,sockets,bitmap,screenshot
im trying to make a program that takes screen shots and compare them. this is a sample of the code compare method: [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)] static extern int memcmp(IntPtr b1, IntPtr b2, UIntPtr count); public bool CompareMemCmp(Bitmap b1, Bitmap b2) { if ((b1 == null) != (b2== null)) return...

UIPickerView get darker on screenshot

ios,screenshot,uipickerview
I had to alter the navigation on certain circumstances, and due to complexity of the transitions I had take an paint and screenshot until the transition is finished. In almost cases, that works pretty well, but there is a point that disturb me. I have a view controller with two...

How to CaptureScreen shot of current screen to share score like temple run game in android libgdx game gives only black screen

android,libgdx,screenshot,screensharing
I want to post a screen shot of my game on social apps. I have developed this game using Libgdx framework. I have created an interface in Core class. Here is its Intent share specific code. public interface ActionResolver { public void shareit(); } then on my Androidlauncher class I...

How to prevent recording of iOS screen using quicktime

ios,screenshot,quicktime
So with iOS 8, we can now record the screen of iOS devices. I've searched extensively and cannot find a way to detect, let alone prevent, this recording. The app I'm working on deals with some potentially sensitive information and images and would like to prevent this if at all...

Swift How to convert a UIview to a image

ios,swift,uiview,screenshot
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...

C# screenshot bug?

c#,screenshot
I use the following code to take a screenshot: var rc = SystemInformation.VirtualScreen; Bitmap bmp = new Bitmap(rc.Width, rc.Height); Graphics g = Graphics.FromImage(bmp); g.CopyFromScreen(rc.Left, rc.Top, 0, 0, bmp.Size, CopyPixelOperation.SourceCopy); Now this works wonderfully and it's easy to work with, however I always come across little 'white dots' in some of...

How can I get screenshot from all displays on MAC?

osx,screenshot,quartz-graphics,foundation,cgimage
I try to get the screenshot from all monitors connected with my MAC to one picture. I know, how I can do this if every monitor's screenshot will saved to different pictures, but it is not what I want. I found function CGGetDisplaysWithRect, but my solution don't work, because output...

Troubleshoot why PrintWindow is blank

winapi,screenshot
I am trying to capture screenshot of inactive window with PrintWindow. It works correctly for calculator and for capturing Google Chrome, but for some other applications, like games, it saves white area. What could be the reasons for PrintWindow to fail and how to validate them? EDIT: I want tool...

Taking a screenshot of a window in C using only the X11 lib

c,linux,screenshot,x11
I am coding a raytracer engine in C using X11 on a Linux. I would like to add a screenshot feature but I can't use any other lib than the standard X11. Is there a "simple" way to do that, or do I have to create a bmp file myself...

Programmatically saving a file on an Android device

android,file,save,screenshot
I'm writing some UI tests, and I need to be able to have those tests programmatically take screenshots of my application at certain points. I wasn't really sure how to even take a screenshot from inside a UI test, but I've figured that out and have slightly modified some code...

enlarge Excel dialog box for screen capture

excel,zoom,screenshot
I have to make a high resolution screen capture of part of an Excel session. I can zoom in on the contents of the spreadsheet, but the Sort dialog box I want to capture as well doesn't change size, so its pixel resolution doesn't increase. Working on Windows 7, Excel...

How to use phantomjs to take screen shot with dynamic data visualization

javascript,phantomjs,screenshot
When I follow this tutorial (http://phantomjs.org/screen-capture.html) to do a screen capturing, I got some problem about dynamic data visualization. In that tutorial, it uses some code like: var page = require('webpage').create(); page.open('http://localhost:8080/index.html', function() { page.render('screenshot.png'); phantom.exit(); }); But this seems work only with static page. I wonder if I have...

Screenshot showing up blank - Swift

ios,swift,uiview,sprite-kit,screenshot
Hi I am making a game and I have added a share button to the game. I want the user to be able to share a message, URL, and screenshot along side each other in one message.The sharing aspect of it is working fine and everything is showing up except...

GDK Screen vs Monitor vs Display?

linux,gtk,screenshot,gdk
I'm currently working on a small app to take a screenshot of all the physical monitors. I am getting very confused though between all the terminology. I understand: that we can have multiple displays each display can have multiple monitors, which are known as screens? I'm confused because I'm thinking...

Screen capture error - what does it mean?

python,selenium,selenium-webdriver,screenshot
I'm using this call: driver.save_screenshot('/tmp/screen1.png') Which results in this error: selenium.common.exceptions.WebDriverException: Message: Could not convert screen shot to base64 - Error: Unable to load canvas into base64 string I can't find any information on this error....

Selenium Webdriver - Capture URL in screenshot

selenium-webdriver,webdriver,screenshot
I understand that the screenshot functionality basically works as painting the DOM. Since the URL is not part of the DOM, the screenshot does not contain the URL. But is there any workaround to capture the URL as part of the screenshot?

How to get window main menu bar bounds?

delphi,screenshot,delphi-2010
My aim is to get screenshot of a window from a foreign application without its main menu bar. I'm using this code: BitBlt(Canvas.Handle, 0, 0, Width, Height, WinDC, xShift, yShift, SRCCOPY); where xShift and yShift variable values I need to determine by myself because windows in various applications can have...

How to record Android device screen(before KitKat) connected to computer via USB?

android,windows,screenshot,android-4.2-jelly-bean,screen-record
I have already searched a lot for an answer over the internet such as this question, but didn't found an answer. I want to record my Android device's screen connected to computer via USB for some kind of automation thing. I found here that Google has created an utility for...

Share screenshot using ShareActionProvider of my apps current view

android,android-actionbar,share,screenshot,shareactionprovider
I've looked at all relevant similar post and not one answers my question. My program sets up a ShareActionProvider to take a screenshot of the current view and share it with any app that can interact with .png images. Problem: The shared screenshot is always the previous screenshot meaning that...

How to take a screenshot of a second screen monitor?

c++,windows,visual-c++,visual-studio-2013,screenshot
I need get a screenshot of a second screen monitor. I found a simple way to make a screen shot, but only works for screen shot of a primary monitor. Here is the code: #include <windows.h> void ScreenShot(char*BmpName){ HWND DesktopHwnd = GetDesktopWindow(); RECT DesktopParams; HDC DevC = GetDC(DesktopHwnd); GetWindowRect(DesktopHwnd, &DesktopParams);...

UIDocumentInreactionController won't allow NSURL for .URL (Swift)

ios,swift,screenshot,whatsapp
I'm basically taking a screenshot of a view, saving it to my camera roll , getting the NSURL path and exporting to Whatsapp //Create the UIImage UIGraphicsBeginImageContext(view.frame.size) view.layer.renderInContext(UIGraphicsGetCurrentContext()) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() //Save it to camera roll round 2 var library = ALAssetsLibrary() library.writeImageToSavedPhotosAlbum(image.CGImage, metadata: nil, completionBlock: { (path:NSURL!,...

Xcode 6 3.5 inch screenshots

ios,xcode6,screenshot,simulator
I have developed an iOS app using Xcode 6 and am now ready to submit my app to iTunes connect but I need screenshots for a 3.5 inch device. However there isn't a simulator for a device that has that screensize. Can someone advise how to get the required screenshots...

JAVA: Screenshot after JFrame change just black

java,jframe,screenshot
I've written a program which makes a screenshot of JFrame by clicking on JMenuItem. If I only run the .java file in Eclipse, everything works and the screenshot shows the JFrame perfectly. But if I open the JFrame as a link from another JFrame, the screenshot is black instead of...

Take a screenshot of a WPF window with the predefined image size without losing quality

c#,.net,wpf,screenshot
When I take a screenshot of a current WPF window, the image resolution is that of my monitor (if the app is maximized), which is ok. However, if I was to print that image to a much bigger format, the image would look blurry. I found the way to capture...