Skip to content

Instantly share code, notes, and snippets.

View yorb's full-sized avatar

Darwin yorb

View GitHub Profile
@yorb
yorb / Snap to Pixels.jsx
Created April 23, 2013 16:52
A Photoshop script to snap all path points on selected shape layers to nearest pixels.
// Based on Adobe Community Forums member BlipAdobe's script:
// http://forums.adobe.com/message/3908198#3908198
#target photoshop
// Constants
var QUANTIZE_PIXELS = 1; // The number of whole pixels we wish the path points to be quantized to
var PIXEL_RATIO = app.activeDocument.resolution / 72; // Standardize pixels and points
// Some helpers
@yorb
yorb / Pixel Measure - Asset.jsx
Last active December 14, 2015 15:59
Photoshop script for adding rectangle measurements to your mockups
/*
Photoshop script for adding measurements to your mockups,
based on Pixel Measure v0.04 by Nikolaj Selvik (https://code.google.com/p/pixelmeasure/)
To install: Place in /Applications/Adobe Photoshop CC/Presets/Scripts/ and restart Photoshop.
To use: Draw a rectangle marquee and invoke from File > Scripts > Pixel Measure - Asset.
Tips:
- Set your foreground color to something visible (e.g., red).
- Set your Measurement Scale (Image > Analysis > Set Measurement Scale).
@yorb
yorb / Pixel Measure.jsx
Last active December 14, 2018 16:31
Photoshop script for adding measurements to your mockups, based on Pixel Measure v0.04 by Nikolaj Selvik (https://code.google.com/p/pixelmeasure/)
/*
Photoshop script for adding measurements to your mockups,
based on Pixel Measure v0.04 by Nikolaj Selvik (https://code.google.com/p/pixelmeasure/)
To install: Place in /Applications/Adobe Photoshop CC/Presets/Scripts/ and restart Photoshop.
To use: Draw a rectangle marquee and invoke from File > Scripts > Pixel Measure.
Tips:
- Set your pencil to 1x1 and your foreground color to something visible (e.g., red).
- Set your Measurement Scale (Image > Analysis > Set Measurement Scale).