Created
February 7, 2013 19:15
-
-
Save fly1tkg/4733355 to your computer and use it in GitHub Desktop.
This file is a Photoshop script for create marker which is use for 4:3 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 * 3 / 4; | |
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