What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Please help, need to convert 1200 images


Fredrik.r

New Member
Messages
3
Likes
0
Hi,

I need to convert 1220 jpg images to black & white, a size of 36x12 mm and 240dpi.
I understand how to make an action and a droplet but the issues are;

1, How can I get Photoshop to resize the images to a width of 36 mm OR a height of 12 mm and then stretch the canvas size to the right width or height? Some images width are higher than their height (of course) and vice versa (but the converted images needs to be exactly 36x12 mm)

2, When I tried to make an action and a droplet I got dialogs all the time with questions about jpg quality or something about feather.. How can I get the droplet to just do it without asking about some of the images?

Thanks! :)
 
You could add a script to part of your action to do the re-sizing and canvas size.

Paul.

Code:
var startRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
doc = activeDocument;
fitImage(340);
CanvasResize();
preferences.rulerUnits = startRulerUnits;

function CanvasResize(){
	if (doc.width < doc.height) {
activeDocument.resizeCanvas(113, 340, AnchorPosition.MIDDLECENTER);
} else
{
activeDocument.resizeCanvas(340, 113, AnchorPosition.MIDDLECENTER);	
	}
}
function fitImage(newImgSize) { 
   if (doc.width > doc.height) { 
     doc.resizeImage(newImgSize, undefined, undefined, ResampleMethod.BICUBICSHARPER);
     } 
   if (doc.width < doc.height) { 
     doc.resizeImage(undefined, newImgSize, undefined, ResampleMethod.BICUBICSHARPER);
     } 
   if (doc.width == doc.height) { 
     doc.resizeImage(newImgSize, newImgSize, undefined, ResampleMethod.BICUBICSHARPER); 
     } 
   }
 
Sorry I did not set the resolution.
This should work now.
Paul.

Code:
var startRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
doc = activeDocument;
fitImage(340);
CanvasResize();
preferences.rulerUnits = startRulerUnits;

function CanvasResize(){
	if (doc.width < doc.height) {
activeDocument.resizeCanvas(113, 340, AnchorPosition.MIDDLECENTER);
} else
{
activeDocument.resizeCanvas(340, 113, AnchorPosition.MIDDLECENTER);	
	}
}
function fitImage(newImgSize) { 
   if (doc.width > doc.height) { 
     doc.resizeImage(newImgSize, undefined, 240, ResampleMethod.BICUBICSHARPER);
     } 
   if (doc.width < doc.height) { 
     doc.resizeImage(undefined, newImgSize, 240, ResampleMethod.BICUBICSHARPER);
     } 
   if (doc.width == doc.height) { 
     doc.resizeImage(newImgSize, newImgSize, 240, ResampleMethod.BICUBICSHARPER); 
     } 
   }
 
Save the file with a .jsx extention IE: resize.jsx
then open one of the documents, start recording a new action, the first steps being.
File - Scripts -Browse (to where you have saved the script)
(The script will run and do the re-sizing etc)
Then do your save and stop recording.
This action can now be batched using File - Automate - Batch ..
Hope that helps.

Paul.
 

Back
Top