Giter Site home page Giter Site logo

retina-screenshot's Introduction

Retina Screenshot

CLI screenshot tool for macOS with Retina support.

Demo

Overview

The goal of this tool is to be near-compatible with macOS screencapture(1) command, with some extra additions, like the possibility to capture both 1x and 2x versions of the screenshot on Retina screens.

This is useful, say, if you want two native captures of the same window, both at a regular resolution and at a Retina resolution. This way you can get the best rendering in both cases, without any artificial downscaling.

You can also get only the 1x resolution e.g. for embedding on many sites that don't support 2x images, to avoid your screenshots looking 4 times bigger than they should be.

Installation

git clone https://github.com/valeriangalliat/retina-screenshot.git
cd retina-screenshot
make
./retina-screenshot --help

Usage

Capture every screen and save it in the default location

retina-screenshot

If you have two screens, this will save, e.g.:

~/Desktop/Screenshot YYYY-MM-DD at hh.mm.ss.png
~/Desktop/Screenshot YYYY-MM-DD at [email protected]
~/Desktop/Screenshot YYYY-MM-DD at hh.mm.ss (2).png
~/Desktop/Screenshot YYYY-MM-DD at hh.mm.ss (2)@2x.png

It will respect the default screenshot location you have set in macOS screenshot utility. You can see it by running:

defaults read com.apple.screencapture location

Or by pressing Command + Shift + 5 and looking at the Options > Save to value.

Capture every screen, specify filename

retina-screenshot screen1.png screen2.png

You will get:

screen1.png
[email protected]
screen2.png
[email protected]

If you have two screens and you only specify a single filename, it will only capture the main screen.

Chose quality (1x, 2x or both)

retina-screenshot -q 1x
retina-screenshot --quality 1x
retina-screenshot --quality 2x
retina-screenshot --quality both

Defaults to both.

Interactive capture

retina-screenshot -i
retina-screenshot --interactive

This will show an interactive UI that mimics the default macOS screenshot tool, where you can cycle between mouse, window and screen selection mode with the space bar.

The filename behavior will be the same as noninteractive mode.

Save dialog

retina-screenshot --f
retina-screenshot --dialog

Instead of automatically generating the filename, or taking it from the CLI arguments, you will get an interactive dialog to select where to save the file(s).

Dialog example

Capture specific display

No shadow

In window selection mode, do not capture the shadow.

retina-screenshot -o
retina-screenshot --no-shadow

Specify format (PNG, JPEG, TIFF)

retina-screenshot -t png
retina-screenshot --format png
retina-screenshot --format jpg
retina-screenshot --format tiff

Defaults to PNG.

Save all screens in a single file

retina-capture -e
retina-capture --everything

The screens will be arranged like configured in displays preferences. Uncovered areas are transparent.

Everything example

Development

Basic linting:

make lint

Deeper linting:

make analyze

retina-screenshot's People

Contributors

valeriangalliat avatar

Stargazers

Jagi ᯅ avatar

Watchers

 avatar  avatar

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.