Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe Photoshop Watermarking/branding images with file name

  • Richard Harrington

    September 21, 2007 at 1:56 pm

    Try File Scripts Image Processor

  • Ekim Wahs

    September 24, 2007 at 9:31 pm

    Scripting would handle this nicely.

    here’s a bit that will add a type layer with file name

    // set rulers to pixels and save original for resetting
    var originalUnits = app.preferences.rulerUnits
    app.preferences.rulerUnits = Units.PIXELS

    // add the pixel position for the left side of your text block below
    var textLeftPosition= 60

    // add the pixel position for the bottom of your text block below
    var textBottomPosition= 60

    var typeLayer = app.activeDocument.artLayers.add();

    typeLayer.name = app.activeDocument.name;
    typeLayer.kind = LayerKind.TEXT;
    typeLayer.textItem.size = 48;
    typeLayer.textItem.position = [textLeftPosition, textBottomPosition];
    typeLayer.textItem.contents = typeLayername;

    // return units to original
    app.preferences.rulerUnits = originalUnits

    You could use insert menu item action to call the script. Save the above text as a jsx file, and call it from file/scripts/browse

    Also, here is a nice script to use as a starting point for processing a folder of images. Insert the operations that you need to perform in the area indicated.
    https://www.tranberry.com/photoshop/photoshop_for_geeks/openFolderTemplate.jsx

    Jeff’s Photoshop for geeks area is a nice intro to scripting in Photoshop.

    Mike Shaw
    Photoshop QE

  • Cináed

    September 25, 2007 at 5:03 am

    Ah, thanks a lot!
    This will probably save me hours of work, and even enable my company to be able to offer yet another service 😉

    -Kenneth

  • Rob Goldstein

    March 4, 2009 at 10:40 pm

    I Have never used scripts before. Can anyone tell me how I apply this script in photoshop? Unfortunately I look at this and all I see is Greek.

    Thanks so much for the help. If I can get this to work it will save me so much time.

  • Paul Hinderer

    September 2, 2009 at 4:40 am

    Hi Richard,
    I have tried to use your file location watermarking script in SC4 – but I keep getting an error message for line 17 – (typeLayer.textItem.contents = TypeLayername;. The script does load a text layer in the name of the file, but no text appears on the page. I am loading the script by “scripts – browse”. Can you let me know if I am doing something wrong.
    Cheers

  • Ekim Wahs

    September 3, 2009 at 11:00 pm

    try adding the line
    var layerName = typeLayer.name
    before the line
    typeLayer.textItem.contents = typeLayername;

    then change
    typeLayer.textItem.contents = typeLayername;
    to
    typeLayer.textItem.contents = layerName;

    Mike Shaw
    Photoshop QE

  • Jed Rosenberg

    March 15, 2010 at 7:34 pm

    This is working for me, but how do I adjust the color? I’d like to make it white.

  • Ekim Wahs

    March 15, 2010 at 8:11 pm

    set the foreground color before the type layer gets added.

    app.foregroundColor.rgb.red = 255
    app.foregroundColor.rgb.green = 255
    app.foregroundColor.rgb.blue = 255

    will set the FG color to white

    Mike Shaw
    Photoshop QE

  • Jed Rosenberg

    March 15, 2010 at 8:18 pm

    thank you!

  • Jed Rosenberg

    March 17, 2010 at 7:34 pm

    One more question … i’m trying to make it ‘right justified’ but my script is not working.

    typeLayer.textItem.justification = justification.right

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy