Copy link to clipboard
Copied
I'm wanting to display a thumbnail sized jpeg or png image representation of a high resolution PSD on my ScriptUI dialog, and without having the PSD open and active. Any advice or suggestions to get me started in the right direction is much appreciated.
JJ
Yes here is an example, BUT it will not work with Photoshop CS5 (Yet another bug!) works with Photoshop CS3 and CS4
It will work with Bridge and Illustrator CS5 though.
function main(){
inputFolder = Folder.selectDialog("Please select the folder with Files to process");
var fileList = inputFolder.getFiles(/\.(jpg|png)$/i);
Image.prototype.onDraw = function(){ // written by Marc Autret
// "this" is the container; "this.image" is the graphic
if( !this.image ) return;
var WH = this.size,
wh = this.image.siz
...
Copy link to clipboard
Copied
Paul Riggott wrote:
A fullsize JPG can be extracted instead of using
bm = Thumb1.core.preview.preview;
Usebm = Thumb1.core.fullsize.fullsize;
The fullsize could take a lot more time though depending how your preferences are set up (Keep 100% previews in cache).
There is a lot more information if you download the Bridge SDK.
Thanks again for the great information, Paul. I found the updated Bridge CS5 JS guide and reference in the SDK download, and these resources will help immensely. And thanks for the heads up on the fullsize JPG Thumbnail option. Yes, using the fullsize JPG in my particular application may prove to be too resource heavy and time consuming, but it's nice to know it's an option ... for this script and future ones I may attempt.
Scripting CS5 is proving to be a challenge, but it's also quite addictive.
Copy link to clipboard
Copied
The example posted by Paul is meant to be run in Bridge. But if Bridge can create you a .jpg or .png file to use in ScriptUI without you seeing it being done then it should be possible to use bridgetalk and call this from within a Photoshop script… well that was my thinking when I said it was a possibility…
Copy link to clipboard
Copied
Paul,
do you happen to know why that script fails in Bridge CS6 (Mac) reporting a useless "Internal Error", line:
win.Im1 = win.pnl1.add ("image", undefined,Image);
While in Bridge CS5 it works?
Thanks,
Davide
Copy link to clipboard
Copied
The problem is that there are numerous problems with Bridge CS6 scripting, these have been reported but have not been fixed or acknowledged by the Bridge team.
As it is, it looks as it will be CS7 before these get fixed.
Images, Treeview, Fonts, Colours etc just do not work as they should.
Copy link to clipboard
Copied
Thanks Paul,
I'm not too much into Bridge scripting, but I've to admit I've experienced weird things. Too bad scripting appears not to be taken into higher consideration from Adobe!
Copy link to clipboard
Copied
Yes it does seam low on the adenda, maybe if more people added their voice/vote to this it may help?
Copy link to clipboard
Copied
I found the dimension can't be larger than 256 * 256 * 256 pixels (16'777'216) to avoid that error (at least in Photoshop):
Copy link to clipboard
Copied
This thread is year old. Paul one of the best left this forum. He gave up on Adobe ever fixing Photoshop scripting and ScriptUI. Mike has passed away. Photoshop has many limits. One I hit that surprised me is Photoshop only supports up to 53 Alpha Channels.
Copy link to clipboard
Copied
Michael L Hale, Paul Riggott​, and xbytor2​ are the holy trio Their contribution was the biggest. I see some "new" ones like SuperMerlin​, Chuck Uebel, pixxxel schubser, Davide_Barranca​​, Tomas Sinkunas, Jarda Berez, Pedro Cortez Marqu​​, JavierAroche ​r-bin​ and c.pfaffenbichler​ ​plus some others I dind't mention but those will be missed the most.
In updeated version, the error realted to to 16777216 px dimension doesn't occur: Open Image preview - PS-SCRIPTS.COM
Copy link to clipboard
Copied
Mark, thanks anyway. Your idea on using Bridge might work for me ... I'll have research it more and see how to interface with Bridge.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now