Display the thumbnail of the PSD on ScriptUI dialog

I am eager to display a thumbnail size jpeg or png image representation of a high resolution PSD on my ScriptUI dialog box and bypassing the DSP open and active. Any advice or suggestions to help me get started in the right direction is 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 well with Bridge and Illustrator CS5.


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.size,
k = Math.min(WH[0]/wh[0], WH[1]/wh[1]),xy;
// Resize proportionally:
wh = [k*wh[0],k*wh[1]];
// Center:
xy = [ (WH[0]-wh[0])/2, (WH[1]-wh[1])/2 ];
this.graphics.drawImage(this.image,xy[0],xy[1],wh[0],wh[1]);
WH = wh = xy = null;
}
var win = new Window ("dialog", "Image test");
win.pnl1 = win.add('panel', undefined, undefined, {borderStyle:'black'});
win.pnl1.preferredSize=[200,200];
win.Im1 = win.pnl1.add ("image", undefined,fileList[0]);
win.Im1.size = [180,180];
win.pnl2 = win.add('panel', undefined, undefined, {borderStyle:'black'});
win.pnl2.bu1 = win.pnl2.add('button',undefined,'Next');
win.pnl2.bu2 = win.pnl2.add('button',undefined,'Previous');
win.grp100 = win.add('group');
win.grp100.bu1 = win.grp100.add('button',undefined,'Cancel');
var PIC = 0;
win.pnl2.bu1.onClick=function(){
//Next picture
if(PIC == fileList.length -1) return;
PIC++;
win.Im1.image = fileList[PIC];
    }
win.pnl2.bu2.onClick=function(){
//Previous
if(PIC == 0 ) return;
PIC--;
win.Im1.image = fileList[PIC];
    }
win.show();
}
main();

Tags: Photoshop

