Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Display thumbnail of PSD on ScriptUI dialog

Community Beginner ,
Mar 12, 2011 Mar 12, 2011

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

TOPICS
Actions and scripting
8.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Mar 13, 2011 Mar 13, 2011

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

...
Translate
Adobe
Community Beginner ,
Mar 13, 2011 Mar 13, 2011

Paul Riggott wrote:

A fullsize JPG  can be extracted instead of using

bm = Thumb1.core.preview.preview;
Use

bm = 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.

http://www.adobe.com/devnet/bridge.html

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 12, 2011 Mar 12, 2011

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…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 03, 2013 Mar 03, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 03, 2013 Mar 03, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 03, 2013 Mar 03, 2013

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 03, 2013 Mar 03, 2013

Yes it does seam low on the adenda, maybe if more people added their voice/vote to this it may help?

http://feedback.photoshop.com/photoshop_family/topics/extendscript_ui_not_drawing_correctly_in_bridg...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 24, 2017 Dec 24, 2017

I found the dimension can't be larger than 256 * 256 * 256 pixels (16'777'216) to avoid that error (at least in Photoshop):

Open Image preview - PS-SCRIPTS.COM

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

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.

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 25, 2017 Dec 25, 2017
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 12, 2011 Mar 12, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines