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

Watermark Action

New Here ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

Hi! I am in Photoshop now and would like to make an action for placing watermarks so that they take up 10% of the width of the image and are placed so that they are 3% in from the left and 3% from the bottom on the canvas. How do I do this?

Views

1.9K

Translate

Translate

Report

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 1 Correct answer

Community Expert , May 09, 2017 May 09, 2017

You could create a watermark PNG file.  Then place in onto you images with a Photoshop scripts that would size it relative to the document width and locate it where you want it located.  I have posted a script the does something like you want.  It would be easy to modify for your requirements. My script resizes relative to the documents height.  I think for the general case the make more sense than the documents width. If the aspect ratio of your logo is wide resizing it to 10% of the document w

...

Votes

Translate

Translate
Adobe
LEGEND ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

To be that precise you'd need a custom script. See Photoshop Scripting for help with scripting.

If you want to watermark with an Action, you absolutely can. This is a tutorial shows how I watermark my own images for web use. Maybe this method will work for you.

Votes

Translate

Translate

Report

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
Community Expert ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

Or, you may want to take a look at: https://creative.adobe.com/addons/products/12780

There's a free version, and if you want more controls, there's a paid version at pixelsucht.com


Adobe Community Expert / Adobe Certified Instructor

Votes

Translate

Translate

Report

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
Community Expert ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

LATEST

You could create a watermark PNG file.  Then place in onto you images with a Photoshop scripts that would size it relative to the document width and locate it where you want it located.  I have posted a script the does something like you want.  It would be easy to modify for your requirements. My script resizes relative to the documents height.  I think for the general case the make more sense than the documents width. If the aspect ratio of your logo is wide resizing it to 10% of the document width  the height of your logo would be very small on portrait images. Create you logo PNG file large images downsize better than they enlarge

#target photoshop; 

app.bringToFront(); 

var logoFile = "~/Desktop/JJMack.png"; // Watermark file should be large for resize down works better than up

var LogoSize = 10; // percent of document height to resize Watermark to

var LogoMargin = 1;                                         // percent of Document height the Watermark should have as a margin

placeWatermark(logoFile, LogoSize, LogoMargin);             // Place Watermark  into the bottom right of document

function placeWatermark(Image,Size,Margin){ 

  if(!documents.length) return;   // if no document return

  try{ 

  var doc = app.activeDocument; // set Doc object to active document

  app.displayDialogs = DialogModes.NO; // Dialog off

  var strtRulerUnits = app.preferences.rulerUnits; // Save Users ruler units

  var strtTypeUnits = app.preferences.typeUnits; // Save Users Type units

  app.preferences.rulerUnits = Units.PIXELS; // work with pixels

  app.preferences.typeUnits = TypeUnits.PIXELS; // work with pixels

  var fileObj = new File(Image);                 // the passed file

  if(!fileObj.exists){   // If file does not exits tell user

  alert(fileObj.name  + " does not exist!"); 

  return; 

  } 

  placeFile(fileObj); // Place in file the Watermark png file

  activeDocument.activeLayer.resize(100 ,100,AnchorPosition.MIDDLECENTER); // Insure Place did not scale layer 

  var SB = activeDocument.activeLayer.bounds; // get layers bounds

  var layerHeight = SB[3] - SB[1]; // get layers height 

  var resizePercent = (100/layerHeight)*(Size/100*doc.height.value); // Percent to resize by

  activeDocument.activeLayer.resize(resizePercent ,resizePercent,AnchorPosition.MIDDLECENTER);  // Resize width and height by percentage

  SB = activeDocument.activeLayer.bounds; // get resized layers bounds 

  activeDocument.activeLayer.translate(-SB[0].value,-SB[1].value); // Move resized layer to top left canvas corner

  var LayerWidth = (SB[2].value - SB[0].value); 

  var LayerHeight = (SB[3].value - SB[1].value); 

  marginSize = Margin/100*doc.height.value; // move resized watermark into the document lower right corner with some margin

  activeDocument.activeLayer.translate((doc.width.value -marginSize - LayerWidth),( doc.height.value -marginSize - LayerHeight));

  }

  catch(e) { alert(e + ': on line ' + e.line); } // inform user of error 

  finally{ 

  app.preferences.rulerUnits = strtRulerUnits; // Restore user ruler units 

  app.preferences.typeUnits = strtTypeUnits; // Restore user type units   

  }; 

};

function placeFile(placeFile) { 

    var desc21 = new ActionDescriptor(); 

    desc21.putPath( charIDToTypeID('null'), new File(placeFile) ); 

    desc21.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa') ); 

    var desc22 = new ActionDescriptor(); 

    desc22.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), 0.000000 ); 

    desc22.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), 0.000000 ); 

    desc21.putObject( charIDToTypeID('Ofst'), charIDToTypeID('Ofst'), desc22 ); 

    executeAction( charIDToTypeID('Plc '), desc21, DialogModes.NO ); 

}; 

JJMack

Votes

Translate

Translate

Report

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