c.pfaffenbichler
Community Expert
c.pfaffenbichler
Community Expert
Activity
‎Feb 17, 2009
11:56 PM
First off I dont know of any such plugin and am not an experienced scripter, so Im no help here.
But the problem certainly sounds interesting.
In principle I guess it should not be beyond Photoshop/Scriptings reach to recognize some defined forms and use them as basis for a perspectival transformations, because that seems to be one of the operations »Photomerge« accomplishes.
But how to make it recognize distorted rectangles (possibly with crooked and broken lines depending on the ornamentation and form of the frame), which arent even necessarily of the same proportions, and define the amount of correction seems pretty close to unfathomable to me.
As of now I guess Youre better off doing it manually and automate whatever else is possible to speed up the process.
Was it a studio-shoot or done on location?
... View more
‎Feb 17, 2009
11:32 PM
I work on a Mac, so it might be different with Your setup, but my »ExtendScript Toolkit 2«-Folder containa a Folder »SDK«, which contains a pdf named »Adobe Intro to Scripting.pdf«.
But I think all those instructional pdfs are also available as downloads; have You googled it already?
... View more
‎Feb 12, 2009
08:58 AM
Now that makes me curious have You all struck it rich and (semi-)retired early or are You actually venerable old-age-pensioneers?
... View more
‎Feb 12, 2009
06:32 AM
Actually I would consider You one of them, Paul.
... View more
‎Feb 12, 2009
02:31 AM
All the necessary steps appear scriptable in JavaScript too.
There are a couple of pros frequenting this forum who, Im certain, could provide such a Script easily and speedily.
... View more
‎Jan 29, 2009
10:43 PM
Compliments on a great and greatly useful script!
Thanks,
pfaffenbichler
... View more
‎Jan 28, 2009
08:50 AM
Sorry, Ive redone it with »ActionToJavascript.jsx« and the resulting jsx works fine.
Thanks, xbytor!
... View more
‎Jan 28, 2009
08:04 AM
Ups »1« was the name of my Action which as the name for the function seems to be inaproproate as its mistaken for a number.
»_main is undefined« on the other hand still eludes me, but I can run the Script from ESTK.
... View more
‎Jan 28, 2009
07:30 AM
Ive tried it with ActionFileToJavascript.jsx, but so far I havent gotten far.
»Error 25: Expected: (.« I can avoid by removing »1« between »function« and »() {« in line 8, but »Error 2: _main is undefined« has me baffled (Refers to the line »_main.loadSymbols = function () {»). That seems to happen on invoking in Photoshop.
But trying from ESTK I get »Cannot execute Script. (Target Photoshop CS4 provides no engine for debugging.)«.
Could You tell me how I can avoid that?
Im working on Photoshop 11.0 on May OS X 10.4.11 by the way.
... View more
‎Jan 28, 2009
06:00 AM
Thanks for the quick reply!
I will try that.
... View more
‎Jan 28, 2009
05:20 AM
When passing data-CDs or -DVDs on to customers I like to provide a cover containing a screenshot of the content in list-form (so that the change-dates can be verified) with background, logo, date and some graphic elements added.
Which works fine as an Action (with some small Scripts recorded in).
But what with Configurators capability to include Scripts I would like to move the whole thing into JavaScript so as to be able to pass a Configurator-Panel on to colleagues without them having to install separate Actions as well.
Therefore Im looking for a way to include the generation of a relatively complex path (several hundred points, multiple subPathItems) for an illustrative logo-element in the Script.
I may be trying to use the less fitting mechanism in looking for a way to do with a Script what an Action can achieve so effortlessly with »Insert Path«, but could any of You tell me a way to get all the necessary info from an existing path into Script-form?
Or would You advise me to simply desist from the intention for Script-length-reasons/other considerations?
... View more
‎Jan 26, 2009
06:45 AM
I hope Im not being too difficult but Im not registered there, and anyway, before being posted, the Script could probably benefit from someone like You looking it over; if You find its not a total insult to good-Scripting-form You can certainly post it.
... View more
‎Jan 25, 2009
10:22 PM
Im afraid the Script might be too long to post here, a bit over 200 lines, though Im pretty certain one could drop a lot of them without affecting the outcome.
If You email me at pfaffi(at)viennapaint.com I can send it to You.
... View more
‎Jan 25, 2009
08:06 AM
Well, I think Ive found the relevant part in StackSupport.jsx and with a couple of lines from some of the other Stack-Scripts it seems doable to apply the coordinates of the path-points to an ArtLayer directly.
... View more
‎Jan 22, 2009
10:57 PM
Recently over at the Photoshop Forum the matter of automatically placing images into photographs of TV-screens has come up repeatedly. (Possibly for electronics-catalogs I guess.)
Now images are pretty easily placed automatically in frontal shots as long as paths for the screens exist and follow some previously known naming-conventions.
Inserting images into slanted shots of the TV-screens is tougher to automate when they are supposed to show perspectival shortening.
If the vertical lines in the photograph remain parallel to the vertical borders of the document I think Ive more or less got it (depending on the screen-paths being four-points-only); the subPathItems.pathPoints.anchor-values can be used to calculate the necessary shortening, skewing and scaling; not that I could figure out the math myself though. Because I fragmented the operations (thus sacrificing speed I guess) it can be achieved in a loss-free manner only with Smart Objects in CS4.
If all the parallels converge to respective vanishing points on the other hand Im pretty much flabbergasted, because I can hardly make sense of the values I get when recording transformations with the Scripting Listener as it is.
Still I can vaguely see a possible, rather complicated way of achieving it by breaking the transformation down into even more separate operations.
But when considering what Photomerge can do it seems to me that perspectival transformations should indeed be scriptable
So, does anyone know it its possible to achieve a perspectival transformation in JavaScript by addressing the four corner-points directly, which would seem the easiest way?
Can any of You point me to a source that explains the interaction of the various transformation values?
Or does a functioning Script for perspectival transformation based on a four-point-path exist already anyway?
Its not a matter of urgency, it just seems an interesting problem.
... View more
‎Jan 17, 2009
11:38 PM
Thanks!
Youve helped me a lot!
Have a great weekend
Pfaffenbichler
... View more
‎Jan 17, 2009
09:27 AM
Thanks for the reply, but that doesnt help me.
I need the angle (for example for 0.235 I would like the reply of 13.6) and
Math.asin(0.235);
gets me the result »0.23721856«.
Do I make some mistake or do I have to process that result further? If so, how?
Like I said, my math-skills have seriously deteriorated, but its just a keystroke on the calculator
Edit: Could the calculator-people use the term arc sine based on another definition?
... View more
‎Jan 17, 2009
08:20 AM
This time I ask doubly humbled because not only am I weak in JavaScript but Ive come to realize that Ive gotten pretty bad at mathematics
On my calculator the key »sin-1« (sinus to the power of negative one) gets me the angle in degrees if I enter the value I get by dividing the opposite side by the hypothenuse (of a right triangle naturally), but I cant figure out how to achieve that in JavaScript.
The calculator-key signifies the arc sine, which the function Math.asin() should also provide but I dont seem to get meaningful results, instead the result looks like what on my calculator is called the hyperbolic sine.
Could someone please help me out here Script- and/or math-wise?
... View more
‎Jan 15, 2009
09:08 AM
Im certainly no authority on the matter, but I would guess that so long as You dont take payment for those Scripts and the people who get them have purchased Photoshop anyway there should be no significant problems maybe mention Your sources in the Script for politeness sake at least?
Can any of the real Scripting-professionals weigh in with their take on the subject?
... View more
‎Jan 15, 2009
08:39 AM
Im not sure about where exactly to integrate that in the »Export Layers To Files«-Script, but trimming an image is not so hard via Script:
var myDocument = app.activeDocument;
myDocument.trim(TrimType.TOPLEFT, true, true, true, true);
... View more
‎Jan 08, 2009
10:53 PM
I think Warps-presets are not an option, but like Michael mentioned Warping is recordable as a Script. Though for practical reasons You should do the Warp perfectly for the recording.
As regards the size-matter, resizing and cropping (if necessary) the images prior to the Warping should be no problem within a Script.
... View more
‎Jan 07, 2009
12:58 AM
Are You familiar with the Warp in Photoshop?
Because in Photoshop there is a feature called »Warp« but that lets You transform content basically only by manipulating the four corners, their bezier-handles, segments of one ninth of the area and the lines separating thirds of the height and width.
Could You post a link to some files You achieved with the current workflow?
... View more
‎Jan 06, 2009
11:16 PM
The manual warping is done in Photoshop though?
... View more
‎Jan 06, 2009
08:10 AM
You better wait for some of the more experienced Scripters who frequent this forum to advise You, but as warping seems to be recordable with the Scripting Listener (see »Photoshop CS4 Scripting Guide.pdf«) I see no reason why the warping shouldnt work.
What do You mean with »the logic of identifying the content« exactly though? Have You been able to bring those criteria in a usable Script-form yet?
And what is Your alternative (as »if photoshop can help me save loads of my image transforming time« seems to imply that You are currently doing with another program)?
But I guess the whole thing is kind of a tall order.
... View more
‎Jan 06, 2009
04:47 AM
Im not sure if the Scripting-forum is really the best place for the question.
Could You link to an example of what You mean exactly?
Anyway if one makes the whole of the background (however many layers that are) into a Smart Object one can create a Displacement Map for use with Filter Distort Displace and apply that to either the original SO or a copy thereof (possibly masked or Clipping Masked to a foreground object) and on editing the SO the displacement will be applied to the result.
The thing to keep in mind is that Displacement Maps can work with two channels to affect the horizontal and vertical offset separately and that black and white in a channel mean positive and negative offset.
Which means that is possibly for example to create an approximation of a lens-effect by creating an rgb-file of a circle with a 50%-grey center and 12-, 3-, 6-, 9-oclock-points (so to speak) measuring at 128/255/128, 0/128/128, 128/0/128, 255/128/128.
Reflections and shadows could be achieved with Layer Styles or Adjustment Layers
All in all the method is not that easy, but it might come close to what I think You had in Mind.
Edit:
Maybe You could check this out: http://www.gurusnetwork.com/tutorial/displace/
... View more
‎Jan 04, 2009
11:42 PM
Thanks, Mike.
Ive got it to work already.
... View more
‎Jan 04, 2009
04:17 AM
Thanks, both of You!
Hopefully I will remember to consult the stlib before asking in the future
... View more
‎Jan 03, 2009
07:17 AM
Once again I have a question regarding a way to determine some quality in Photoshop:
Suppose I want to save all files that have been newly created and have not yet been saved in Photohop.
The saved-criterion would also include files that have been changed since the last save, so I thought the absence of a file-path would make for a good distinguishing characteristic; I only managed to successfully use that in a try-catch-clause though, which is bad form Ive been told:
Is there another way to identify a document that has never been saved?
... View more
‎Jan 03, 2009
06:01 AM
Sorry to say that to the best of my limited knowledge of Illustrator-Scripting this is not scriptable.
I made basically the same inquiry some time back and it didnt turn up any such method (edit).
... View more
‎Jan 02, 2009
02:04 AM
That doesnt quite do it, but I dont have Notepad I just changed that line to
OutHTM = new File( "~/Desktop/Code2HTM.jsx");
and it works great, thanks again!
... View more