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

How to package images in a specific format like jpg?

Community Beginner ,
Jan 02, 2023 Jan 02, 2023

Hello, is there a way to package all images in a specific format? I have created a layout for a presentation: All the images I use are in different formats. Some in tiff format with layers, some in png etc. I would like to package the presentation with all the images as jpg and of course export the it as a pdf. The originals I would like to keep in another place so I can edit them and save and package another presentation with the updated jpgs in the future, and so on..

Thank you for your help in advance.

 

<Title renamed by moderator>

TOPICS
Feature request , How to , Import and export
2.3K
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 3 Correct answers

Community Expert , Jan 02, 2023 Jan 02, 2023

The Package command only gives you the options of packaging Linked Images:

 

Screenshot 2023-01-02 at 3.47.10 PM.png

Translate
Community Expert , Jan 03, 2023 Jan 03, 2023

It might be scriptable but nothing like this is possible natively.

Translate
Community Expert , Jan 03, 2023 Jan 03, 2023

As I said at the top of the thread: "You could write your own script to do that, or you could have a script post-process the files saved in the Package folder."

Translate
Community Expert ,
Jan 03, 2023 Jan 03, 2023

Would it be possible for InDesign to correctly and automatically link the processed images?

 

I have a script that does the opposite, converts TIFFs and JPEGS to PSDs. Below is a version of the script that saves all image links as JPEGs via Bridgetalk and relinks. Photoshop moves the originals into a OldLinks folder, so you would need to delete that folder before archiving. Have only done a few tests using CC2021. Bridgetalk coding can be tricky, so I’m not sure if you will have problems on large complex files.

 

With disk space running at 2 cents per gigabyte even scripting the conversion would literally be pennywise:

 

 

 

linksToJPEG()

var np;
function linksToJPEG(){
    var bt = new BridgeTalk();  
    bt.target = "photoshop"; 
    if (app.documents.length > 0) {
        var lnks = app.documents[0].links;
        for (var i = 0; i < lnks.length; i++){
            if (lnks[i].parent.constructor.name == "Image" && lnks[i].linkType != "JPEG" && lnks[i].status == LinkStatus.NORMAL) {
                convertJPEG(lnks[i].filePath, bt)
                try {
                    lnks[i].relink(File(np))
                }catch(e) {}  
            }
        };   
    } else {
        alert("No Documents Open")
        return
    }
}


/**
* Convert a Link to JPEG 
* @ param Link’s file path 
* @ param Bridgetalk instance 
* return new file path 
*/

function convertJPEG(pa, bt){
    bt.body = psScript.toString() + "\rpsScript('"+pa+"');";
    bt.onError = function( inBT ) { alert(inBT.body); };  
    bt.onResult = function(resObj) { 
       np = resObj.body
    } 
    bt.send(1000); 
    function psScript(pa) {  
        app.bringToFront();
        
        //archive folder for OldLinks
        var ap = File(pa).parent + "/OldLinks"
        var af = Folder(ap)
        af.create()
     
        //open and copy to archive
        var of = open (File(pa));
        File(pa).copy(File(ap + "/" + of.name))
        
        var n = pa.split( "." )
        if ( n.length > 1 ) {
            n.length--;
        }
        n = n.join(".");

        //JPEG options
        var so = new JPEGSaveOptions();
        so.embedColorProfile = true;
        so.quality = 12
 
        of.saveAs(new File(n + ".jpg"), so, true);
        of.close(SaveOptions.DONOTSAVECHANGES);  
        File(pa).remove()
        return n + ".jpg"
    }  
};

 

 

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