![]() |
|
#1
| ||||
| ||||
| Pixelated - Javascript Following Doug's suggestion I'm posting here the script that I used to make the "punched-out" image in Doug's "Pixelated" thread. Some observations: - Many times I find the "normal" method() syntax too unweildy and instead make a function from the ScriptListener output. Quote:
Quote:
ly = Layer;with user names in capitals, so you'll find:lyBASE, pxMAX_H, dcDOC etc...... Comments and suggestions most welcome - as always Rô |
|
#2
| ||||
| ||||
| Replying to Danny's post on the original thread: Quote:
Quote:
Quote:
Thanks for the feedback! Rô |
|
#3
| ||||
| ||||
| Here's the latest effort. (image) Not quite as clean-cut as I'd like it - but it works. Apparently working with selections isn't that straightforward! Had to use a pre-defined layer style ("byRo Tiles") to be able to do the bevel and emboss. Any help or comments would be most welcome. Rô |
|
#4
| ||||
| ||||
| It was instructive to see the line of code to apply the layer style within the .js. IMO you'll get a lot fewer implementation questions if you comment out that line (but include instructions within the script on "how" to utilize it). Just let folks apply a LS of their choosing after the script runs. Bottom line: Pretty slick. |
|
#5
| ||||
| ||||
| Danny, good to see it worked for you! Quote:
I had to apply the style while I had an individual tile isolated. When I applied a bevel-and-emboss-type style after, the tiles becames pretty shapeless blobs. However you're right - not much good posting a script that won't work, will substitute. I had to fight this program all the way: - apparently a Selection can't be an object; - after copying to a new layer the selection gets deselected; - layer merges don't include layer styles, have to use merge visible; - only way to apply bevel and emboss is by using a pre-defined style, can't define layer styles on the run; - selection.transform doesn't work (at least not for PS 7.0), had to wriggle out using Edit>Transform on the layer. If anybody has some experience with selections I'd be real glad to hear. Rô |
|
#6
| ||||
| ||||
| I'm shooting in the dark here... Does "- apparently a Selection can't be an object" = you can't do the script equivalent of Select > Save selection to create a named alpha channel which could (in theory) be repeatedly invoked via the .js equ. of Select > Load selection? |
|
#7
| ||||
| ||||
| Quote:
I'll try and turn the lights on... I had imagined that, with all the used-defined objects that javascript allows, I could simply write something like: Quote:
The method you suggested will work fine (I hadn't thought of that), and if I need more than one selection I'll sure do it that way. This time I just needed to repeat the select line. Just got a little disappointed that my cunning sly move didn't work! Rô |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pixelated Celebrities Game | Doug Nelson | Salon | 617 | 03-02-2007 05:35 PM |
| Pixelated Healing brush | delic | Photo Restoration | 2 | 02-01-2006 12:57 PM |
| Severely Pixelated Image | AndrewR | Image Help | 10 | 08-01-2005 05:05 AM |
| resizing for a table | clare | Your Website | 16 | 02-24-2003 02:15 PM |
| Javascript program | garfield | Software | 4 | 12-02-2002 08:40 AM |