Skip to content

Instantly share code, notes, and snippets.

@skibulk
skibulk / Snap to Pixels.jsx
Created April 19, 2016 17:05 — forked from yorb/Snap to Pixels.jsx
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