Automatic Bleed action in Photoshop?

Messages
840
Name
Mark
Edit My Images
Yes
I was discussing with a friend of mine about how to automatically add a bleed guide to a document in photoshop. It would require being able to either add guides at 0%, 100% for horizontal and vertical and then expand the document size by 1/4" or to be able to add guides 1/8" from all edges.

Looking in Photoshop though, this looks to be impossible as you can't expand a canvas or add guides by a given distance from an edge.

Really it would be ideal to create an action where 4 guides can be placed 1/8" away from each edge.
I know, this could be easily created if the document size was the same as you could just work out where they need to be, but he uses different size documents and wants to create the bleed automatically.

I've searched Google but can't find anything. I can't believe this can't be done in Photoshop!
Does anyone know if this is possible?

Cheers
Mark
 
You can use a script to do this.
This example will increase the document 6mm (width and height) and add a guide 3mm from the right hand side.
Code:
#target photoshop;

if(documents.length) main();
function main(){
try{
var doc = app.activeDocument;
var res = doc.resolution;
app.displayDialogs = DialogModes.NO;
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.PIXELS;
var Width = doc.width.value;
var Height = doc.height.value;
var CM = res/2.54;
var MM = res/25.4;
var INCH = res;
doc.resizeCanvas((Width + (MM*6)), (Height + (MM*6)), AnchorPosition.MIDDLECENTER);
Width = doc.width.value;
var rightquide = (Width - (MM * 3));
guideLine(rightquide,"Vrtc",'#Pxl');
}catch(e){
    $.writeln(e + "\n" + e.line);
}
finally{
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;
};
};
function guideLine(position, type,unit) {
    var desc = new ActionDescriptor();
        var desc2 = new ActionDescriptor();
        desc2.putUnitDouble( charIDToTypeID('Pstn'), charIDToTypeID(unit), position);
        desc2.putEnumerated( charIDToTypeID('Ornt'), charIDToTypeID('Ornt'), charIDToTypeID(type) );
    desc.putObject( charIDToTypeID('Nw  '), charIDToTypeID('Gd  '), desc2 );
    executeAction( charIDToTypeID('Mk  '), desc, DialogModes.NO );
};
[\code]
 
Well, I admit, I've been schooled. I've never even noticed the new guide layout button in the menu, I always just hit on "new guide". Also, I always thought that relative button in canvas just kept the horizontal and verticle the same ratio.

I do feel a bit silly.

Thank you very much sir!
 
Back
Top