Coder Social home page Coder Social logo

fmutils.screenshot's Introduction

_________  ____   _ _   _ _       _____                              _           _   
|  ___|  \/  | | | | | (_) |     /  ___|                            | |         | |  
| |_  | .  . | | | | |_ _| |___  \ `--.  ___ _ __ ___  ___ _ __  ___| |__   ___ | |_ 
|  _| | |\/| | | | | __| | / __|  `--. \/ __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
| |   | |  | | |_| | |_| | \__ \_/\__/ / (__| | |  __/  __/ | | \__ \ | | | (_) | |_ 
\_|   \_|  |_/\___/ \__|_|_|___(_)____/ \___|_|  \___|\___|_| |_|___/_| |_|\___/ \__|

A screenshot library for ProSnap

(but you can use it for whatever - see license.txt)

Nuget

Install-Package FMUtils.Screenshot

State of the Code

  • Mostly operational

Usage

Create a screenshot by creating a new ComposedScreenshot object. Strictly speaking, the only decision you need to make is whether to pass a Rectangle or window handle.

new ComposedScreenshot(this.Handle).ComposedScreenshotImage.Save("example-screenshot.png", ImageFormat.Png);

or

new ComposedScreenshot(new Rectangle(0,0,100,100)).ComposedScreenshotImage.Save("example-screenshot.png", ImageFormat.Png);

ComposedScreenshot is the main control object. This itself subclasses the lower level Screenshot object, and builds it out with additional useful functionality, such as a composition stack, rounding corners, and shadow effect functionality. You get the image out with the ComposedScreenshot.ComposedScreenshotImage property.

See ProSnap for an example of how I built an end-user application out of it.

Where you can help

FMUtils.Screenshot can create screenshots either by copying the raw screen image, or by creating a backing form, registering a 1:1 sized DWM thumbnail, and copying that. The latter method has the pleasant side effect of making Aero-glass effects opaque.

Other screenshot applications use slightly more advanced methods, such as taking two screenshots with the backing form alternately black then white, the combination of which can be used to determine per-pixel opacity. That would be a great feature for this library as well, so it's an open task for anywho who wants to take a crack.

fmutils.screenshot's People

Contributors

factormystic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

justforkin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.