2

I'm a Photoshop newbie

My goal is to add a specific serial number (S/N IO 0001, S/N IO 0002, S/N IO 0003) on the same image and export it as jpg such as "img_sn_0001.jpg", "img_sn_0002.jpg", "img_sn_0002.jpg" etc..

Is it possible to do this in Photoshop?

Or is there another way to do this?

2

Yes, its possible to do. However, I would suggest you learn to use imagemagick or any of the derivatives/clones of this project. Simply because its designed for this, faster and much more widely deployed (even my phone has it). Also simply for the reason that you can find examples of imagemagick doing just this while for Photoshop there are far less instructions and its much more convoluted. I'm sure you can manage to find a imagemagick script that does just this. Also you may find that something like llustrator and even inDesign are much better suited for this task.

But back to the topic how would you do this in Photoshop. You would use jsx scripts for this, the topic is quite wide so i will just guide you to a solution not the ultimate solution. At the end of the day how you want to architect your productivity tools is up to you. Im going for a sane customization option but you might want to go to hands off option.

  1. Open the image you want to manage. Then add a text layer on top of it place this text wherever you want the label to be set the font etc. For the script below to work the text must be the topmost layer in the stack

  2. Open ExtenScript toolkit, it is a separate program installed as part of any adobe design application.

  3. In the source 1 window type (or copy):

    #target photoshop
    
    
    doc = app.activeDocument;
    for (var i = 1; i <= 10; i++){
        doc.layers[0].textItem.contents = "S/N IO "+ padding(i, 4);
    
        // JSX uynderstands / as OS dependent so on windows you can 
        // use / as separator despite it really being \ but / is less typing 
        tojpeg(doc, "C:/temp/img_sn_"+ padding(i, 4), 6)
    
        // app.refresh(); // if you want to see each one. It does slow things down.
    }
    
    
    // Support functions
    function padding(num, length) {
        var str = num.toString();
        while (str.length < length)
            str = '0' + str;
        return str;
    }
    
    function tojpeg(doc, filename, quality){  
        opt = new JPEGSaveOptions();  
        opt.quality = quality;
        fp = File(filename);
        activeDocument.saveAs(fp, opt, true, Extension.LOWERCASE);  
    }    
    
  4. Change line with for to read whatever you want te max number to be instead of 10. Also change the tojpeg line to have the path you want.

  5. Press run (green arrow or F5)

0

Adobe Bridge can 'Batch Rename' any number of photos to include a 'Sequence Number'. Not sure however about adding the same number on the actual image, you probably need to script this.

0

If the original image already has the text layer, there's a Photoshop feature called Data-driven graphics where it is possible to add an excel with data and place it on a series of images:

Data-driven graphics make it possible to produce multiple versions of an image quickly and accurately for print or web projects. For example, you can produce 100 versions of a web banner with different text and images, all based on a template design.

Here the explanation in a video


It is possible to change the file name using Bridge

  • Put the original image in a folder and duplicate it as many times as needed, doesn't matter the name
  • Open Bridge and navigate to find this folder
  • Select all the files
  • Menu Tools > Batch Rename...

Batch Rename

  • Yes but did it change the text in the image – joojaa Sep 18 '18 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.