Photoshop action help

Gary.D

Hoodie
Suspended / Banned
Messages
2,499
Name
Gary Derbridge
Edit My Images
Yes
Ok guys....

I currently have 2 actions set up for my resize and watermark on pictures that I do at parties, 1 for landscape and 1 for portrait.

So far the actions work like this:

image size 520px - paste

(I copy my watermark before I start using the action so that it pastes it into the picture)

So now once I have used one of the 2 actions I then have to move the watermark that has been pasted in, into the bottom right of the corner and flatten the image and save it.

Now my question is
1. Can I make a resize action that would put both landscape and portrait longest side to 520px
2. Is there a way I can get the watermark to allign bottom right, so I can add that, flatten image and save to my action and make it a much quicker process.


Thanks for any help
Gary
 
Yes to both questions. Do you want to know how?
 
Once you have pasted your watermark into the image, select all, then layers>align>align to bottom then repeat for right edges.
 
Once you have pasted your watermark into the image, select all, then layers>align>align to bottom then repeat for right edges.

Cheers Tom, I was looking for that as well. :thumbs:

Thats perfect thanks!

Anyone got any idea of how to resize both portrait and landscapes to longest side of 520px?

And I'd also like to know that, if it's possible. I resize in Lightroom first but it would be handy to do it all in one place.
 
Cheers Tom, I was looking for that as well. :thumbs:



And I'd also like to know that, if it's possible. I resize in Lightroom first but it would be handy to do it all in one place.


Here is a script from the web that should work, just change the numbers to what you need them to be.


Code:

doc = app.activeDocument

doc.flatten()

if (doc.colorProfileName.substring(0,4) != "sRGB")
doc.convertProfile("sRGB IEC61966-2.1", Intent.PERCEPTUAL, true, false)

if (doc.bitsPerChannel != BitsPerChannelType.EIGHT)
doc.bitsPerChannel = BitsPerChannelType.EIGHT

var startRulerUnits = app.preferences.rulerUnits
app.preferences.rulerUnits = Units.PIXELS

if (doc.width > doc.height)
doc.resizeImage(720, 480, doc.resolution, ResampleMethod.BICUBIC)
else
doc.resizeImage(480, 720, doc.resolution, ResampleMethod.BICUBIC)

app.preferences.rulerUnits = startRulerUnits


Save a .js script and add it to the scripts folder.


Might be one fro Darren (Cowasaki) to have a look at.
 
And that too, but I think you need to have auto rotate on your camera switched off (maybe wrong on that)

I've used that in a batch operation without auto rotate being off. I can't quite see how it would make a difference. That could be because I'm dumb, though.
 
Script Writer already does this, I can have a look at the script above but it looks ok.....
 
You are always forcing the image to a specific ratio and if the original ratio is not this already it will stretch it. Script writer does this already but with a quick tweak I will re-do the code.....
 
Hi Darren, a quick look at the above script:-
1 It dosen't use semicolons to terminate lines.
2 It dosen't take into account if it's a square document (Yes I use medium format)
3 It doesn't take into account if you are up-scaling or down-scaling

Just a note about saving as a .JS that's only required for Photoshop 7 otherwise the norm is .JSX

Apart from that it is also presuming you want to flatten etc.

Not a script I would use.
 
Hi Darren, a quick look at the above script:-
1 It dosen't use semicolons to terminate lines.
2 It dosen't take into account if it's a square document (Yes I use medium format)
3 It doesn't take into account if you are up-scaling or down-scaling

Just a note about saving as a .JS that's only required for Photoshop 7 otherwise the norm is .JSX

Apart from that it is also presuming you want to flatten etc.

Not a script I would use.

It would just treat square documents as portraits.

The problem regrading re-sizing is that if you want it 720 x 480 and the original image is 4000 x 2000 do you make it 720 x 360 ? but what if the original image is 4000 x 3600 do you make it 720 x 648 or do you limit the y size ??

Based on limiting the size to 720 then this would re-size them:


doc = app.activeDocument;


doc.flatten();

var image_size=720;

if (doc.colorProfileName.substring(0,4) != "sRGB") { doc.convertProfile("sRGB IEC61966-2.1", Intent.PERCEPTUAL, true, false) };

if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) {doc.bitsPerChannel = BitsPerChannelType.EIGHT };

var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;

if (doc.width > doc.height) {
doc.resizeImage(image_size, image_size * doc.height.value / doc.width.value, doc.resolution, ResampleMethod.BICUBIC);
} else {
doc.resizeImage(image_size * doc.width.value / doc.height.value , image_size, doc.resolution, ResampleMethod.BICUBIC);
};
app.preferences.rulerUnits = startRulerUnits;

 
If you want to limit x and y you could use..
Code:
FitImage(1000,500);

function FitImage( inWidth, inHeight ) {
	if ( inWidth == undefined || inHeight == undefined ) {
		alert( "FitImage requires both Width & Height!");
		return 100;
	}
	var desc = new ActionDescriptor();
	var unitPixels = charIDToTypeID( '#Pxl' );
	desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
	desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
	var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );	
	executeAction( runtimeEventID, desc, DialogModes.NO );
}
 
If you want to limit x and y you could use..
Code:
FitImage(1000,500);

function FitImage( inWidth, inHeight ) {
	if ( inWidth == undefined || inHeight == undefined ) {
		alert( "FitImage requires both Width & Height!");
		return 100;
	}
	var desc = new ActionDescriptor();
	var unitPixels = charIDToTypeID( '#Pxl' );
	desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
	desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
	var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );	
	executeAction( runtimeEventID, desc, DialogModes.NO );
}

I thought the plan was to change THAT script not re-write it completely :lol:

MUCH better way of doing it though :D
 
Back
Top