how to create and save a screenshot from a surfaceview?

I hope you have used this solution which was posted here Get screenshot of surfaceView in Android this thing is explained here Take Screenshot of SurfaceView The SurfaceView’s surface is independent of the surface on which View elements are drawn. So capturing the View contents won’t include the SurfaceView……… I hope this Taking screenshot programmatically … Read more

Android get screenshot of all ListView items

working code: public static Bitmap getWholeListViewItemsToBitmap() { ListView listview = MyActivity.mFocusedListView; ListAdapter adapter = listview.getAdapter(); int itemscount = adapter.getCount(); int allitemsheight = 0; List<Bitmap> bmps = new ArrayList<Bitmap>(); for (int i = 0; i < itemscount; i++) { View childView = adapter.getView(i, null, listview); childView.measure(MeasureSpec.makeMeasureSpec(listview.getWidth(), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); childView.layout(0, 0, childView.getMeasuredWidth(), childView.getMeasuredHeight()); childView.setDrawingCacheEnabled(true); childView.buildDrawingCache(); bmps.add(childView.getDrawingCache()); … Read more

Screenshot of inactive window PrintWindow + win32gui

After lots of searching and trying various different methods, the following worked for me. import win32gui import win32ui from ctypes import windll import Image hwnd = win32gui.FindWindow(None, ‘Calculator’) # Change the line below depending on whether you want the whole window # or just the client area. #left, top, right, bot = win32gui.GetClientRect(hwnd) left, top, … Read more

Selenium WebDriver C# Full Website Screenshots With ChromeDriver and FirefoxDriver

we can’t get the entire page screenshot with ChromeDriver2, we need to go for manual implementation.I have modified a method with is available in a blog which works fine with ChromeDriver. use this method as following : private IWebDriver _driver = new ChromeDriver(CHROME_DRIVER_PATH); screenshot.SaveAsFile(saveFileName, ImageFormat.Jpeg); public Bitmap GetEntereScreenshot() { Bitmap stitchedImage = null; try { … Read more

generating a screenshot of a website using jquery

If you look at wkhtmltox, there’s native lib/app for converting a webpage to an image. <?php // file: img.php $img=render_image($_GET[‘url’]); ?> <!– Your Website –> <img alt=”ldr”/> <script type=”text/javascript”> $(document).ready(function(){ var url=”http://google.com/”; $(‘#img’).attr(‘src’,’img.php?url=”+encodeURIComponent(url)); }); </script> In case the comment wasn”t clear enough, you need PHP somewhere which could run a native program.

How do take a screenshot correctly with xlib?

You are mistaken about the way array is laid out in memory, as you can find out by declaring img before the loop and adding this printf to your inner loop: printf(“%ld %ld %u %u %u\n”,x,y,pic.offset(x,y,0),pic.offset(x,y,1),pic.offset(x,y,2)); This yields (on my 1920×1200 screen): 0 0 0 2304000 4608000 0 1 1920 2305920 4609920 0 2 3840 … Read more