I'm looking for a way to extract images from an ID file in a 'formatted' / cropped form.
i.e: a. I have placed numerous, hi-res (tiff, psd) images into an InDesign CS5 file b. The image boxes that they have been placed into, are smaller than the actual image (pretty intense cropping occurred) c. I am trying to collect these images in their new stage (cropped to the image box) and export them as jpg at 72dpi.
Are there any plug-ins out there that would automatica开发者_如何转开发lly collect "formatted" images from ID for me? Or is there some other way?
If you're familiar with Indesign Scripting, this can very easily be done via a script. I use Javascript but this can be done with VBSript or AppleScript as well. Here is a basic example of a script that will open a document, and export a rectangle (your image box) as a JPG. Basically, you can just loop through the pictures in your document and export each one to a location/filename you choose (see the myFile variable below). There are several "jpegExportPreferences" you can pick from to determine how your output JPG will be (i.e. DPI).
test();
function test(){
    var myDoc = app.open('c:/user/desktop/testDocument.indd');
    var myGroups = myDoc.groups;
    //for each group...
    for (var i = 0;i < myGroups.length; i++){
        // for each rectangle in the group...
        for(var r = 0; r< myGroups[i].rectangles.length; r++){
             var myRect = myGroups[i].rectangles[r];
               app.jpegExportPreferences.exportResolution = 300;
               app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;
               //give it a unique name
               var myFile = new File('c:/users/desktop/newJPG' + myRect.id + '.jpg');
               myRect.exportFile(ExportFormat.JPG, myFile);
               }
           }
  }
For a list of the other optional JPG Export preferences, see this link: http://indesignscriptingreference.com/cs2/javascript-cs2/jpegexportpreference.htm
Hope this helps!
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论