Similar Questions

  • Cannot display the PSD image after connecting in Illustrator

    HI illustrator supports,

    I use Illustrator 5.5 Premium on a Windows 7 platform.

    I'm trying to link an image in the psd on the Illustrator file. Previously, he has no problem, but now when I try to do that it was not in illustrator.

    Simply a rectangular box with an X on it. I tried to do things like Bring forward or bring forward, but it did not work.

    Please notify.

    Hello

    I deleted the preference folder and re-create it, then it was OK. Not sure why this is happening.

    Thank you.

  • Why can not display the PSD thumbnail in windows Explorer 8

    Hello

    Nice day.

    I have a problem, as I just installed the 8 House window and the CC of Photoshop, but I can't view thumbnail in windows Explorer PSD 8.

    Has anyone have the same problem?

    Thank you.

    Settle in the Photoshop forum.

  • How to display the "Add a contact" dialog box with the non-empty fields?

    On the BlackBerry, I want to display a dialog box 'Add a contact' with some fields filled.

    I assumed would work the following code:

    Contact BlackBerryContact = mContactList.createContact ((BlackBerryContact));

    populateSomeFields (contact);

    AddressBookArguments args = new AddressBookArguments (AddressBookArguments.ARG_NEW, contact);

    Invoke.invokeApplication (Invoke.APP_TYPE_ADDRESSBOOK, args);

    but no way. If I invoke with ARG_NEW a completely EMPTY fields are displayed.

    If I invoke with ARG_COMPOSE an IllegalArgumentException is thrown. Is it possible that I can show 'Add a contact' with some informed fields?

    just as an idea: maybe you have to make contact before the opening of the new message notice?
    otherwise it is not possible, you will need to write your own GUI to change the fields in contacts.

  • How the PSD file of the display as a thumbnail on file Explorer

    Hello

    How do you get the PSD file considered thumbnail or icon in Explorer 64-bit of Windows 10 files previously known as Windows explorer?

    I don't want to see the PSD file in a viewer separate images, but as a tile directly on the file Explorer. If she has the RAW ability is even better.

    Free is the best but I'm willing to pay.

    Hi VasG

    It is a feature of Windows to display thumbnails of the different types of files. However this thread might help you look a miniature PSD...

    Concerning

    Assani

  • How to display a thumbnail view of pictures? My vista does not list the thumbnails in the dropdown display menu.

    How to display a thumbnail view of pictures?  When I open the folder what I see is a generic panoramic picture rather than individual images.  My vista does not list the thumbnails in the dropdown display menu.  Before updating the Windows I used to be able to see thumbnails of my photos views when I opened the files with images inside.

    Here's a possibility... go to... Start ORB / Control Panel.
    Folder options / tab / files and folders / uncheck
    "Always show icons, never thumbnails" / apply / OK.

  • How to display the thumbnails in the default view

    How to display the thumbnails in the default view. I have just started a test of DC Acrobat and cannot find how to set the thumbnail view as default.

    Thanks George. Seems to only work for individual documents. If I do your instructions, close the document and then re - open, then of course the miniature view opens immediately. However, if I open another document the thumbnail view is not here. I need the thumbnail view to be opened by default for all documents as older versions of Adobe and other PDF software. If you can help that would be great.

  • Adobe color, by clicking color theme displays the wrong color (PSD, I, iD, AE)

    When I create a new Adobe Color CC Web site color theme, sometimes the color theme seems to have a mind of your own. This has happened for the last few months in the I, ID, PSD and AE (CC 2015) I've just updated all the software to the latest version (Release 2015 3.0)

    I downloaded a link did not enter to my problem on my Vimeo here: Failure of the adobe color picker

    I create the color theme, then when I choose the color in After Effects, Photoshop, Illustrator, or InDesign, although the colors look correct and hovering on the color theme displays the appropriate 6 numbers and colours CMYK, color once I have create a form, or select a brush, color is incorrect.

    If I play with the theme long enough by changing a few values here and there, it seems to work. But for at least this color theme, I can't have the correct color without manually typing in color, although color Adobe theme library displays the value of the appropriate color.

    Anyone having problems with the color themes and color pick up?

    Thank you

    Chris

    If you don't want your color to change, use only RGB color Adobe cc. Do not click the CMYK option.

  • I have some clips where does not show the audio waveform and others where the thumbnail to display the video does not show. THE possibilities of sight are checked in the Tools menu.

    I have some clips where does not show the audio waveform and others where the thumbnail to display the video does not show. THE possibilities of sight are checked in the Tools menu. Screen Shot2016-03-14 11_53_24.jpg I'm on a Mac Pro 2013. Latest version at all.

    Looks like without the audio element is a nested element.  You will need to restore the audio signal in order to see the wave forms.

    I have the same problem (sometimes):

    https://forums.Adobe.com/message/8527998#8527998

    Without rhyme or reason, as far as I can tell.

  • Is it possible to add thumbnails to display the list of the new model?

    Is it possible to add thumbnails to display the list of the new model?

    Not with the News Module. You have an account that has access to the web apps?

  • Unable to display the thumbnails in Bridge

    I am running Windows 7 (64-bit), have downloaded the RAW update more recent (4.6) for CS3.  I am able to open RAW files and work with them - just can't display the "thumbnail" picture Bridge - makes it difficult to view and edit files.  What Miss me?  Thank you!

    What the camera has taken raw images?

    If the ACR version is correct, the plug-in can be in the wrong place.

    How did you install it?

  • Windows Vista is not displayed the photos. (Windows 7 is not do it either)

    I have several computers... recently one with windows 7.
    Now, I had YEARS of problems with Vista. A simple problem is the fact that he was NEVER able to use the thumbnail view is worth a _____.

    I recently bought another computer with Windows 7... SAME problem.

    I studied this during more than a year, and the responses of primariy are 'files migh be corrupt'... is not... or "go to organize, search of the view tab, make sure that the box to ALWAYS DISPLAY the ICONS, NEVER of MINIATURES is not verified...". UH Yes, ok Microsoft is not... not working anymore... or you not listen thousnads who share this same problem.

    My question is simple...

    This can be corrected?

    Microsoft took over 2 years to fix this simple function (worked like a Swiss clock with XP), and it seems that they just brought with windows 7.

    I have to laugh at the new Microsoft commercial, they say that people wanted just "something simple." I would like to just something to work properly. Please tell me that's not too ask.

    It may be too much trouble to this instance.

    The solution that you listed is the only solution that I don't know about this problem (and it apparently does not for you if it worked for others).  I have 32 bit Vista Business SP2 and do not have this problem (or if I've never had this problem with Vista) - maybe I got lucky.  I did nothing to "fix" - it worked fine since installation (so completely, it is not a bug of Vista because it works sometimes).

    Given that the problem also exists in Windows 7 (I think that they have copied the code), I suggest that repost you this question in the Forum Windows7: http://social.answers.microsoft.com/Forums/en-US/category/windows7 where they may have found a solution that will apply to both Vista and Windows7 (but I doubt it).

    Good luck! Lorien - a - MCSE/MCSA/network + / A +.

  • Change of color during the duplication of the PSD

    This is a problem I had to deal with for a while.

    Sometimes, I noticed that when I go to duplicate a PSD, there is a change in color. If you take a look at the integrated video, you'll see where I'll duplicate the PSD and show the configuration profile and the test of color are identical, but there is a change of color/saturation and final between the two documents. I also suspect that the color of the source PSD are incorrect, first because any new PSDs I create follow the most recent color offset values.

    Hi D gap, Aaron,

    Perhaps what follows is the OSX bug, that you think, hey if there is others I did not saw it myself?

    With some versions of Mac OS x there was a problem with some versions of Photoshop and the color management on the secondary screens. It seems to be a problem with photoshop not to pick up the secondary display deflector under certain circumstances.

    In fact, in this case, the bug meant that Photoshop loaded the profile of the display on which the document open and has not changed the display profile if the file has been moved to the other screen.

    This could be demonstrated by taking a test like mine image (composite, contains colors memory easy to see travel), duplication and drag a copy of a 2nd screen, when it works right, as the document gets a certain proportion of the place on the new screen, the color would be inappropriate because Photoshop picks up the second display profile. So with 2 screens calibrated and profiled, you should have 2 matching pictures to look at.

    My solution for this was to place the bar of OSX menus on the screen more important (that I want color managed) then, when photoshop opens, it opens on this screen too. Now open Photoshop files (Adobe call them 'the documents') they will open on this "color management and main screen will be correct as the profile of the screen on the right will be used.

    If this helps to explain the problem of Aaron is beyond me to understand, especially given his propensity to use Adobe RGB as their profile display. I suppose that, even if, as the Cintiq IS a secondary screen, it could be part of history.

    Aaron, what version of Mac OS x is it please?

    I hope this helps

    If so, please mark my answer as 'useful' and if you're OK now, like "right answer" if others who have similar problems can see the solution

    Thank you

    Neil barstow, colourmanagement.net

  • view the psd with feather and the layer mask

    Hello

    There is one case where I can't display a modified to correct Photoshop image in LR.

    If the PSD file has a layer mask with a feather, LR displays a hard edge mask.

    There is no problem with a normal gradient or shadow a layer style.

    I'm on CC PS and LR CC, latest versions.

    Anyone have the same problem?

    Thank you

    JO

    LR display PS layer mask.jpg

    This is a known bug in the latest version of Photoshop. Adobe knows about it, and I think they're going to fix in the next version of PS.

    HAL

  • Add a new item to the PSD file makes the puppet to stop working correctly in c.

    Hello

    I am trying to add a new layer in my PSD file - just put a hat on the head of puppets.  Now, when I save the PSD and reassemble the hat in the ch is displayed but all of a sudden the arms fold is more correctly.  They teleport just whole body when I drag around.  It's very frustrating!  I'm doing something wrong?

    If a puppet 'Islands' (i.e. only parts) within a single mesh, Ch will automatically switch the mesh to be rectangular to encompass all the Islands (otherwise they would disappear). If this is your problem, you can see which parts are islands by switching the mesh shape popup in the properties panel (with one of the selected layers in the Panel of the puppet) to outline instead of Auto. The Islands will disappear when viewing the puppet in the places Panel. If you really want the group as an island, it's OK, just check the option to deform independently and giving it his own net.

    Check show Mesh at the bottom of the puppet Panel can also help to solve this problem.

    We are working on what is more simple to use.

Maybe you are looking for