Skip navigation
marius_9
Currently Being Moderated

Bridge to create thumbnails from web application

Mar 21, 2012 1:43 AM

Hi all,

 

I'm looking for a solution to create thumbnails on my web application server (eps, ai, psd.. files).

Did you think that it a good idea (and possible) to use Bridge on a server (I have a licnese for InDesign server) to generate thumbnails with a jsx script ?

 

Thanks,

Cedric

 
Replies
  • Currently Being Moderated
    Mar 21, 2012 2:46 AM   in reply to marius_9

    I have no idea about using Bridge on a server, but here is an example of creating thumbnails.

    This example should be run from ExtendScript Toolkit, it will generate thumbnails for all (that it can)  filetypes in the selected folder.

     

     

    #target bridge
    var files = app.document.visibleThumbnails; 
    for(var a in files){
        if(files[a].type == "file"){
        var Thumb = new Thumbnail(files[a]);
        var orientation = Thumb.rotation;
        app.synchronousMode = true; 
        var bm = Thumb.core.thumbnail.thumbnail;
        app.synchronousMode = false;
        if(bm.width <1) continue;
        bm = bm.rotate(orientation);
        Name = decodeURI(Thumb.spec.name).replace(/\.[^\.]+$/, '');
        var target = new File(app.document.presentationPath + "/Thumb-" + Name + ".jpg" );
        bm.exportTo(target);
            }
    }
    
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points