Resolution varies

I just noticed that when I checked the image sizes, some of the photos that I imported into my PC (some very recent and some ten years ago), the resolutions vary from 72 to 300. I really want the higher resolution but do not understand why some are only 72 which is okay for web/viewing on monitor but not for printing which is what I want. Can anyone guide me or offer me advice?
I am using Windows 7 and PSE 11.
Mcdon47

The resolution is initially set by the imaging device (camera or scanner) not by PSE. You can use Image> Resize to scale the picture and set the resolution. Doing this without checking the 'resample' box will have the effect of reducing the image dimensions if increasing resolution.
If you want to retain the image dimensions then you must select the 'resample' check box. How good a result you get doing this though is a bit hit-or-miss depending on the original resolution and the sharpness of that image. Try the different algorithms to see which gives you the best results.
Cheers,
Neale
Insanity is hereditary, you get it from your children
If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

Similar Messages

  • Change resolution based on dpi in flex

    Hi All ,
        In my Flex Application , i am getting image for chart / process from java. Its working fine.
    Now my new requirement is :
    1) For the first time when getting image the default dpi should be  : 72dpi
    2) And i should have 2 more options to select 90dpi and 150dpi in flex
       and when selecting these dpis , my chart/process resolution should change based on selected dpi in Flex.
    Please helpp.....

    SkR Pasha,
    If I understand what you mean, there are two approaches you can take:
    1) The easiest way is to just define 3 paths to images, each one being a different resolution:
    var img1:String = lowResImage.gif;
    var img2:String = medResImage.gif;
    var img3:String = highResImage.gif;
    Then load the one that is appropriate when the DPI changes.
    2) Flex 4.5 includes support for multiple DPIs. First you get the current DPI:
    FlexGlobals.topLevelApplication.applicationDP
    Then you use the MultiDPIBitmapSource class to specify which image to use based on the DPI.
    Here's an example that you can apply to a standard application (you don't need to write a mobile app to do it):
    http://help.adobe.com/en_US/flex/mobileapps/WS19f279b149e7481c682e5a9412cf5976c17-8000.htm l
    hth,
    matt horn
    flex docs

  • How to control resolution of exported jpeg

    I know I can control the resolution of an exported jpeg through the UI with the Export JPEG dialog box. I'm wondering how to access that setting with the object model. When I export to a jpeg with my script, it seems to use whatever resolution setting was last selected through the UI. I would like my script to explicitly say what resolution to use.
    Thanks!

    Hi Mathew,
    Please check the below JS code. I am not use the UI just Prompt to get the input value of resolution.
    var myPrompt = prompt ("Enter the Value Resolution Value", '300')
    var myFold = Folder("~/Desktop");
    var myFile = new File(myFold +"/"+"csmphil.jpg");
    SaveAsJPEG(myFile);
    function SaveAsJPEG(myFile){
        try{
            app.jpegExportPreferences.exportResolution = parseInt(myPrompt);
            app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;
            app.jpegExportPreferences.jpegRenderingStyle = JPEGOptionsFormat.BASELINE_ENCODING;
            app.selection[0].exportFile(ExportFormat.JPG, myFile);
            }catch(e){};
    thx,
    csm_phil

  • How to check the resolution of the image through scripting

    How to check the raster image resolution in illustrator through script?

    Thanks for your reply.
    I have found another script which returns the dpi of linked images.
    I am not so good in scripting could you have a look in this and convert to RasterItem.resolution.
    var docRef = activeDocument;
    with (docRef) {
    // We are expecting 1 placed item (image) here!!!
    var placedWidth = placedItems[0].width;
    var placedHeight = placedItems[0].height;
    var placedPath = placedItems[0].file;
    // The 2 variables below are global
    XpixelDimension = 0;
    YpixelDimension = 0;
    // Call the function
    exifDimensions(placedPath);
    // Calculate the Height & Width DPI's
    var widthDPI = Math.floor(XpixelDimension / (placedWidth / 72));
    var heightDPI = Math.floor(YpixelDimension / (placedHeight / 72));
    alert('Width DPI is ' + widthDPI + ' Height DPI is ' + heightDPI);
    function exifDimensions(imageFilePath) {
    imageFilePath.open('r');
    try {
    while (imageFilePath.tell() < imageFilePath.length) {
    var line = imageFilePath.readln();
    var idxOf = (line.indexOf('<exif:PixelXDimension>') > -1) ? line.indexOf('<exif:PixelXDimension>') : line.indexOf('<exif:PixelYDimension>');
    if(idxOf > -1) {
    if(line.indexOf('<exif:PixelXDimension>') > -1) XpixelDimension = parseInt(line.substring(line.indexOf(">")+1, line.lastIndexOf("<")));
    else YpixelDimension = parseInt(line.substring(line.indexOf(">")+1, line.lastIndexOf("<")));
    catch (ex) { alert('Fluff');}
      finally { imageFilePath.close(); return [XpixelDimension, YpixelDimension]; }
    Thanks in advance
    Vinoth

  • How to make arrays or repeat objects in circle?

    Hello,
    1 - How to make arrays without copying and pasting? Fig-1
    2 - how to create objects repeated in circles? Fig-2
    Regards and Thanks

    1) Patterns
    2) One option is Scripting (or Actions).
    http://forums.adobe.com/message/3472806#3472806
    Edit: That was only for text layers, you could give this a try:
    // xonverts to smart object, copies and rotates a layer;
    // for photoshop cs5 on mac;
    // 2011; use it at your own risk;
    #target photoshop
    ////// filter for checking if entry is numeric and positive, thanks to xbytor //////
    posNumberKeystrokeFilter = function() {
              this.text = this.text.replace(",", ".");
              this.text = this.text.replace("-", "");
              if (this.text.match(/[^\-\.\d]/)) {
                        this.text = this.text.replace(/[^\-\.\d]/g, '');
    posNumberKeystrokeFilter2 = function() {
              this.text = this.text.replace(",", "");
              this.text = this.text.replace("-", "");
              this.text = this.text.replace(".", "");
              if (this.text.match(/[^\-\.\d]/)) {
                        this.text = this.text.replace(/[^\-\.\d]/g, '');
              if (this.text == "") {this.text = "2"}
              if (this.text == "1") {this.text = "2"}
    var theCheck = photoshopCheck();
    if (theCheck == true) {
    // do the operations;
    var myDocument = app.activeDocument;
    var myResolution = myDocument.resolution;
    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var dlg = new Window('dialog', "set circle-radius for arrangement", [500,300,840,450]);
    // field for radius;
    dlg.radius = dlg.add('panel', [15,17,162,67], 'inner radius');
    dlg.radius.number = dlg.radius.add('edittext', [12,12,60,32], "30", {multiline:false});
    dlg.radius.numberText = dlg.radius.add('statictext', [65,14,320,32], "mm radius ", {multiline:false});
    dlg.radius.number.onChange = posNumberKeystrokeFilter;
    dlg.radius.number.active = true;
    // field for number;
    dlg.number = dlg.add('panel', [172,17,325,67], 'number of copies');
    dlg.number.value = dlg.number.add('edittext', [12,12,60,32], "30", {multiline:false});
    dlg.number.value.onChange = posNumberKeystrokeFilter2;
    dlg.number.value.text = "12";
    // buttons for ok, and cancel;
    dlg.buttons = dlg.add('panel', [15,80,325,130], '');
    dlg.buttons.buildBtn = dlg.buttons.add('button', [13,13,145,35], 'OK', {name:'ok'});
    dlg.buttons.cancelBtn = dlg.buttons.add('button', [155,13,290,35], 'Cancel', {name:'cancel'});
    // show the dialog;
    dlg.center();
    var myReturn = dlg.show ();
    if (myReturn == true) {
    // the layer;
              var theLayer = smartify(myDocument.activeLayer);
              app.togglePalettes();
    // get layer;
              var theName = myDocument.activeLayer.name;
              var theBounds = theLayer.bounds;
              var theWidth = theBounds[2] - theBounds[0];
              var theHeight = theBounds[3] - theBounds[1];
              var theOriginal = myDocument.activeLayer;
              var theHorCenter = (theBounds[0] + ((theBounds[2] - theBounds[0])/2));
              var theVerCenter = (theBounds[1] + ((theBounds[3] - theBounds[1])/2));
    // create layerset;
              var myLayerSet = myDocument.layerSets.add();
              theOriginal.visible = false;
              myLayerSet.name = theName + "_rotation";
    // create copies;
              var theNumber = dlg.number.value.text;
              var theLayers = new Array;
              for (var o = 0; o < theNumber; o++) {
                        var theCopy = theLayer.duplicate(myLayerSet, ElementPlacement.PLACEATBEGINNING);
                        theLayers.push(theCopy);
    // calculate the radius in pixels;
              var theRadius = Number(dlg.radius.number.text) / 10 * myResolution / 2.54;
              myDocument.selection.deselect();
    // get the angle;
              theAngle = 360 / theNumber;
    // work through the layers;
              for (var d = 0; d < theNumber; d++) {
                        var thisAngle = theAngle * d ;
                        var theLayer = theLayers[d];
    // determine the offset for outer or inner radius;
                        var theMeasure = theRadius + theHeight/2;
    //                    var theMeasure = theRadius + theWidth/2;
                        var theHorTarget = Math.cos(radiansOf(thisAngle)) * theMeasure;
                        var theVerTarget = Math.sin(radiansOf(thisAngle)) * theMeasure;
    // do the transformations;
                        rotateAndMove(myDocument, theLayer, thisAngle + 90, - theHorCenter + theHorTarget + (myDocument.width / 2), - theVerCenter + theVerTarget + (myDocument.height / 2));
    // reset;
    app.preferences.rulerUnits = originalUnits;
    app.togglePalettes()
    ////// function to determine if open document is eligible for operations //////
    function photoshopCheck () {
    var checksOut = true;
    if (app.documents.length == 0) {
              alert ("no open document");
              checksOut = false
    else {
              if (app.activeDocument.activeLayer.isBackgroundLayer == true) {
                        alert ("please select a non background layer");
                        checksOut = false
              else {}
    return checksOut
    ////// function to smartify if not //////
    function smartify (theLayer) {
    // make layers smart objects if they are not already;
              if (theLayer.kind != LayerKind.SMARTOBJECT) {
                        myDocument.activeLayer = theLayer;
                        var id557 = charIDToTypeID( "slct" );
                        var desc108 = new ActionDescriptor();
                        var id558 = charIDToTypeID( "null" );
                        var ref77 = new ActionReference();
                        var id559 = charIDToTypeID( "Mn  " );
                        var id560 = charIDToTypeID( "MnIt" );
                        var id561 = stringIDToTypeID( "newPlacedLayer" );
                        ref77.putEnumerated( id559, id560, id561 );
                        desc108.putReference( id558, ref77 );
                        executeAction( id557, desc108, DialogModes.NO );
                        return myDocument.activeLayer
              else {return theLayer}
    ////// radians //////
    function radiansOf (theAngle) {
              return theAngle * Math.PI / 180
    ////// rotate and move //////
    function rotateAndMove (myDocument, theLayer, thisAngle, horizontalOffset, verticalOffset) {
    // do the transformations;
    myDocument.activeLayer = theLayer;
    // =======================================================
    var idTrnf = charIDToTypeID( "Trnf" );
        var desc3 = new ActionDescriptor();
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc3.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc4 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc4.putUnitDouble( idHrzn, idPxl, horizontalOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc4.putUnitDouble( idVrtc, idPxl, verticalOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc3.putObject( idOfst, idOfst, desc4 );
        var idAngl = charIDToTypeID( "Angl" );
        var idAng = charIDToTypeID( "#Ang" );
        desc3.putUnitDouble( idAngl, idAng, Number(thisAngle) );
    executeAction( idTrnf, desc3, DialogModes.NO );

  • DVI to S-Video adapter worth it?

    Just bought a MBP and will be connecting to an LCD projector for presentations. Traditionally I have connected via S-video and I've appreciated the ease of set-up.
    Is the DVI to VGA connection that much sharper on the screen through a projector?

    VGA resolution: varies, read wikipedia for more info: http://en.wikipedia.org/wiki/Vga
    S-Video resolution: 480i or 576i
    Component video resolution: 480p, 576p, 720p, 1080i, and 1080p
    If you can use the standard DVI to VGA that came with your MBP, you are better off. S-Video is primarily for TV-Out.

  • Can anyone help me out w/ a simple question?

    I need a little help getting this to work. This is my first script so go easy on me! 8)
    I looked at the forums but being that this is my first script it's still too difficult to decipher everything. In my document that's already open I want the script to make a text box of 50 pixels (for example) and insert my text inside it. Here's what I have...
    // Create new text layer
    var artLayerRef = activeDocument.artLayers.add()
    artLayerRef.kind = LayerKind.TEXT
    // Make text BOX on text layer
    TextType.PARAGRAPHTEXT.width = 50
    // Add text to text layer
    var textItemRef = artLayerRef.textItem 
    textItemRef.contents = "My Text Here. My Text Here. My Text Here" 
    // End 
    artLayerRef = null 
    textItemRef = null 
    It places the text but doesn't put it in a text box. It's just a line of text that extends off of the page. Anybody know what I can do?
    Thanks you!

    Hi Mike, even setting unit values don't seem to work so have to resort back to the 72ppi
    var res=activeDocument.resolution;
    var artLayerRef = activeDocument.artLayers.add()
    artLayerRef.kind = LayerKind.TEXT
    var textItemRef = artLayerRef.textItem
    // Make text BOX on text layer
    textItemRef.kind = TextType.PARAGRAPHTEXT;
    textItemRef.width = 50/(res/72); //width in pixels
    textItemRef.height = 100/(res/72);//height in pixels
    // Add text to text layer
    textItemRef.contents = "My Text Here. My Text Here. My Text Here."

  • Saveas Scripting help request

    I am trying to piece together a maro that will initially resize an image and save it with a different suffix at different size increments. I found within the cs5 scripts folder the macro 'Fit Image.jsx' that would allow me to resize correctly but am lost on how to add in the subsequent save steps and additional resize and saves. I would like to have it save the image with 5 different file sizes and suffixes (400x400 '-2' suffix, 250x250 '-2T', 150x150 '-1', 100x100 '-0', and 50x50 '-2S'). I found some information on the saveas http://forums.adobe.com/message/2652204 but have no experience with javascript. I have some understanding of VBA and believe a loop could be used but haven't the slightest idea how to set this up. Is there anyone out there that could help walk me through this and lend me a hand?
    ---Below contains the 'Fit Image.jsx' file that I found---
    // c2008 Adobe Systems, Inc. All rights reserved.
    // Written by Ed Rose
    // based on the ADM Fit Image by Charles A. McBrian from 1997
    // edited by Mike Hale added option to avoid resize on images already smaller than target size
    @@@BUILDINFO@@@ Fit Image.jsx 1.0.0.21
    /* Special properties for a JavaScript to enable it to behave like an automation plug-in, the variable name must be exactly
       as the following example and the variables must be defined in the top 1000 characters of the file
    // BEGIN__HARVEST_EXCEPTION_ZSTRING
    <javascriptresource>
    <name>$$$/JavaScripts/FitImage/Name=Fit Image...</name>
    <menu>automate</menu>
    <enableinfo>true</enableinfo>
    <eventid>3caa3434-cb67-11d1-bc43-0060b0a13dc4</eventid>
    <terminology><![CDATA[<< /Version 1
                             /Events <<
                              /3caa3434-cb67-11d1-bc43-0060b0a13dc4 [($$$/AdobePlugin/FitImage/Name=Fit Image) /imageReference <<
                               /width [($$$/AdobePlugin/FitImage/Width=width) /pixelsUnit]
                               /height [($$$/AdobePlugin/FitImage/Height=height) /pixelsUnit]
                               /limit [($$$/AdobePlugin/FitImage/limit=Don't Enlarge) /boolean]
                              >>]
                             >>
                          >> ]]></terminology>
    </javascriptresource>
    // END__HARVEST_EXCEPTION_ZSTRING
    // enable double clicking from the Macintosh Finder or the Windows Explorer
    #target photoshop
    // debug level: 0-2 (0:disable, 1:break on error, 2:break at beginning)
    // $.level = 2;
    // debugger; // launch debugger on next line
    // on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details
    $.localize = true;
    var isCancelled = true; // assume cancelled until actual resize occurs
    // the main routine
    // the FitImage object does most of the work
    try {
        // create our default params
        var sizeInfo = new SizeInfo();
        GlobalVariables();
        CheckVersion();
        var gIP = new FitImage();
        if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
            gIP.CreateDialog();
            gIP.RunDialog();
        else {
            gIP.InitVariables();
            ResizeTheImage(sizeInfo.width.value, sizeInfo.height.value);
        if (!isCancelled) {
            SaveOffParameters(sizeInfo);
    // Lot's of things can go wrong
    // Give a generic alert and see if they want the details
    catch( e ) {
        if ( DialogModes.NO != app.playbackDisplayDialogs ) {
            alert( e + " : " + e.line );
    // restore the dialog modes
    app.displayDialogs = gSaveDialogMode;
    isCancelled ? 'cancel' : undefined;
    function ResizeTheImage(width, height) {
        var oldPref = app.preferences.rulerUnits;
        var docWidth;
        var docHeight;
        var docRatio;
        var newWidth;
        var newHeight;
        var resolution = app.activeDocument.resolution;
        var limit = sizeInfo.limit;
        app.preferences.rulerUnits = Units.PIXELS; // save old preferences
        // original width, height
        docWidth = (1.0 * app.activeDocument.width * resolution) / 72.0; // decimal inches assuming 72 dpi (used in docRatio)
        docHeight = (1.0 * app.activeDocument.height * resolution) / 72.0; // ditto
        if (docWidth < 1.0 || docHeight < 1.0)
            return true; // error
        if (width < 1 || height < 1)
            return true; // error
        if ( limit && ( docWidth <= width && docHeight <= height ) ){
            app.preferences.rulerUnits = oldPref; // restore old prefs
            isCancelled = false; // if get here, definitely executed
            return false; // no error
        docRatio = docWidth / docHeight; // decimal ratio of original width/height
        newWidth = width;
        newHeight = ((1.0 * width) / docRatio); // decimal calc
        if (newHeight > height) {
            newWidth = docRatio * height; // decimal calc
            newHeight = height;
        // resize the image using a good conversion method while keeping the pixel resolution
        // and the aspect ratio the same
        app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBIC);
        app.preferences.rulerUnits = oldPref; // restore old prefs
        isCancelled = false; // if get here, definitely executed
        return false; // no error
    // created in
    function SaveOffParameters(sizeInfo) {
        // save off our last run parameters
        var d = objectToDescriptor(sizeInfo, strMessage);
        app.putCustomOptions("3caa3434-cb67-11d1-bc43-0060b0a13dc4", d);
        app.playbackDisplayDialogs = DialogModes.ALL;
        // save off another copy so Photoshop can track them corectly
        var dd = objectToDescriptor(sizeInfo, strMessage);
        app.playbackParameters = dd;
    function GlobalVariables() {
        // a version for possible expansion issues
        gVersion = 1.1;
        gMaxResize = 300000;
        // remember the dialog modes
        gSaveDialogMode = app.displayDialogs;
        app.displayDialogs = DialogModes.NO;
        gInAlert = false;
        // all the strings that need to be localized
        strTitle = localize( "$$$/JavaScript/FitImage/Title=Fit Image" );
        strConstrainWithin = localize( "$$$/JavaScript/FitImage/ConstrainWithin=Constrain Within" );
        strTextWidth = localize("$$$/JavaScripts/FitImage/Width=&Width:");
        strTextHeight = localize("$$$/JavaScripts/FitImage/Height=&Height:");
        strTextPixels = localize("$$$/JavaScripts/FitImage/Pixels=pixels");
        strButtonOK = localize("$$$/JavaScripts/FitImage/OK=OK");
        strButtonCancel = localize("$$$/JavaScripts/FitImage/Cancel=Cancel");
        strTextSorry = localize("$$$/JavaScripts/FitImage/Sorry=Sorry, Dialog failed");
        strTextInvalidType = localize("$$$/JavaScripts/FitImage/InvalidType=Invalid numeric value");
        strTextInvalidNum = localize("$$$/JavaScripts/FitImage/InvalidNum=A number between 1 and 300000 is required. Closest value inserted.");
        strTextNeedFile = localize("$$$/JavaScripts/FitImage/NeedFile=You must have a file selected before using Fit Image");
        strMessage = localize("$$$/JavaScripts/FitImage/Message=Fit Image action settings");
        strMustUse = localize( "$$$/JavaScripts/ImageProcessor/MustUse=You must use Photoshop CS 2 or later to run this script!" );
        strLimitResize = localize("$$$/JavaScripts/FitImage/Limit=Don^}t Enlarge");
    // the main class
    function FitImage() {
        this.CreateDialog = function() {
            // I will keep most of the important dialog items at the same level
            // and use auto layout
            // use overriding group so OK/Cancel buttons placed to right of panel
            var res =
                "dialog { \
                    pAndB: Group { orientation: 'row', \
                        info: Panel { orientation: 'column', borderStyle: 'sunken', \
                            text: '" + strConstrainWithin +"', \
                            w: Group { orientation: 'row', alignment: 'right',\
                                s: StaticText { text:'" + strTextWidth +"' }, \
                                e: EditText { preferredSize: [70, 20] }, \
                                p: StaticText { text:'" + strTextPixels + "'} \
                            h: Group { orientation: 'row', alignment: 'right', \
                                s: StaticText { text:'" + strTextHeight + "' }, \
                                e: EditText { preferredSize: [70, 20] }, \
                                p: StaticText { text:'" + strTextPixels + "'} \
                            l: Group { orientation: 'row', alignment: 'left', \
                                    c:Checkbox { text: '" + strLimitResize + "', value: false }, \
                        buttons: Group { orientation: 'column', alignment: 'top',  \
                            okBtn: Button { text:'" + strButtonOK +"', properties:{name:'ok'} }, \
                            cancelBtn: Button { text:'" + strButtonCancel + "', properties:{name:'cancel'} } \
            // the following, when placed after e: in w and h doesn't show up
            // this seems to be OK since px is put inside the dialog box
            //p: StaticText { text:'" + strTextPixels + "'}
            // create the main dialog window, this holds all our data
            this.dlgMain = new Window(res,strTitle);
            // create a shortcut for easier typing
            var d = this.dlgMain;
            // match our dialog background color to the host application
            d.graphics.backgroundColor = d.graphics.newBrush (d.graphics.BrushType.THEME_COLOR, "appDialogBackground");
            d.defaultElement = d.pAndB.buttons.okBtn;
            d.cancelElement = d.pAndB.buttons.cancelBtn;
        } // end of CreateDialog
        // initialize variables of dialog
        this.InitVariables = function() {
            var oldPref = app.preferences.rulerUnits;
            app.preferences.rulerUnits = Units.PIXELS;
            // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
            try {
                var desc = app.getCustomOptions("3caa3434-cb67-11d1-bc43-0060b0a13dc4");
                descriptorToObject(sizeInfo, desc, strMessage);
            catch(e) {
                // it's ok if we don't have any options, continue with defaults
            // see if I am getting descriptor parameters
            var fromAction = !!app.playbackParameters.count;
            if( fromAction ){
                // reset sizeInfo to defaults
                SizeInfo = new SizeInfo();
                // set the playback options to sizeInfo
                descriptorToObject(sizeInfo, app.playbackParameters, strMessage);
            // make sure got parameters before this
            if (app.documents.length <= 0) // count of documents viewed
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert(strTextNeedFile); // only put up dialog if permitted
                app.preferences.rulerUnits = oldPref;
                return false; // if no docs, always return
            var w = app.activeDocument.width;
            var h = app.activeDocument.height;
            var l = true;
            if (sizeInfo.width.value == 0) {
                sizeInfo.width = w;
            else {
                w = sizeInfo.width;
            if (sizeInfo.height.value == 0) {
                sizeInfo.height = h;
            else {
                h = sizeInfo.height;
            app.preferences.rulerUnits = oldPref;
            if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
                var d = this.dlgMain;
                d.ip = this;
                d.pAndB.info.w.e.text = Number(w);
                d.pAndB.info.h.e.text = Number(h);
                d.pAndB.info.l.c.value = sizeInfo.limit;
            return true;
        // routine for running the dialog and it's interactions
        this.RunDialog = function () {
            var d = this.dlgMain;
            // in case hit cancel button, don't close
            d.pAndB.buttons.cancelBtn.onClick = function() {
                var dToCancel = FindDialog( this );
                dToCancel.close( false );
            // nothing for now
            d.onShow = function() {
            // do not allow anything except for numbers 0-9
            d.pAndB.info.w.e.addEventListener ('keydown', NumericEditKeyboardHandler);
            // do not allow anything except for numbers 0-9
            d.pAndB.info.h.e.addEventListener ('keydown', NumericEditKeyboardHandler);
            // hit OK, do resize
            d.pAndB.buttons.okBtn.onClick = function () {
                if (gInAlert == true) {
                    gInAlert = false;
                    return;
                var wText = d.pAndB.info.w.e.text;
                var hText = d.pAndB.info.h.e.text;
                var lValue = d.pAndB.info.l.c.value;
                var w = Number(wText);
                var h = Number(hText);
                sizeInfo.limit = Boolean(lValue);
                var inputErr = false;
                if ( isNaN( w ) || isNaN( h ) ) {
                    if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                        alert( strTextInvalidType );
                    if (isNaN( w )) {
                        sizeInfo.width = new UnitValue( 1, "px" );
                        d.pAndB.info.w.e.text = 1;
                    } else {
                        sizeInfo.height = new UnitValue( 1, "px" );
                        d.pAndB.info.h.e.text = 1;
                        return false;
                else if (w < 1 || w > gMaxResize || h < 1 || h > gMaxResize) {
                    if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                        gInAlert = true;
                        alert( strTextInvalidNum );
                if ( w < 1) {
                    inputErr = true;
                    sizeInfo.width = new UnitValue( 1, "px" );
                    d.pAndB.info.w.e.text = 1;
                if ( w > gMaxResize) {
                    inputErr = true;
                    sizeInfo.width = new UnitValue( gMaxResize, "px" );
                    d.pAndB.info.w.e.text = gMaxResize;
                if ( h < 1) {
                    inputErr = true;
                    sizeInfo.height = new UnitValue( 1, "px" );
                    d.pAndB.info.h.e.text = 1;
                if ( h > gMaxResize) {
                    inputErr = true;
                    sizeInfo.height = new UnitValue( gMaxResize, "px" );
                    d.pAndB.info.h.e.text = gMaxResize;
                if (inputErr == false)  {
                    sizeInfo.width = new UnitValue( w, "px" );
                    sizeInfo.height = new UnitValue( h, "px" );
                    if (ResizeTheImage(w, h)) { // the whole point
                        // error, input or output size too small
                    d.close(true);
                return;
            if (!this.InitVariables())
                return true; // handled it
            // give the hosting app the focus before showing the dialog
            app.bringToFront();
            this.dlgMain.center();
            return d.show();
    function CheckVersion() {
        var numberArray = version.split(".");
        if ( numberArray[0] < 9 ) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert( strMustUse );
            throw( strMustUse );
    function FindDialog( inItem ) {
        var w = inItem;
        while ( 'dialog' != w.type ) {
            if ( undefined == w.parent ) {
                w = null;
                break;
            w = w.parent;
        return w;
    // Function: objectToDescriptor
    // Usage: create an ActionDescriptor from a JavaScript Object
    // Input: JavaScript Object (o)
    //        object unique string (s)
    //        Pre process converter (f)
    // Return: ActionDescriptor
    // NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function objectToDescriptor (o, s, f) {
        if (undefined != f) {
            o = f(o);
        var d = new ActionDescriptor;
        var l = o.reflect.properties.length;
        d.putString( app.charIDToTypeID( 'Msge' ), s );
        for (var i = 0; i < l; i++ ) {
            var k = o.reflect.properties[i].toString();
            if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
                continue;
            var v = o[ k ];
            k = app.stringIDToTypeID(k);
            switch ( typeof(v) ) {
                case "boolean":
                    d.putBoolean(k, v);
                    break;
                case "string":
                    d.putString(k, v);
                    break;
                case "number":
                    d.putDouble(k, v);
                    break;
                default:
                    if ( v instanceof UnitValue ) {
                        var uc = new Object;
                        uc["px"] = charIDToTypeID("#Pxl"); // pixelsUnit
                        uc["%"] = charIDToTypeID("#Prc"); // unitPercent
                        d.putUnitDouble(k, uc[v.type], v.value);
                    } else {
                        throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
        return d;
    // Function: descriptorToObject
    // Usage: update a JavaScript Object from an ActionDescriptor
    // Input: JavaScript Object (o), current object to update (output)
    //        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
    //        object unique string (s)
    //        JavaScript Function (f), post process converter utility to convert
    // Return: Nothing, update is applied to passed in JavaScript Object (o)
    // NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function descriptorToObject (o, d, s, f) {
        var l = d.count;
        if (l) {
            var keyMessage = app.charIDToTypeID( 'Msge' );
            if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
        for (var i = 0; i < l; i++ ) {
            var k = d.getKey(i); // i + 1 ?
            var t = d.getType(k);
            strk = app.typeIDToStringID(k);
            switch (t) {
                case DescValueType.BOOLEANTYPE:
                    o[strk] = d.getBoolean(k);
                    break;
                case DescValueType.STRINGTYPE:
                    o[strk] = d.getString(k);
                    break;
                case DescValueType.DOUBLETYPE:
                    o[strk] = d.getDouble(k);
                    break;
                case DescValueType.UNITDOUBLE:
                    var uc = new Object;
                    uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
                    uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
                    uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
                    var ut = d.getUnitDoubleType(k);
                    var uv = d.getUnitDoubleValue(k);
                    o[strk] = new UnitValue( uv, uc[ut] );
                    break;
                case DescValueType.INTEGERTYPE:
                case DescValueType.ALIASTYPE:
                case DescValueType.CLASSTYPE:
                case DescValueType.ENUMERATEDTYPE:
                case DescValueType.LISTTYPE:
                case DescValueType.OBJECTTYPE:
                case DescValueType.RAWTYPE:
                case DescValueType.REFERENCETYPE:
                default:
                    throw( new Error("Unsupported type in descriptorToObject " + t ) );
        if (undefined != f) {
            o = f(o);
    // Function: SizeInfo
    // Usage: object for holding the dialog parameters
    // Input: <none>
    // Return: object holding the size info
    function SizeInfo() {
        this.height = new UnitValue( 0, "px" );
        this.width = new UnitValue( 0, "px" );
        this.limit = false;
    // Function: NumericEditKeyboardHandler
    // Usage: Do not allow anything except for numbers 0-9
    // Input: ScriptUI keydown event
    // Return: <nothing> key is rejected and beep is sounded if invalid
    function NumericEditKeyboardHandler (event) {
        try {
            var keyIsOK = KeyIsNumeric (event) ||
                          KeyIsDelete (event) ||
                          KeyIsLRArrow (event) ||
                          KeyIsTabEnterEscape (event);
            if (! keyIsOK) {
                //    Bad input: tell ScriptUI not to accept the keydown event
                event.preventDefault();
                /*    Notify user of invalid input: make sure NOT
                       to put up an alert dialog or do anything which
                             requires user interaction, because that
                             interferes with preventing the 'default'
                             action for the keydown event */
                app.beep();
        catch (e) {
            ; // alert ("Ack! bug in NumericEditKeyboardHandler: " + e);
    //    key identifier functions
    function KeyHasModifier (event) {
        return event.shiftKey || event.ctrlKey || event.altKey || event.metaKey;
    function KeyIsNumeric (event) {
        return  (event.keyName >= '0') && (event.keyName <= '9') && ! KeyHasModifier (event);
    function KeyIsDelete (event) {
        //    Shift-delete is ok
        return ((event.keyName == 'Backspace') || (event.keyName == 'Delete')) && ! (event.ctrlKey);
    function KeyIsLRArrow (event) {
        return ((event.keyName == 'Left') || (event.keyName == 'Right')) && ! (event.altKey || event.metaKey);
    function KeyIsTabEnterEscape (event) {
        return event.keyName == 'Tab' || event.keyName == 'Enter' || event.keyName == 'Escape';
    // End Fit Image.jsx

    With Photoshop CS5 you can use Image Processor Pro and this should do what you require...
    http://blogs.adobe.com/jnack/2011/05/new-image-processor-pro-script-for-cs5.html

  • Query on report display in table format on 7970G

    Hi,
    I know how to use the xml objects to display data on Cisco IP Phone using Ip Phone services. Now I want to generate report in table format on the phone.But in the xml objects available there is no option display data in table format .
    Should I have to use BTXML for that ?
    or do I have to diaplay it as an image ?
    I want to keep the first row as heading and the rest of rows I should scroll and view.
    Please let me know how to do that .Please also provide any sample documents or links.
    Thanks,
    Peter

    I've never really seen btxml in the wild.. it may be used in environments where people use Cisco phones but connected to SIP proxies, and not callmanagers. I don't think this is the place to discuss btxml.. I've never seen a single mention.. you might find people in Asterisk or similar forums though.
    Now, your screenshot shows a CiscoIPPhoneImage.. behind it is a simple PNG image, at a resolution of 298x168 and at 24bits (the shot looks like from an IP Communicator). Depending on the phone type, the resolution varies (IP Communicator and 797x phones have the same resolution but different bit depths, the 7965/54 have a lower res and 16bit, the 7921 supports a resolution of 176x140 at 16 bit).
    It's probably easier for you if you stick to the CiscoIPPhoneImageFile instead of the CiscoIPPhoneImage because PNG is a standard, whereas with CIP you either write your own library, or you create a GIF in your code then use Cisco's code to convert that to a CIP file.
    For your reference, here's the latest IP Phone services developer guide: http://www.cisco.com/en/US/docs/voice_ip_comm/cuipph/all_models/xsi/6_0/english/programming/guide/XSIbook.html. It contains detailed information about every CiscoIPPhone element, including samples.
    Creating a PNG file pro grammatically is a bit out of scope of this forum.. you need to figure that one out on your own but there are tons of other boards on the web that deal with that kind stuff. Once you have the PNG, creating the appropriate CiscoIPPhoneImageFile object will be a piece of cake. Once you have your PNG generation in order and still have trouble getting the object to the phone, it would be appropriate to continue here.

  • Is it possible to convert inDesign files to jpeg (for web) without fonts breaking up?

    We want to include some of our layouts as case studies on our website. The idea is that a preview image will, on rollover, produce a larger version of the image/layout as part of a case study - full size image dimensions from, say, 400px x 300px. However, using the export command (CS3) produces poor quality text even at 'Maximum' at 300ppi - to say nothing of the unacceptable file size! Site to be constructed in Flash. Any ideas?? Thanks. Alex

    My apologies if I sounded harsh. I didn't mean to be.
    I just wish the world would recognize that there is no such thing as "screen resolution" or "web resolution" in the sense that 72 ppi is an "appropriate" number. When you "save for the web" in Photoshop you are doing any number of things, including downsampling to reduce the number of pixels in the image, and adding compression to make the files smaller still so they will load faster, both of which can make your image useless for print purposes.
    That the default might be to save at 72 ppi is irrelevant -- it's just a convenient number. If you open your freshly saved image in Photoshop and go to the Image Size dialog, uncheck "resample image" and change the resolution, you'll see that the file size and pixel counts remain unchanged (along with the screen dispaly in Photoshop), because the image data is unchanged. All you have done is say "If you choose to print this image at 100% size, it should be x units wide and y units tall, and should have (whatever the the value you used) pixels per unit." You can freely scale this, if you wish, knowing the "effective" resolution varies in reverse proportion to the scaling factor.
    If you put this image on the web, it will have whatever pixels were saved, regardless of how large or small (in print) those pixels would be rendered.
    Peter

  • Ocfs for RHEL 2.4.21-37.EL

    [root@linuxb OCFSx8664]# rpm -Uvh ocfs-2.4.21-EL-smp-1.0.14-1.x86_64.rpm
    error: Failed dependencies:
    kernel-smp >= 2.4.21-27.EL is needed by ocfs-2.4.21-EL-smp-1.0.14-1
    Suggested resolutions:
    /var/spool/up2date/kernel-smp-2.4.21-37.EL.x86_64.rpm
    [root@linuxb OCFSx8664]# uname -r
    2.4.21-37.EL
    Where can I find the ocfs rpm for 2.4.21-37.EL

    You are installing package which is designed for SMP machines (2 or more processors) and it seems you don't have kernel-smp package installed
    execute
    rpm -q kernel-smpto check whether "kernel-smp" package is installed

  • Marquee tool - size converted to text layer?

    Firstly forgive me if this has been covered, the forum search just didn't work, even when searching for a something I could see!
    I'm wondering if there is a script that would do the following.
    With a rectangular marquee selection
    create a new layer
    stroke the marquee (1 pixel width)
    (then add text, positioned outside the marquee at the top right hand side - in a small font size - to list the width and height)
    w: <x>
    h: <x>
    The purpose is to create a visual reference image for various 2D layout tasks.
    Cheers,
    Mal

    You could give this a try:
    // add layer with stroke and text with measurements of selection;
    // 2011, use it at your own risk;
    #target photoshop
    try {
         var state = app.activeDocument.activeHistoryState;
         app.activeDocument.selection.deselect();
         if (app.activeDocument.activeHistoryState != state) {
              app.activeDocument.activeHistoryState = state
              var check = true;
         else {
              var check = false
    catch (e) {var check = false};
    // if document and selection;
    if (check == true) {
         var originalRulerUnits = preferences.rulerUnits;
         preferences.rulerUnits = Units.PIXELS;
         var originalResolution = app.activeDocument.resolution;
         var myDocument = app.activeDocument;
         myDocument.resizeImage (undefined, undefined, 72, ResampleMethod.NONE);
    // get selection measurements;
         var theBounds = myDocument.selection.bounds;
         var width = theBounds[2] - theBounds[0];
         var height = theBounds[3] - theBounds[1];
    // make layer;
         var theLayer = makeFillLayer(width+"x"+height, 0, 0, 0, 0);
         theLayer.fillOpacity = 0;
         addStroke();
    // create a text layer;
         var textLayer = myDocument.artLayers.add();
         textLayer.kind = LayerKind.TEXT;
         textLayer.name = width+" x "+height;
         var myTextRef = textLayer.textItem;
         myTextRef.size = 12 * originalResolution / 72;
         myTextRef.font = "Arial-BoldMT";
    //Set text colour in RGB values
         var newColor = new SolidColor();
         newColor.rgb.red = 0;
         newColor.rgb.green = 0;
         newColor.rgb.blue = 0;
         myTextRef.color = newColor;
         myTextRef.justification = Justification.RIGHT;
         myTextRef.kind = TextType.POINTTEXT;     
         myTextRef.position = [theBounds[2], theBounds[1] - 10];
         myTextRef.contents = width+" x "+height;
         textLayer.blendMode = BlendMode.NORMAL;
         textLayer.opacity = 100;
    // reset;
         preferences.rulerUnits = originalRulerUnits;
         myDocument.resizeImage (undefined, undefined, originalResolution, ResampleMethod.NONE);
    ////// the fill-layer-function //////
    function makeFillLayer (name, b, c, d, e) {
    var idMk = charIDToTypeID( "Mk  " );
        var desc6 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idcontentLayer = stringIDToTypeID( "contentLayer" );
            ref2.putClass( idcontentLayer );
        desc6.putReference( idnull, ref2 );
        var idUsng = charIDToTypeID( "Usng" );
            var desc7 = new ActionDescriptor();
            var idNm = charIDToTypeID( "Nm  " );
            desc7.putString( idNm, name );
            var idType = charIDToTypeID( "Type" );
                var desc8 = new ActionDescriptor();
                var idClr = charIDToTypeID( "Clr " );
                    var desc9 = new ActionDescriptor();
                    var idCyn = charIDToTypeID( "Cyn " );
                    desc9.putDouble( idCyn, b );
                    var idMgnt = charIDToTypeID( "Mgnt" );
                    desc9.putDouble( idMgnt, c );
                    var idYlw = charIDToTypeID( "Ylw " );
                    desc9.putDouble( idYlw, d );
                    var idBlck = charIDToTypeID( "Blck" );
                    desc9.putDouble( idBlck, e );
                var idCMYC = charIDToTypeID( "CMYC" );
                desc8.putObject( idClr, idCMYC, desc9 );
            var idsolidColorLayer = stringIDToTypeID( "solidColorLayer" );
            desc7.putObject( idType, idsolidColorLayer, desc8 );
        var idcontentLayer = stringIDToTypeID( "contentLayer" );
        desc6.putObject( idUsng, idcontentLayer, desc7 );
    executeAction( idMk, desc6, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// stroke //////
    function addStroke () {
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idLefx = charIDToTypeID( "Lefx" );
            ref2.putProperty( idPrpr, idLefx );
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref2.putEnumerated( idLyr, idOrdn, idTrgt );
        desc5.putReference( idnull, ref2 );
        var idT = charIDToTypeID( "T   " );
            var desc6 = new ActionDescriptor();
            var idScl = charIDToTypeID( "Scl " );
            var idPrc = charIDToTypeID( "#Prc" );
            desc6.putUnitDouble( idScl, idPrc, 416.666667 );
            var idFrFX = charIDToTypeID( "FrFX" );
                var desc7 = new ActionDescriptor();
                var idenab = charIDToTypeID( "enab" );
                desc7.putBoolean( idenab, true );
                var idStyl = charIDToTypeID( "Styl" );
                var idFStl = charIDToTypeID( "FStl" );
                var idInsF = charIDToTypeID( "InsF" );
                desc7.putEnumerated( idStyl, idFStl, idInsF );
                var idPntT = charIDToTypeID( "PntT" );
                var idFrFl = charIDToTypeID( "FrFl" );
                var idSClr = charIDToTypeID( "SClr" );
                desc7.putEnumerated( idPntT, idFrFl, idSClr );
                var idMd = charIDToTypeID( "Md  " );
                var idBlnM = charIDToTypeID( "BlnM" );
                var idNrml = charIDToTypeID( "Nrml" );
                desc7.putEnumerated( idMd, idBlnM, idNrml );
                var idOpct = charIDToTypeID( "Opct" );
                var idPrc = charIDToTypeID( "#Prc" );
                desc7.putUnitDouble( idOpct, idPrc, 100.000000 );
                var idSz = charIDToTypeID( "Sz  " );
                var idPxl = charIDToTypeID( "#Pxl" );
                desc7.putUnitDouble( idSz, idPxl, 1.000000 );
                var idClr = charIDToTypeID( "Clr " );
                    var desc8 = new ActionDescriptor();
                    var idRd = charIDToTypeID( "Rd  " );
                    desc8.putDouble( idRd, 0.000000 );
                    var idGrn = charIDToTypeID( "Grn " );
                    desc8.putDouble( idGrn, 0.000000 );
                    var idBl = charIDToTypeID( "Bl  " );
                    desc8.putDouble( idBl, 0.000000 );
                var idRGBC = charIDToTypeID( "RGBC" );
                desc7.putObject( idClr, idRGBC, desc8 );
            var idFrFX = charIDToTypeID( "FrFX" );
            desc6.putObject( idFrFX, idFrFX, desc7 );
        var idLefx = charIDToTypeID( "Lefx" );
        desc5.putObject( idT, idLefx, desc6 );
    executeAction( idsetd, desc5, DialogModes.NO );

  • Create images with dynamic width from 3 images each (left/center/right-part)

    Hello,
    i want to employ a script to create images of dynamic width for me. The whole process shall base on different sized sets of images, which contain a left-image, a right-image and a center-image. The desired width for the different cases shall be reached by duplicating the center-image between the two outer images and placing those images next to each other until the image extends to desired width.
    The layers importet into Photoshop shall be importet as smart-layers (which i already solved).
    Has anyone done something similar already and could give me some useful hints on that issue ?
    I have come up to this until now:
    #target Photoshop
    // =========================== Opens a new document and asks for dimensions ============================
    var myLayerset = File.openDialog ("Select the set of images you want to use!", "*.png",true)
    var myName = prompt("How do you want to call the document?"); // askes for document name
    var width =  prompt("Please insert width for the output here!", ""); // askes for desired width
    var height = prompt("Please insert height for the output here!", ""); //askes for desired height
    var docName = myName +".psd"
    var idMk = charIDToTypeID( "Mk  " );
        var desc3 = new ActionDescriptor();
        var idNw = charIDToTypeID( "Nw  " );
            var desc4 = new ActionDescriptor();
            var idNm = charIDToTypeID( "Nm  " );
            desc4.putString( idNm, """Wunschname""" );
            var idMd = charIDToTypeID( "Md  " );
            var idRGBM = charIDToTypeID( "RGBM" );
            desc4.putClass( idMd, idRGBM );
            var idWdth = charIDToTypeID( "Wdth" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc4.putUnitDouble( idWdth, idRlt, width );
            var idHght = charIDToTypeID( "Hght" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc4.putUnitDouble( idHght, idRlt, height );
            var idRslt = charIDToTypeID( "Rslt" );
            var idRsl = charIDToTypeID( "#Rsl" );
            desc4.putUnitDouble( idRslt, idRsl, 72.000000 );
            var idpixelScaleFactor = stringIDToTypeID( "pixelScaleFactor" );
            desc4.putDouble( idpixelScaleFactor, 1.000000 );
            var idFl = charIDToTypeID( "Fl  " );
            var idFl = charIDToTypeID( "Fl  " );
            var idTrns = charIDToTypeID( "Trns" );
            desc4.putEnumerated( idFl, idFl, idTrns );
            var idDpth = charIDToTypeID( "Dpth" );
            desc4.putInteger( idDpth, 8 );
            var idprofile = stringIDToTypeID( "profile" );
            desc4.putString( idprofile, """sRGB IEC61966-2.1""" );
        var idDcmn = charIDToTypeID( "Dcmn" );
        desc3.putObject( idNw, idDcmn, desc4 );
    executeAction( idMk, desc3, DialogModes.NO );
    //==============================================save document================================================
    var idsave = charIDToTypeID( "save" );
        var desc4 = new ActionDescriptor();
        var idAs = charIDToTypeID( "As  " );
            var desc5 = new ActionDescriptor();
            var idmaximizeCompatibility = stringIDToTypeID( "maximizeCompatibility" );
            desc5.putBoolean( idmaximizeCompatibility, true );
        var idPhtthree = charIDToTypeID( "Pht3" );
        desc4.putObject( idAs, idPhtthree, desc5 );
        var idIn = charIDToTypeID( "In  " );
        desc4.putPath( idIn, new File( "C:\\Users\\ target folder goes here" + docName ) );
        var idDocI = charIDToTypeID( "DocI" );
        desc4.putInteger( idDocI, 308 );
        var idsaveStage = stringIDToTypeID( "saveStage" );
        var idsaveStageType = stringIDToTypeID( "saveStageType" );
        var idsaveSucceeded = stringIDToTypeID( "saveSucceeded" );
        desc4.putEnumerated( idsaveStage, idsaveStageType, idsaveSucceeded );
    executeAction( idsave, desc4, DialogModes.NO );
    //========================================================================================================
    for (var i = 0; i < myLayerset.length; i++) {
    if (myLayerset[i] instanceof File && myLayerset[i].hidden == false) {
    // ======================================================= opens selected images as smart objects====================
    var idOpn = charIDToTypeID( "Opn " );
        var desc1 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
       desc1.putPath( idnull, myLayerset[i]);
        var idsmartObject = stringIDToTypeID( "smartObject" );
        desc1.putBoolean( idsmartObject, true );
    executeAction( idOpn, desc1, DialogModes.NO );
    //===================================duplicates opened layer into created document========================================
    var idDplc = charIDToTypeID( "Dplc" );
        var desc144 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref135 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref135.putEnumerated( idLyr, idOrdn, idTrgt );
        desc144.putReference( idnull, ref135 );
        var idT = charIDToTypeID( "T   " );
            var ref136 = new ActionReference();
            var idDcmn = charIDToTypeID( "Dcmn" );
            ref136.putName( idDcmn, docName); 
        desc144.putReference( idT, ref136 );
        var idVrsn = charIDToTypeID( "Vrsn" );
        desc144.putInteger( idVrsn, 5 );
    executeAction( idDplc, desc144, DialogModes.NO );
    // ======================================================= close tab without saving ==========
    var idCls = charIDToTypeID( "Cls " );
        var desc156 = new ActionDescriptor();
        var idSvng = charIDToTypeID( "Svng" );
        var idYsN = charIDToTypeID( "YsN " );
        var idN = charIDToTypeID( "N   " );
        desc156.putEnumerated( idSvng, idYsN, idN );
    executeAction( idCls, desc156, DialogModes.NO );

    I adapted a Script somewhat, so you may give this a test.
    But it uses the open file so you would have to adapt it further.
    // arranges the selected jpg, tif, psd in line;
    // gutters may be irregular due to rounding effects;
    // thanks to michael l hale and muppet mark;
    // for mac and CS6;
    // 2014, use it at your own risk;
    #target photoshop
    if (app.documents.length == 0) {
              var myDocument = app.documents.add(UnitValue (300, "mm"), UnitValue (50, "mm"), 300, "new", NewDocumentMode.RGB, DocumentFill.TRANSPARENT)
    else {myDocument = app.activeDocument};
    // set to pixels;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var theArray = [0, 0, myDocument.width, myDocument.height];
    // select files;
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog ("please select files", '*.jpg;*.tif;*.pdf;*.psd', true)}
    else {var theFiles = File.openDialog ("please select exactly three files", getFiles, true)};
    // do the arrangement
    if (theFiles) {placeInLines (myDocument, theFiles, theArray)}
    app.preferences.rulerUnits = originalRulerUnits;
    ////// function to place images in lines //////
    function placeInLines (myDocument, theFiles, theArray) {
    theFiles.sort();
    // fit on screen;
    var idslct = charIDToTypeID( "slct" );
    var desc64 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref44 = new ActionReference();
    var idMn = charIDToTypeID( "Mn  " );
    var idMnIt = charIDToTypeID( "MnIt" );
    var idFtOn = charIDToTypeID( "FtOn" );
    ref44.putEnumerated( idMn, idMnIt, idFtOn );
    desc64.putReference( idnull, ref44 );
    executeAction( idslct, desc64, DialogModes.NO );
    // change pref;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    setToAccelerated();
    app.togglePalettes();
    var check = turnOffRescale ();
    // create the arrangement;
    if (theFiles.length > 0 && theFiles.length == 3) {
    myDocument.activeLayer = myDocument.layers[0];
    // create masked group;
    var theGroup = myDocument.layerSets.add();
    theGroup.name = "arrangement";
    // determine the array’s values;
    var areaWidth = theArray[2] - theArray[0];
    var areaHeight = theArray[3] - theArray[1];
    var theDocResolution = myDocument.resolution;
    var areaRelation = areaHeight / areaWidth;
    // center of placed non-pdf images;
    var centerX = Number(myDocument.width / 2);
    var centerY = Number(myDocument.height / 2);
    // suppress dialogs;
    var theDialogSettings = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    var pdfSinglePages = new Array;
    var nonPDFs = new Array;
    var theDimPDFs = new Array;
    var theLength = 0;
    // collect the files’ measurements;
    var theDimensions = new Array;
    var theLengths = new Array;
    // array to collect both files and placed pdf-pages;
    var theseFiles = new Array;
    var theLength = 0;
    // collect the files’ measurements;
    for (var o = 0; o < theFiles.length; o++) {
        var thisFile = theFiles[o];
              theseFiles.push(thisFile);
              var theDim = getDimensions(thisFile);
              theDimensions.push(theDim);
              theRelativeWidth = 100 / theDim[1] * theDim[0];
              theLength = theLength + theRelativeWidth;
    // reset dialogmodes;
    app.displayDialogs = DialogModes.ERROR;
    // if three files;
    if (theseFiles.length == 3) {
    // create the layers;
    var theNumber = 0;
    var theAdded = 0;
    var y = areaHeight / 2;
    // add placed image’s width;
    var thisLineWidth = 0 + theAdded;
    var theLastFactor = Number (Number(myDocument.height) / theDimensions[2][1] * theDimensions[2][2] / theDocResolution * 100);
    var theLastWidth = Math.round(theDimensions[2][0] * theLastFactor / 100 * theDocResolution / theDimensions[2][2]);
    // place the files;
    for (var x = 0; x < 3; x++) {
    var theNumber = x;
    var thisFile = theseFiles[theNumber];
    var theFactor = Number (Number(myDocument.height) / theDimensions[theNumber][1] * theDimensions[theNumber][2] / theDocResolution * 100);
    var theNewWidth = Math.round(theDimensions[theNumber][0] * theFactor / 100 * theDocResolution / theDimensions[theNumber][2]);
    var offsetX = theNewWidth / 2 + thisLineWidth - centerX + theArray[0];
    var offsetY = y - centerY + theArray[1];
    var theLayer = placeScaleFile (thisFile, offsetX, offsetY, theFactor, theFactor);
    myDocument.activeLayer.move(theGroup, ElementPlacement.PLACEATBEGINNING);
    thisLineWidth = thisLineWidth + theNewWidth;
    // duplicate the middle one;
    if (theNumber == 1) {
              while (thisLineWidth < myDocument.width - theLastWidth) {
                        theLayer = duplicateAndOffset (theLayer, theNewWidth, 0);
                        thisLineWidth = thisLineWidth + theNewWidth;
    // reset;
    app.togglePalettes();
    turnOnRescale (check);
    app.preferences.rulerUnits = originalRulerUnits;
    ////// playback to accelerated //////
    function setToAccelerated () {
              var idsetd = charIDToTypeID( "setd" );
              var desc1 = new ActionDescriptor();
              var idnull = charIDToTypeID( "null" );
                        var ref1 = new ActionReference();
                        var idPrpr = charIDToTypeID( "Prpr" );
                        var idPbkO = charIDToTypeID( "PbkO" );
                        ref1.putProperty( idPrpr, idPbkO );
                        var idcapp = charIDToTypeID( "capp" );
                        var idOrdn = charIDToTypeID( "Ordn" );
                        var idTrgt = charIDToTypeID( "Trgt" );
                        ref1.putEnumerated( idcapp, idOrdn, idTrgt );
              desc1.putReference( idnull, ref1 );
              var idT = charIDToTypeID( "T   " );
                        var desc2 = new ActionDescriptor();
                        var idperformance = stringIDToTypeID( "performance" );
                        var idperformance = stringIDToTypeID( "performance" );
                        var idaccelerated = stringIDToTypeID( "accelerated" );
                        desc2.putEnumerated( idperformance, idperformance, idaccelerated );
              var idPbkO = charIDToTypeID( "PbkO" );
              desc1.putObject( idT, idPbkO, desc2 );
              executeAction( idsetd, desc1, DialogModes.NO );
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
        if (theFile.name.match(/\.(jpg|tif|psd|pdf|)$/i)) {
            return true
    ////// place //////
    function placeScaleFile (file, xOffset, yOffset, theScale) {
    // =======================================================
    var idPlc = charIDToTypeID( "Plc " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc5.putPath( idnull, new File( file ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc5.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc6 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc5.putObject( idOfst, idOfst, desc6 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idWdth, idPrc, theScale );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idHght, idPrc, theScale );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc5.putBoolean( idLnkd, true );
    executeAction( idPlc, desc5, DialogModes.NO );
    return myDocument.activeLayer;
    ////// open pdf //////
    function openPDF (theImage, x) {
    // define pdfopenoptions;
    var pdfOpenOpts = new PDFOpenOptions;
    pdfOpenOpts.antiAlias = true;
    pdfOpenOpts.bitsPerChannel = BitsPerChannelType.EIGHT;
    pdfOpenOpts.cropPage = CropToType.TRIMBOX;
    pdfOpenOpts.mode = OpenDocumentMode.CMYK;
    pdfOpenOpts.resolution = 10;
    pdfOpenOpts.suppressWarnings = true;
    pdfOpenOpts.usePageNumber  = true;
    // suppress dialogs;
    var theDialogSettings = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    pdfOpenOpts.page = x;
    var thePdf = app.open(theImage, pdfOpenOpts);
    thePdf.close(SaveOptions.DONOTSAVECHANGES);
    // reset dialogmodes;
    app.displayDialogs = theDialogSettings;
    ////// turn off preference to scale placed image //////
    function turnOffRescale () {
    // determine if the resize prefernce is on;
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var appDesc = executeActionGet(ref);
    var prefDesc = appDesc.getObjectValue(charIDToTypeID( "GnrP" ));
    var theResizePref = prefDesc.getBoolean(stringIDToTypeID( "resizePastePlace" ));
    // turn off resize image during place;
    if (theResizePref == true);{
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc12 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref4 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idGnrP = charIDToTypeID( "GnrP" );
            ref4.putProperty( idPrpr, idGnrP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref4.putEnumerated( idcapp, idOrdn, idTrgt );
        desc12.putReference( idnull, ref4 );
        var idT = charIDToTypeID( "T   " );
            var desc13 = new ActionDescriptor();
            var idresizePastePlace = stringIDToTypeID( "resizePastePlace" );
            desc13.putBoolean( idresizePastePlace, false );
        var idGnrP = charIDToTypeID( "GnrP" );
        desc12.putObject( idT, idGnrP, desc13 );
    executeAction( idsetd, desc12, DialogModes.NO );
    return theResizePref
    ////// turn on preference to scale plced image //////
    function turnOnRescale (check) {
    if (check == true) {
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc14 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idGnrP = charIDToTypeID( "GnrP" );
            ref5.putProperty( idPrpr, idGnrP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idcapp, idOrdn, idTrgt );
        desc14.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc15 = new ActionDescriptor();
            var idresizePastePlace = stringIDToTypeID( "resizePastePlace" );
            desc15.putBoolean( idresizePastePlace, true );
        var idGnrP = charIDToTypeID( "GnrP" );
        desc14.putObject( idT, idGnrP, desc15 );
    executeAction( idsetd, desc14, DialogModes.NO );
    ////// convert to so if not one aready //////
    function duplicateAndOffset (theLayer, theXOffset, theYOffset) {
    app.activeDocument.activeLayer = theLayer;
    // =======================================================
    var idcopy = charIDToTypeID( "copy" );
        var desc9 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idLyr, idOrdn, idTrgt );
        desc9.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc10 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idRlt = charIDToTypeID( "#Pxl" );
            desc10.putUnitDouble( idHrzn, idRlt, theXOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idRlt = charIDToTypeID( "#Pxl" );
            desc10.putUnitDouble( idVrtc, idRlt, theYOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc9.putObject( idT, idOfst, desc10 );
    executeAction( idcopy, desc9, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// load pdf as smart object //////
    function transformLayer (layer, percentage, xOffset, yOffset) {
    app.activeDocument.activeLayer = layer;
    // =======================================================
    var idTrnf = charIDToTypeID( "Trnf" );
        var desc4 = new ActionDescriptor();
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc4.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc5 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc5.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc5.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc4.putObject( idOfst, idOfst, desc5 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc4.putUnitDouble( idWdth, idPrc, percentage );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc4.putUnitDouble( idHght, idPrc, percentage );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc4.putBoolean( idLnkd, true );
        var idAntA = charIDToTypeID( "AntA" );
        desc4.putBoolean( idAntA, true );
    executeAction( idTrnf, desc4, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// function to get file’s dimensions, thanks to michael l hale //////
    function getDimensions( file ){
    function divideString (theString) {
              theString = String(theString);
        var a = Number(theString.slice(0, theString.indexOf("\/")));
        var b = Number(theString.slice(theString.indexOf("\/") + 1));
        return (a / b)
    // from a script by michael l hale;
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject
                                                                ('lib:AdobeXMPScript');
              }catch (e){
                   alert( ErrStrs.XMPLIB );
                   return false;
         return true;
    function unloadXMPLibrary(){
       if( ExternalObject.AdobeXMPScript ) {
          try{
             ExternalObject.AdobeXMPScript.unload();
             ExternalObject.AdobeXMPScript = undefined;
          }catch (e){
             alert( ErrStrs.XMPLIB );
    ////// based on a script by muppet mark //////
    function dimensionsShellScript (file) {
              try {
    // getMetaDataMDLS;
    if (File(file) instanceof File && File(file).exists) {
              var shellString = "/usr/bin/mdls ";
              shellString += File(file).fsName;
    //          shellString += File(file).fullName;
              shellString += ' > ~/Documents/StdOut2.txt';
              app.system(shellString);
    // read the file;
    if (File('~/Documents/StdOut2.txt').exists == true) {
        var file = File('~/Documents/StdOut2.txt');
        file.open("r");
        file.encoding= 'BINARY';
        var theText = new String;
        for (var m = 0; m < file.length; m ++) {
                        theText = theText.concat(file.readch());
              file.close();
              theText = theText.split("\n");
    // get the dimensions;
              var dim = new Array;
              for (var m = 0; m < theText.length; m++) {
                        var theLine = theText[m];
                        if (theLine.indexOf("kMDItemPixelWidth") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemPixelHeight") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemResolutionWidthDPI") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemResolutionHeightDPI") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
    // remove file and hand back;
              File('~/Documents/StdOut2.txt').remove();
    catch (e) {
              if (File('~/Documents/StdOut2.txt').exists == true) {File('~/Documents/StdOut2.txt').remove()};
              return dim
              try{
                        loadXMPLibrary();
                        var xmpf = new XMPFile( file.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ );
                        var xmp = xmpf.getXMP();
                        xmpf.closeFile();
                        var resolutionUnit = xmp.getProperty( XMPConst.NS_TIFF, 'ResolutionUnit', XMPConst.STRING);
                        var resFactor = 1;
                        if (resolutionUnit == 2) {
                                  var resFactor = 1;
                        if (resolutionUnit == 3) {
                                  var resFactor = 2.54;
                        var dim = [xmp.getProperty( XMPConst.NS_EXIF, 'PixelXDimension', XMPConst.STRING),
                        xmp.getProperty( XMPConst.NS_EXIF, 'PixelYDimension', XMPConst.STRING),
                        divideString (xmp.getProperty( XMPConst.NS_TIFF, 'XResolution', XMPConst.STRING)) * resFactor,
                        divideString (xmp.getProperty( XMPConst.NS_TIFF, 'YResolution', XMPConst.STRING)) * resFactor];
                        unloadXMPLibrary();
                        if(dim[0]=="undefined" || dim[1]=="undefined"){
                var dim = undefined;
                var res = undefined;
                var bt = new BridgeTalk;
                bt.target = "bridge";
                var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+file.toSource()+");");
                bt.body = myScript;
                bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
                bt.send(10);
                        function myReturnValue(str){
                                  res = str;
                                  dim = str.split(',');
                        function psRemote(file){
                                  var t= new Thumbnail(file);
                                  return t.core.quickMetadata.width+','+t.core.quickMetadata.height;
        }catch(e){unloadXMPLibrary()};
              if (String(dim[2]).indexOf("\/") != -1) {
                        var a = divideString(dim[2]);
                        var b = divideString(dim[3]);
                        dim = [dim[0], dim[1], a, b]
    // if dimensions are missing as might be the case with some bitmap tiffs for example try a shell-script;
              if (dim[0] == undefined || dim[1] == undefined) {
                        var array = dimensionsShellScript(file);
                        dim = array;
    // if shell-string failed open doc to get measurements;
              if (dim[0] == undefined || dim[1] == undefined) {
                        var thisDoc = app.open (File(file));
    // close ai without saving;
                        if (file.name.slice(-3).match(/\.(ai)$/i)) {
                                  thisDoc.trim(TrimType.TRANSPARENT);
                                  var dim = [thisDoc.width, thisDoc.height, thisDoc.resolution, thisDoc.resolution];
                                  thisDoc.close(SaveOptions.DONOTSAVECHANGES)
                        else {
                                  var dim = [thisDoc.width, thisDoc.height, thisDoc.resolution, thisDoc.resolution];
                                  thisDoc.close(SaveOptions.PROMPTTOSAVECHANGES)
    return dim;

  • Exporting from iPhoto - 8 x 10 prints - image inconsistencies

    My other half and I are relatively new to digital photography - but we're in something of a bind.
    We looking for several dozen 8 x 10 prints (for an exhibition) from images stored in our iPhoto library. We'll be supplying them on disc to a photography bureau for printing. We did some sample 8 x 10s on our own printer, and were dismayed by how the image resolution varies from image to image; some look more pixellated than others. I'm wondering whether this is because of something we've done in iPhoto, since (as I understand it) JPEG resolution diminishes if photos are edited in any way. To my knowledge, we haven't edited the images; they've just sat in the library - although we've copied and exported many of them.
    It's making me wonder whether iPhoto is the most suitable application for this kind of work, since it holds everything in the space-friendly JPEG format rather than their original chunky size.
    I'd be really grateful for answers to any or all of the following:
    1. What activities in iPhoto might have caused the quality of our original JPEGs to have deteriorated, and is there any way of checking this? And can the photos in question be "retouched" in any way? I have access to Photoshop 7, if that's of any help.
    2. What format would be the best for exporting the images for the photography bureau (TIFF, presumably?) and are there any tricks or traps to be aware of? I've exported from iPhoto dozens of times, but never in such quantity.
    3. In the future, if we want to make larger prints from our digital images, should we be looking to download in RAW format rather than JPEG (the only two formats our camera, a Canon EOS10D, seems to support) - and use an application other than iPhoto? Or would upgrading to iPhoto 6 help us in any way.
    Many thanks.

    Hi, David.
    1. What activities in iPhoto might have caused the quality of our original JPEGs to have deteriorated, and is there any way of checking this? And can the photos in question be "retouched" in any way? I have access to Photoshop 7, if that's of any help.
    Cropping, perhaps more than anything else, because it reduces the actual number of pixels in the image. Any sort of editing or manipulation followed by saving, when the file is in JPEG format. Every time you save any new change to a JPEG image, the image is re-compressed and further degraded.
    If you have your camera save your images as JPEGs, re-save them as uncompressed TIFFS or PSDs as soon as you get them onto your Mac. Do all your editing and manipulating in TIFF, PSD, or some other uncompressed format. You will still have the original JPEG compression artifacts in them, but at least you won't be adding a new layer of artifacts and blurring with every change you save. For best results, shoot all your important images in RAW format instead of JPEG, so they are never compressed at all.
    2. What format would be the best for exporting the images for the photography bureau...?
    Ask the bureau what format they recommend or prefer. If they can handle .psd files, that format would maximize your own control.
    If you have Photoshop 7, there may be no good reason for you to use iPhoto at all.

  • Please correct this script

    Hello
    In this script i cant change resulution it will change default size 72 dpi when i chnage 300 dpi it cant work
    also it was not work in cs5 bridge app
    please help me
    #target bridge  
    if( BridgeTalk.appName == "bridge" ) { 
    var menu = MenuElement.find ('myBridgeMenu');
    if (menu == null){
    var newMenu = MenuElement.create( "menu", "Bridge", "before tools/ps", "myBridgeMenu" );
    WebPics = MenuElement.create( "command", "Bridge Processor", "at the end of myBridgeMenu",  "BridgeProcessor" );
    WebPics.onSelect = function () {
       WebPictures();
    function WebPictures(){
    if(app.version.match(/^\d+/) < 2){
        alert("You need CS3 or better to use this script!");
        return;
    if($.os.match(/windows/gi)){
    var TemplateFolder = new Folder(Folder.userData.absoluteURI + "/Adobe/XMP/Metadata Templates");
    var Templates = TemplateFolder.getFiles("*.xmp");
    var TemplateNames =[];
    for(var d in Templates){TemplateNames.push(decodeURI(Templates[d].name.toString().replace(/\.xmp$/i,'' )));}
    var PrefsFile = File(Folder.userData +"/BridgePrefs.dat");
    var Prefs = {};
    if(!PrefsFile.exists){
        Prefs.folder = decodeURI(app.document.presentationPath);
        Prefs.Width = 900;
        Prefs.Height = 800; 
        Prefs.quality = 79;
        Prefs.type = 0;
        if($.os.match(/windows/gi)){
        Prefs.template = 0;
        }else{
    PrefsFile.open('r');
    Prefs = eval(PrefsFile.read());
    PrefsFile.close();
    if($.os.match(/windows/gi)){
    if(Prefs.template == null) Prefs.template = 0;
    if(Prefs.template == undefined) Prefs.template = 0;
    var win = new Window('dialog','Bridge Processor');
    g = win.graphics;
    var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
    g.backgroundColor = myBrush;
    win.alignChildren="row";
    win.g10 = win.add('group');
    win.g10.orientation = "row";
    win.title = win.g10.add('statictext',undefined,"Bridge Processor");
    win.title.helpTip="Written by Paul Riggott";
    win.title.alignment="bottom";
    var g = win.title.graphics;
    g.font = ScriptUI.newFont("Georgia","BOLDITALIC",26);
    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
    win.p1.alignChildren="fill";
    win.p2= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g3 =win.p2.add('group');
    win.g3.orientation = "row";
    win.g3.alignment="left";
    win.g3.rb1 = win.g3.add('radiobutton',undefined,'Use selected Files');
    win.g3.rb2 = win.g3.add('radiobutton',undefined,'Use files of Type');
    var FileExtensions = "DNG,PSD,PDD,JPEG,JPG,JPE,GIF,BMP,RLE,DIB,TIF,CRW,NEF,RAF,ORF,CIN,DPX,EPS,PS,FLM,PSB,EXR, PCX,PDP," +
    "PCD,RAW,PICT,PCT,PIC,PXR,PNG,TGA,VDA,ICB,VST,TIF,TIFF,WBM,DNG,SCT,PBM,CRW,CR2,DC2,DCR,NEF ,MOS,MRW,X3F,MOV";
    FileExtensions= FileExtensions.toUpperCase();
    FileExtensions = FileExtensions.split(",");
    FileExtensions= ReturnUniqueSortedList(FileExtensions);
    win.g3.dd1 = win.g3.add('dropdownlist',undefined,FileExtensions);
    try{
    win.g3.dd1.selection= Number(Prefs.type);
    }catch(e){win.g3.dd1.selection=0;};
    win.g3.rb1.value=true;
    win.g3.cb1 = win.g3.add('checkbox',undefined,'Use Subfolders');
    win.g3.dd1.enabled=false;
    win.g3.cb1.value=false;
    win.g3.cb1.enabled=false;
    win.g3.rb2.onClick = function(){
    win.g3.dd1.enabled=true;
    win.g3.cb1.value=false;
    win.g3.cb1.enabled=true;
    win.g3.rb1.onClick = function(){
    win.g3.dd1.enabled=false;
    win.g3.cb1.value=false;
    win.g3.cb1.enabled=false;
    win.p3= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g10a =win.p3.add('group');
    win.g10a.alignment="left";
    win.g10a.cb1 = win.g10a.add('checkbox',undefined,'Save to Same Location');
    win.g11 =win.p3.add('group');
    win.g11.spacing=10;
    win.g11.orientation = 'row';
    win.g11.alignment="left";
    win.g11.st1 = win.g11.add('statictext',undefined,'Output Folder :-');
    win.g11.st1.preferredSize=[200,20];
    win.g11.bu1 = win.g11.add('button',undefined,'Browse');
    win.g11.st1.alignment="left";
    win.g11a =win.p3.add('group');
    win.g11a.et1 = win.g11a.add('edittext');
    win.g11a.et1.preferredSize=[400,20];
    win.g11a.et1.enabled=false;
    if(Folder(Prefs.folder.exists)){
        win.g11a.et1.text =  decodeURI(Folder(Prefs.folder).fsName);
    if(Folder(Prefs.folder.exists)) outputFolder = Folder(Prefs.folder);
    win.g11.bu1.onClick=function(){  
         outputFolder = Folder.selectDialog("Please select the output folder",Prefs.folder);   
         if(outputFolder !=null) win.g11a.et1.text =  decodeURI(outputFolder.fsName);
    win.p4= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g12 =win.p4.add('group');
    win.g12.cb1 = win.g12.add('checkbox',undefined,'Use Fullsize JPEG');
    win.g12.cb1.helpTip="This can take a lot more time!";
    if($.os.match(/windows/gi)){
    win.g12.cb2 = win.g12.add('checkbox',undefined,'Set Resolution');
    win.g12.et1 = win.g12.add('edittext',undefined,'72');
    win.g12.et1.preferredSize=[100,20];
    win.g12.et1.onChanging = function() {
      if (this.text.match(/[^\d]/)) {
        this.text = this.text.replace(/[^\d]/g, '');
    win.g12.orientation = 'row';
    win.g12.alignment="left";
    win.g12.spacing=20;
    win.g12.cb2.onClick=function(){
        if(win.g12.cb2.value){
            win.g12.et1.enabled=true;
            }else{
                win.g12.et1.enabled=false;
    win.g12.cb2.onClick();
    win.g14 =win.p4.add('group');
    win.g14.spacing=0;
    win.g14.orientation = 'row';
    win.g14.alignment="left";
    win.g14.cb1 = win.g14.add('checkbox',undefined,"Fit Image");
    win.g14.cb1.preferredSize=[80,20];
    win.g14.st0 = win.g14.add('statictext',undefined,"W: ");
    win.g14.et1 = win.g14.add('edittext',undefined,'900');
    win.g14.et1.preferredSize=[50,20];
    win.g14.et1.enabled=false;
    win.g14.et1.text = Number(Prefs.Width);
    win.g14.st1 = win.g14.add('statictext',undefined,"px");
    win.g14.st1.preferredSize=[30,20]
    win.g14.st0a = win.g14.add('statictext',undefined,"H: ");
    win.g14.et1a = win.g14.add('edittext',undefined,'900');
    win.g14.et1a.preferredSize=[50,20];
    win.g14.et1a.enabled=false;
    win.g14.et1a.text = Number(Prefs.Height);
    win.g14.st1a = win.g14.add('statictext',undefined,"px");
    win.g14.st1a.preferredSize=[30,20]
    win.g14.st3 = win.g14.add('statictext',undefined,"Quality");
    win.g14.st3.preferredSize=[60,20];
    win.g14.dd1 = win.g14.add('dropdownlist');
    for(var a =1;a<101;a++){
        win.g14.dd1.add("item", a);
    win.g14.dd1.selection=Number(Prefs.quality);
    win.g14.et1.onChanging = function() {
      if (this.text.match(/[^\d]/)) {
        this.text = this.text.replace(/[^\d]/g, '');
    win.g14.et1a.onChanging = function() {
      if (this.text.match(/[^\d]/)) {
        this.text = this.text.replace(/[^\d]/g, '');
    if($.os.match(/windows/gi)){
    win.g18 =win.p4.add('group');
    win.g18.spacing=25;
    win.g18.orientation = 'row';
    win.g18.alignment="left";
    win.g18.cb1 = win.g18.add('checkbox',undefined,'Use Template');
    win.g18.dd1 = win.g18.add('dropdownlist',undefined,TemplateNames);
    if(Templates.length < 1) {
    win.g18.cb1.enabled=false;
    }else{
    win.g18.dd1.selection=Number(Prefs.template);
    win.g18.dd1.enabled=false;
    win.g18.cb1.onClick=function(){
        if(win.g18.cb1.value){
            win.g18.dd1.enabled=true;
            }else{
                win.g18.dd1.enabled=false;
    win.g14.cb1.onClick=function(){
       if( win.g14.cb1.value){
           win.g14.et1.enabled=true;
           win.g14.et1a.enabled=true;
           }else{
               win.g14.et1.enabled=false;
               win.g14.et1a.enabled=false;
    win.g50 =win.p4.add('group');
    win.g50.spacing=10;
    win.g50.orientation = 'row';
    win.g50.alignment="left";
    win.g50.st1 = win.g50.add('statictext',undefined,"FileName Options");
    var options = ["Document Name","Document Name with Prefix","Document Name with Suffix","Document Name with Sequence Number","New Name with Sequence Number"];
    win.g50.dd1 = win.g50.add('dropdownlist',undefined,options);
    win.g50.dd1.selection=0;
    win.g55 =win.p4.add('group');
    win.g55.spacing=10;
    win.g55.orientation = 'stack';
    win.g55.alignment="left";
    win.g55a =win.g55.add('group');
    win.g55a.spacing=10;
    win.g55a.alignment="left";
    win.g55a.st1 = win.g55a.add('statictext',undefined,"Prefix");
    win.g55a.et1 = win.g55a.add('edittext',undefined,"");
    win.g55a.et1.preferredSize=[250,20];
    win.g55a.visible=false;
    win.g55b =win.g55.add('group');
    win.g55b.spacing=10;
    win.g55b.alignment="left";
    win.g55b.st1 = win.g55b.add('statictext',undefined,"Suffix");
    win.g55b.et1 = win.g55b.add('edittext',undefined,"");
    win.g55b.et1.preferredSize=[250,20];
    win.g55b.visible=false;
    var numbers =[2,3,4,5,6,7,8,9,10];
    win.g55c =win.g55.add('group');
    win.g55c.spacing=10;
    win.g55c.alignment="left";
    win.g55c.st1 = win.g55c.add('statictext',undefined,"Sequence Number");
    win.g55c.et1 = win.g55c.add('edittext',undefined,"");
    win.g55c.et1.preferredSize=[50,20];
    win.g55c.st2 =win.g55c.add('statictext',undefined,'Length');
    win.g55c.dd1 =win.g55c.add('dropdownlist',undefined,numbers);
    win.g55c.dd1.selection=2;
    win.g55c.visible=false;
    win.g55c.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g55d =win.g55.add('group');
    win.g55d.spacing=10;
    win.g55d.st1 = win.g55d.add('statictext',undefined,"FileName");
    win.g55d.et1 = win.g55d.add('edittext',undefined,"");
    win.g55d.et1.preferredSize=[195,20];
    win.g55d.et2 = win.g55d.add('edittext',undefined,"");
    win.g55d.et2.preferredSize=[50,20];
    win.g55d.st2 =win.g55d.add('statictext',undefined,'length');
    win.g55d.dd1 =win.g55d.add('dropdownlist',undefined,numbers);
    win.g55d.dd1.selection=2;
    win.g55d.visible=false;
    win.g55d.et2.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g50.dd1.onChange = function(){
        switch(this.selection.index){
            case 0 : hideFields();checkSave();break;
            case 1 : hideFields();
            win.g55a.visible=true;
            break;
            case 2 : hideFields();
            win.g55b.visible=true;
            break;
            case 3 : hideFields();
            win.g55c.visible=true;
            break;
            case 4 : hideFields();
            win.g55d.visible=true;
            break;
            default : break;
    function hideFields(){
    win.g55a.visible=false;
    win.g55a.et1.text='';
    win.g55b.et1.text='';
    win.g55b.visible=false;
    win.g55c.visible=false;
    win.g55c.et1.text='1';
    win.g55d.visible=false;
    win.g55d.et1.text='';
    win.g55d.et2.text='1';
    win.g150 =win.p1.add('group');
    win.g150.spacing=10;
    win.g150.orientation = 'row';
    win.g150.alignment="top";
    win.g150.bu1 = win.g150.add('button',undefined,"Process");
    win.g150.bu1.preferredSize=[200,30];
    win.g150.bu2 = win.g150.add('button',undefined,"Cancel");
    win.g150.bu2.preferredSize=[200,30];
    win.g10a.cb1.onClick=function(){
        if(win.g10a.cb1.value){
            win.g11.bu1.enabled=false;
            win.g50.dd1.selection=4;
            }else{
                win.g11.bu1.enabled=true;
    function checkSave(){
        if(win.g10a.cb1.value){
            alert("Sorry this is not allowed as it could overwrite the document!\nPlease use another option");
            win.g50.dd1.selection=4;
            return;
    win.g150.bu1.onClick=function(){
        if(win.g11a.et1.text == ''){
            alert("No output folder has been selected!");
            return;
        if(Number(win.g14.et1.text) <10) {
            alert("Please enter a realistic Resize number!");
            return;
        if(Number(win.g14.et1a.text) <10) {
            alert("Please enter a realistic Resize number!");
            return;
        if(win.g50.dd1.selection.index == 1 && win.g55a.et1.text == ''){
            alert("No Prefix Has Been Entered!");
            win.g55a.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 2 && win.g55b.et1.text == ''){
            alert("No Suffix Has Been Entered!");
            win.g55b.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 3 && win.g55c.et1.text == ''){
            alert("No Sequence Number Has Been Entered!");
            win.g55c.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 4 && win.g55d.et1.text == ''){
            alert("No File Name Has Been Entered!");
            win.g55d.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 4 && win.g55d.et2.text == ''){
            alert("No Sequence Number Has Been Entered!");
            win.g55d.et2.active=true;
            return;
    Prefs.folder = decodeURI(outputFolder);
    Prefs.Width = Number(win.g14.et1.text);
    Prefs.Height = Number(win.g14.et1a.text);
    Prefs.quality = parseInt(win.g14.dd1.selection.index);
    Prefs.type= parseInt(win.g3.dd1.selection.index);
    if($.os.match(/windows/gi)){
    if(Templates.length > 0) {
    Prefs.template = parseInt(win.g18.dd1.selection.index);
    PrefsFile.open('w');
    PrefsFile.write(Prefs.toSource());
    PrefsFile.close();
        win.close(1);
        process();
    win.center();
    result = win.show();
    function process(){
    var folders =[];
    if(win.g3.cb1.value){
    var topLevel = Folder(app.document.presentationPath);   
    folders = FindAllFolders(topLevel, folders);
    folders.unshift(topLevel);
    var Quality = parseInt(win.g14.dd1.selection.index);
    var ResizeW = Number(win.g14.et1.text);
    var ResizeH = Number(win.g14.et1a.text);
    var sels =[];
    Count = 0;
    mask = win.g3.dd1.selection.text.toLowerCase();
    if(win.g3.rb1.value) {
        sels = app.document.selections;
       processSels();
    if(!win.g3.rb1.value &&  !win.g3.cb1.value){
    app.document.deselectAll();  
    sels = app.document.getSelection(mask);
    processSels();
    if(!win.g3.rb1.value &&  win.g3.cb1.value){//use subfolders
    mask = "*."+ win.g3.dd1.selection.text.toLowerCase();
    for(var k in folders){
    sels = folders[k].getFiles(mask);
    processSels();
    function processSels(){
    for(var z  in sels){
    var Thumb1 = new Thumbnail(sels[z]);
    Name = decodeURI(Thumb1.spec.name).replace(/\.[^\.]+$/, '');
    var Seq1 = zeroPad((Number(Count)+Number(win.g55c.et1.text)), (parseInt(win.g55c.dd1.selection.index)+2));
    var Seq2 = zeroPad((Number(Count)+Number(win.g55d.et2.text)), (parseInt(win.g55d.dd1.selection.index)+2));
    var Prefix = win.g55a.et1.text;
    var Suffix = win.g55b.et1.text;
    var NewName = win.g55d.et1.text;
    app.synchronousMode = true;
    if(win.g12.cb1.value){
    Thumb1.core.fullsize.fullsize;
    }else{
        Thumb1.core.preview.preview;
    app.synchronousMode = false;
    var md = Thumb1.synchronousMetadata;
    md.namespace = "http://ns.adobe.com/tiff/1.0/";
    var orientation = md.Orientation.replace(/(\w+)(\s+)(.)(\d+)(.)/,"$3$4");
    orientation = orientation.replace(/°/,'');
    orientation = orientation.replace(/Rotate/,'');
    if(orientation == 'Normal') orientation =0;
    var bm = undefined;
    if(win.g12.cb1.value){
    bm = Thumb1.core.fullsize.fullsize;
    }else{
        bm = Thumb1.core.preview.preview;
    if(bm.width != undefined) bm = bm.rotate(orientation);
    if(win.g14.cb1.value){
    if(bm.width > bm.height){
    var maxSize = Math.max(bm.height,bm.width);
    var minSize =Math.min(ResizeW,maxSize);
    if(minSize < maxSize) bm = bm.resize(minSize,BitmapData.bicubicSharper);
    }else{
        var maxSize = Math.max(bm.height,bm.width);
        var minSize =Math.min(ResizeH,maxSize);
    if(minSize < maxSize) bm = bm.resize(minSize,BitmapData.bicubicSharper);
    var parts = Thumb1.name.match(/(.*)\.([^\.]+)/); 
    switch(Number(win.g50.dd1.selection.index)){
        case 0 : saveFile =  Name; break;
        case 1 : saveFile =  Prefix + Name; break;
        case 2 : saveFile =  Name + Suffix; break;
        case 3 : saveFile =  Name + Seq1; break;
        case 4 : saveFile =  NewName + Seq2; break;
        default : break;
    if(win.g10a.cb1.value) outputFolder =app.document.presentationPath;
    bm.exportTo(new File(outputFolder +"/"+ saveFile +".jpg"),(Quality+1));
    Count++;
    if($.os.match(/windows/gi)){
    if(win.g12.cb2.value){//set resolution
    var res = Number(win.g12.et1.text);
    var t = new Thumbnail(new File(outputFolder +"/"+ saveFile +".jpg"));
    var mdata = t.synchronousMetadata;
    mdata.namespace = "http://ns.adobe.com/tiff/1.0/";
    mdata.XResolution =res*1000 +"/1000";
    mdata.YResolution =res*1000 +"/1000";
    mdata.ResolutionUnit =1;
    if(win.g18.cb1.value){
    var t = new Thumbnail(new File(outputFolder +"/"+ saveFile +".jpg"));
    var mdata = t.synchronousMetadata;
    mdata.applyMetadataTemplate(win.g18.dd1.selection.text, "replace");
        if(result == 1) alert("All done!");
    function ReturnUniqueSortedList(ArrayName){
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {  
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;
    for (var ki in unduped) {
       uniques.push(unduped[ki]);
    uniques.sort();
    return uniques;
    function FindAllFolders( srcFolderStr, destArray) {
        var fileFolderArray = Folder( srcFolderStr ).getFiles();
        for ( var i = 0; i < fileFolderArray.length; i++ ) {
            var fileFoldObj = fileFolderArray[i];
            if ( fileFoldObj instanceof File ) {           
            } else {
             destArray.push( Folder(fileFoldObj) );
            FindAllFolders( fileFoldObj.toString(), destArray );
        return destArray;
    function zeroPad(n, s) {
    n = n.toString();
    while (n.length < s) n = '0' + n;
    return n;

    The latest version is here:-
    http://www.scriptsrus.talktalk.net/BridgeProcessor.htm
    This is WINDOWS ONLY, this script will NOT work on a Mac!

Maybe you are looking for

  • How to retain numerical order (Of file names) when combining files in Acrobat (9) Standard

    How to retain numerical order (Of file names) when combining files in Acrobat (9) Standard, please see the attached screenshot for a clearer explanation. I understand that if we prefix all files with leading zero's this will probably resolve the issu

  • Email links

    Email links open in minmize size/ only links from emails do this .  Any links I clk on from an email open in min size at the top of the screen, just started tonite ,Don't know if I accidently hit a key or it just fliped out on me. all other browsing

  • 4s contacts post-upgrade problem

    So it might be my noob status as an Iphone user but I installed the update to my phone and now the contacts that were on my phone that I had synced from my Mac do not show up when they text and call.  So for example all the contacts on my phone (both

  • Dv7-1240 hard drive fit into dv7-4087cl?

    I have a dead motherboard in my dv7-1240us laptop. Does my new laptop (the dv7-4087) have a space for an extra hard drive as the old one did? WOuld the old Hard drive fit into the new latptop?

  • Unable to view attachments in emails.

    Recently updated the phones software and now I can't view attachments in my emails. My wife has the same phone, 8100 pearl, and she did not update and can still view them. I have tried looking everywhere I can to fix this, but no solution. Solved! Go