There are several ways in which you could get you output *jpeg to 72 dpi at a given set of dimensions… On way would be to scale the whole art in AI before exporting it… Up to you if you save this change or not… You can have PS open the image and alter the resolution after exporting… Or on the mac you could use some utility like the shell SIPS which you also have AppleScript access to via Image Events scripting… Anyhows here is a very basic example of how th pass a file object to PS using the bridgetalk messaging system… The Adobe way of doing it so to speak… I included a filp just so's you could see the changes made… Have fun…
#target illustrator
var aiFile = File( '~/Desktop/zdfb.jpg' );
var psScript = 'app.displayDialogs = DialogModes.NO;';
psScript += 'app.open(' + aiFile.toSource() + ');';
psScript += 'app.activeDocument.resizeImage( undefined,undefined,72,ResampleMethod.NONE);';
psScript += 'app.activeDocument.flipCanvas( Direction.HORIZONTAL );';
psScript += 'app.activeDocument.close( SaveOptions.SAVECHANGES );';
psScript += 'app.displayDialogs = DialogModes.ALL;';
//$.writeln( psScript );
btMessaging( 'photoshop',psScript );
function btMessaging( targetApp, script ) {
var bt = new BridgeTalk();
bt.target = targetApp;
bt.body = script;
bt.onResult = function( inBT ) { alert( 'Done…' ) };
bt.onError = function( inBT ) { alert( 'NOT Done…' ) };
bt.send( 20 );
};
There are numerous ways in which you can construct the script 'string' contents on the fly but you get the general idea…