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
//This will be the direcotry of the images | |
var workFolder = Folder("Z:/Bermudez-Hernandez/Strains Project/Animals/C57_20/Prox1_NeuN/Slide2"); | |
var folders = workFolder.getFiles(); | |
runphotomergeFromScript = true; | |
//runphotomergeFromScript = true; | |
$.evalFile( "C:/Program Files/Adobe/Adobe Photoshop CC/Presets/Scripts/Photomerge.jsx") | |
//photomerge.createPanorama( | |
//fileList, displayDialog ); | |
psdOpts = new PhotoshopSaveOptions(); |
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
/** | |
* Photoshop script for preparing a sprite for rotating animation. | |
* Input : a starting sprite and number of frames | |
* Output: the specified number of layers ready to be used in the PS animation tool | |
*/ | |
var docRef = app.activeDocument; | |
var activeLayer = docRef.activeLayer; | |
var degToRotate = null; | |
var newLayer = null; |
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
#target photoshop | |
function main(){ | |
if(!documents.length) return; | |
var doc = activeDocument; | |
var oldPath = activeDocument.path; | |
for(var a=0;a<doc.layerSets.length;a++){ | |
activeDocument.activeLayer = activeDocument.layers.getByName(doc.layerSets[a].name); | |
dupLayers(); | |
var saveFile= File(oldPath +"/"+doc.layerSets[a].name +".png"); | |
SavePNG(saveFile); |
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
var DocumentArea = function(doc) { | |
this.doc = doc; | |
}; | |
DocumentArea.prototype.bounds = function() { | |
return [0, 0, this.doc.width, this.doc.height]; | |
}; | |
var DocumentArea = function(doc) { | |
this.doc = doc; |
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
// Notes: | |
// 1. Save this file in Program Files\Adobe\Photoshop\Presets\Scripts\ | |
// 2. Run the script by going to menu File > Scripts > LayersToSpriteSheet | |
// Based on http://alessandroituarte.com/blag/2012/07/03/470 | |
if (documents.length > 0) { | |
// Adjust this to the number of columns you want | |
// leave -1 if you want it to calculate an optimal column value. |
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
#target photoshop | |
// $.level = 2; | |
/* | |
* Script by Tomek Cejner (tomek (at) japko dot info) | |
* based on work of Damien van Holten: | |
* http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/ | |
* | |
* My version adds support of nested layer groups, | |
* and exports single layers in addition to groups. |
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
/* Code by Mike Hale http://www.ps-scripts.com/bb/viewtopic.php?f=14&t=1802&start=15 | |
with small modification by Vladimir Carrer | |
*/ | |
function DrawShape() { | |
var doc = app.activeDocument; | |
var y = arguments.length; | |
var i = 0; | |
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
/******************************************************************************* | |
1. DEPENDENCIES | |
*******************************************************************************/ | |
var gulp = require('gulp'); // gulp core | |
sass = require('gulp-sass'), // sass compiler | |
uglify = require('gulp-uglify'), // uglifies the js | |
jshint = require('gulp-jshint'), // check if js is ok | |
rename = require("gulp-rename"); // rename files | |
concat = require('gulp-concat'), // concatinate js |
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
var layerNum = app.activeDocument.layers.length; | |
prompt("Layers Number:", layerNum); |
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
var layerNum = app.activeDocument.layers.length; | |
var a = []; | |
for (var i = 0; i < layerNum; i++) { | |
a[i] = '"' + app.activeDocument.layers[i].name + '"'; | |
} | |
prompt("Layers Names:", a); |