Last active
December 12, 2015 06:58
-
-
Save fly1tkg/4733362 to your computer and use it in GitHub Desktop.
This file is a Photoshop script for create marker which is use for 16:9 aspect ratio Movie AR by CARKCHO(https://app.carkcho.com).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
author: Shoichi Takagi | |
*/ | |
var width; | |
var height; | |
var movieWidth; | |
var movieHeight; | |
var getImageSize = function() { | |
width = activeDocument.width.value; | |
height = activeDocument.height.value; | |
}; | |
var cropFitMovieSize = function() { | |
getImageSize(); | |
movieWidth = width; | |
movieHeight = width * 9 / 16; | |
var margin = (height - movieHeight) / 2; | |
preferences.rulerUnits = Units.PIXELS; | |
activeDocument.crop([0, margin, width, height - margin]); | |
}; | |
var cropMarker = function() { | |
getImageSize(); | |
var margin = (width - height) / 2; | |
preferences.rulerUnits = Units.PIXELS; | |
activeDocument.crop([margin, 0,width - margin,height]); | |
}; | |
cropFitMovieSize(); | |
cropMarker(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment