Last change
on this file since 11407 was 8853, checked in by dennisw, 14 years ago |
stageplan_0.1 - toegevoegd
gheat - sourcecode toegevoegd
website_ontwerp - map aangepast, komt nu beter overeen met idee dat ik heb
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Date Revision
-
Property svn:mime-type
set to
text/plain
|
File size:
1.0 KB
|
Rev | Line | |
---|
[8853] | 1 | /* Generate ../etc/dots/dot*.png for use by gheat.
|
---|
| 2 | *
|
---|
| 3 | * Open ../etc/dots/master.psd in PhotoShop, and then run this script (File >
|
---|
| 4 | * Automate > Scripts; if using PhotoShop version 7 you must have the scripting
|
---|
| 5 | * plugin installed).
|
---|
| 6 | *
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | if (documents.length == 0)
|
---|
| 11 | {
|
---|
| 12 | alert("Please open a master dot file before running this script.");
|
---|
| 13 | }
|
---|
| 14 | else
|
---|
| 15 | {
|
---|
| 16 | var w = activeDocument.width;
|
---|
| 17 | var h = activeDocument.height;
|
---|
| 18 | var step_w = w / 31;
|
---|
| 19 | var step_h = h / 31;
|
---|
| 20 |
|
---|
| 21 | //alert("(" + step_w + ", " + step_h + "), (" + w + ", " + h + ")");
|
---|
| 22 |
|
---|
| 23 | for(var i=0; i < 31; i++)
|
---|
| 24 | {
|
---|
| 25 | //if (i > 3) break;
|
---|
| 26 | new_w = w - (step_w * i);
|
---|
| 27 | new_h = h - (step_h * i);
|
---|
| 28 | //alert(i + ": (" + new_w + ", " + new_h + ")");
|
---|
| 29 | activeDocument.resizeImage(new_w, new_h);
|
---|
| 30 | file = new File('../etc/dots/dot'+(30-i)+'.png');
|
---|
| 31 | opts = new PNGSaveOptions()
|
---|
| 32 | opts.interlaced = false;
|
---|
| 33 | activeDocument.saveAs(file, opts, true, Extension.LOWERCASE);
|
---|
| 34 | activeDocument.activeHistoryState = activeDocument.historyStates[0];
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.