WPF: Way to take screenshots

First you’ll need to add references for the following namespaces: using System.Drawing; using System.Drawing.Imaging; using System.Windows.Forms; Then enumerate your monitors to get the bounding rectangle for all display surfaces and pass that in to the Graphics.CopyFromScreen() method call: private static BitmapSource CopyScreen() { var left = Screen.AllScreens.Min(screen => screen.Bounds.X); var top = Screen.AllScreens.Min(screen => screen.Bounds.Y); … Read more

create screenshot of webpage using html2canvas (unable to initialize properly)

You should use it this way: $(‘body’).html2canvas(); var queue = html2canvas.Parse(); var canvas = html2canvas.Renderer(queue,{elements:{length:1}}); var img = canvas.toDataURL(); window.open(img); It took me few hours to figure it out, how to use it the right way. The {elements:{length:1}} is required, due to incomplete implementation of the plugin, otherwise you’ll get an error. Good luck!

Why does my programmatically created screenshot look so bad on iOS 7?

New API has been added since iOS 7, that should provide efficient way of getting snapshot snapshotViewAfterScreenUpdates: renders the view into a UIView with unmodifiable content resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets : same thing, but with resizable insets drawViewHierarchyInRect:afterScreenUpdates: : same thing if you need all subviews to be drawn too (like labels, buttons…) You can use the UIView … Read more