Copy link to clipboard
Copied
I am trying to use some actions that I saved a while back. One resizes the photos to 600px x 400px and the other watermarks the image. I choose my source folder and destination folder and hit go. It seems to go through the actions but when I look the files have not done what they should have and the destination folder remains empty. Why are these actions going through the process and then not saving when it all worked fine a couple of months ago? I on the latest CC I think! Any help would be very much appreciated. Thank you.
Copy link to clipboard
Copied
Hi i think you are not choosing input or output folder settings in a correct way....regards
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You would need to post the action. Actions can not deal with document size well and have limited saving capability. You are usually better off Batching you actions with a Batch processor like menu File>Automate>Batch.., Menu File>Scripts>Image Processor... and have the Batch processor save the output files. As for resizing Watermaks for different size images actions will have a problems doing the resize. There are no Action conditional step for testing document sizes. You actually would need a Photoshop script to handle sizing well.
I have post a script to watermark Images with your watermark. The script has variable that are easy to modify to use your Watermark file and you size and location settings.
My Personal settings
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
var BottomLetf = false; // false = Bottom Right true Bottom Left
The PlaceWatermark.jsx Script file
/* ==========================================================
// 2017 John J. McAssey (JJMack)
// ======================================================= */
// This script is supplied as is. It is provided as freeware.
// The author accepts no liability for any problems arising from its use.
/*
<javascriptresource>
<about>$$$/JavaScripts/PlaceWatermark/About=JJMack's PlaceWatermark ^r^rCopyright 2017 Mouseprints.net^r^rPhotoshop Script^rCustomize using first four var</about>
<category>JJMack's Script</category>
<enableinfo>true</enableinfo>
</javascriptresource>
*/
#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
var BottomLetf = false; // false = Bottom Right true Bottom Left
//placeWatermark(logoFile, LogoSize, LogoMargin); // Place Watermark into the bottom of the document
if (documents.length) app.activeDocument.suspendHistory('placeWatermark','placeWatermark(logoFile,LogoSize,LogoMargin)' );
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function placeWatermark(Image,Size,Margin){
if(!documents.length) return; // if no document return
var fileObj = new File(Image); // the passed file
if(!fileObj.exists){ // If file does not exits tell user
alert(fileObj.name + " does not exist!"); // Alert User
return; // 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 layers = app.activeDocument.layers; // get layers
app.activeDocument.activeLayer = layers[0]; // Target Top Layer
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); // get resized layers width
var LayerHeight = (SB[3].value - SB[1].value); // get resized layers height
marginSize = Margin/100*doc.height.value; // Margin size
// move resized watermark into the document lower right corner with some margin or lower left
if ( BottomLetf) {activeDocument.activeLayer.translate(marginSize,( doc.height.value -marginSize - LayerHeight));}
else {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 );
};
Copy link to clipboard
Copied
Thank you JJMack for your reply. I do not have a clue with code and where to even enter code in photoshop. The fact is a couple of months ago I successfully did this in the way I mentioned above with 100"s of photos after following a youtube video. I now have a couple more I need to apply this to and since the update, it is not working. I have seen in this community that I am not the only one. If you are telling me to write code to place a watermark on an image then I am truly lost. Why has Adobe even left actions as an option in the program if it doesn't work? I would really like to know what I am doing wrong with actions. My knowledge of making scripts work is non-existent and I did not need to use that last time.
Copy link to clipboard
Copied
Clueless You would copy the codet into a text file named PlaceWatermark.jsx. You would change the one line:
var logoFile = "~/Desktop/JJMack.png"; // Watermark file should be large for resize down works better than up
the JJMack.png part to a file name on you desktop that is your watermark file. It can be any Image file type that Photoshop supports. jpg, psd, png, etc. The script will size the height of you watermark to 10% the height of your images and position it to the bottom right of you image..
You can change the size to as different percentage and location to the bottom left. ou would then copy the Script into your Photoshop version preset script folder. You would use it like any other Photoshop script through menu File>Scripts>PlaceWatermark you can record that as a step an action. You watermark will be a smart object layer in your document. If your watermark is a PSD you can open the watermark object in photoshop and edit your watermark layers. When you save it Photoshop will update the smart object layer object and your changes will be resized like the watermark.
The script will watermark any side image however you may not be able to make out your watermark in a small thumbnail size image
Copy link to clipboard
Copied
JJMack seriously, are you addressing ME as "Clueless"? I find that very insulting. I was never trained in all these Adobe products and and trying figure out this stuff via You Tube videos and advice from communities and while I appreciate the time you've taken to reply to me, I do not appreciate the way you have addressed me in your response.
Copy link to clipboard
Copied
Sorry I was quoting you " I do not have a clue with code" I was not trained either I learned on my own.
Copy link to clipboard
Copied
I normally do this as a couple of steps process. So I will resize the height on the wide photos, and then resize the width of the taller photos and then do the watermark all of them.
Copy link to clipboard
Copied
From my testing everything works fine. I am assuming you do not have Save As step in your action. Can you please take screenshot of your action steps and post it here?
One more thing, on your screenshot I see that drive G is selected as source folder, is that what you want or mistake in screenshot?
I am using latest Photoshop 21.2.2 on Windows 10 while testing.
Copy link to clipboard
Copied
Hi Bojan,
Thank you for your reply. I am going to try and sit down tonight and create new actions. I just need to find the video I got the instructions from originally. For the moment though, these are my actions I used without issue previously. I think in one of the actions it exports and therefore doesn't save and the two other actions do have save in them. I am working from a memory stick, like I did previously, so choosing G was intentional.
Kind Regards, Lauren
Copy link to clipboard
Copied
When you Post actions it would be very helpful if you would fully expand the actions so we can read how you recorded the actions. When you post actions that are not fully expanded we can not see the settings you have recorded into each step. This is very important. Very few Steps can do things relatively using Relative percentage settings and steps like Save As can be recorder two was. One ways has hard coded the output path and file name and would need to be over ridden by Batch else the same file will always be written and overlay to previous saved file. The other way just records the output path no file name is recorded. When that action step plays the current document Name would be used as the file name.
Lets look at one of the action posted.
Because step are not fully expanded its harder to realize. The First step Place we can not see what kind of image was placed in for we can see the steps settings. We can not tell if the watermark may contain transparency, or what size the watermark may have been or if you sized and positioned the watermark via the Place Transform. All we know is some image file was most likely placed is as a smart object layer because you Photoshop preference is most likely Adobe default setting Place in smart object. The Watermark smart object layer will be the current Photoshop targeted layer.
The next step Select Layer "Background" was not a normal target background for the next step is align current layer. Background can not be aligned for background layers do not support transparency they are a canvas sized background layer. So the Select Background step was most likely not deeded. It added the Background Layer to Photoshop targeted layers. This step also created a document dependency for the action. The Action required that the document it is use on have a background layer. If it does not the Action will fail with an error message.
The next to Align Layer steps align the Placed watermark smart object layer horizontally and vertically somewhere over the canvas for it was also a current targeted layer. If aligned to edges the watermark would be tight to the edge there would be no margin. Normally Actions would nudge the alignment in that case to move the watermark inwards some.
The next step Flatten Image would flatten all layer into a Background layer the watermark would bet permanently burned into the image.
The Save I can not tell it its a "Save" step or a "Save As" step foy the both record as a "Save" step If it a save Step the will override th opened files and you will loose your the document's layers if it was a layered document and you will not had a copy of you image without your watermark.
Below I recorded your action one of the ways your action may have been been recorded. I fully expanded it so you can see the settings used recording the action.
You cans see I placed in a PSD image so the watermark may contain transparency it does not have to be a rectangle. The Place Transform was also used to size and position watermark. That may have add a dependency on the document size being a particular aspect ration and size. Actions have problems dealing with documents size.
You can see I aligned the watermark to the center of the document nudging is not needed.
You also can see I recorder a Save As step and did not record in a file name the action can be batched. Normally I would not record any save step. I would use a script like Images Processor Pro to batch my action. That Image Processor can save up to 10 image file for each image file processed they can have different sizes and file types.
While Actions are very useful and easy to record some knowledge and skill is helpful. Scripts also automate Photoshop steps but can automated Photoshop processes better then Actions because they can use logic. Actions may actually run faster than a script that does the same thing for action steps are fixed no logic needs to be read processed and executed.
Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
Contains
Copy link to clipboard
Copied
I see two solutions for your problem.
Solution A:
Check Override Action Save As Commands in Batch dialogue and use actions with Save step.
Solution B:
Excludde Export and Save step from action without checking Override Actions Save As Commands.
I do not see Export step and what is recorded (probably Save for Web) but in any case you must untick or exclude that step by clicking on the left side of step to dissapear checkmark as shown on screenshot below.