+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Batch in order to create pairs of images

    Hi there, thanks in advance
    Attached Thumbnails Attached Thumbnails Batch in order to create  pairs of images-test.gif  


  2. #2
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch in order to create pairs of images

    I have a big problem here, i have several folders with hundreds of images that i need to join, 2 images in 1 image (back and front).

    Is that possible (by action or script)?

    First i need to auto crop & straighten images then create a new photoshop document with 2 images (top & bottom) with a small border.

    (all of them have the same width 900px )

    thank you very much

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch in order to create pairs of images

    Ups, my post disappeared :X

    I will post again, I have several images that i have to join, 2 images in 1 image.
    All of them have 900 px width and i need to paste back and front in a single image, like the example.
    I have a square background with 1200x1200 and i need to auto crop and align a and then paste and align,
    Is this possible?

    best regards

  4. #4
    Power User
    Join Date
    Mar 2011
    Location
    Belgium
    Posts
    289
    Thanks
    9
    Thanked 64 Times in 61 Posts

    Re: Batch in order to create pairs of images

    is the 2th image a color-variation of the 1th
    or is it a complete other image

    how are the pairs located in a folder
    do they have a name like "picture1 a" and "picture1 b"

    maybe you can autocrop and center all images with background 1200px x 600 px
    and after that combine the pairs to a new background 1200px x 1200 px

  5. #5
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch in order to create pairs of images

    Quote Originally Posted by colleague View Post
    is the 2th image a color-variation of the 1th
    or is it a complete other image

    how are the pairs located in a folder
    do they have a name like "picture1 a" and "picture1 b"

    maybe you can autocrop and center all images with background 1200px x 600 px
    and after that combine the pairs to a new background 1200px x 1200 px

    Thanks for your reply,

    The second image is another image, like a bank note, with a front and back, and it will be like the example I posted before.

    Their are on the same folder with diferent names, but it will be no problem, since i can separete and rename as I wish.

    The final result, will be two images, one at the top and one at the bottom, with a black backgroud.

    thanks in advance

  6. #6
    Power User
    Join Date
    Mar 2011
    Location
    Belgium
    Posts
    289
    Thanks
    9
    Thanked 64 Times in 61 Posts

    Re: Batch in order to create pairs of images

    you need a script like paul rigott made in this link
    http://forums.adobe.com/message/3823892#3823892
    but it needs some adjustments

  7. #7
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch in order to create pairs of images

    Quote Originally Posted by colleague View Post
    you need a script like paul rigott made in this link
    http://forums.adobe.com/message/3823892#3823892
    but it needs some adjustments
    Thank you very much

    Code:
    #target photoshop
    main();
    function main(){
    var inputFolder = Folder.selectDialog("Please select the folder with Files to process"); 
    if(inputFolder == null) return;
    var startRulerUnits = preferences.rulerUnits;
    app.displayDialogs = DialogModes.NO;
    var outputFolder = Folder(inputFolder + "/Combined");
    if(!outputFolder.exists) outputFolder.create();
    var fileList = inputFolder.getFiles(/.jpg$/i); 
    while(fileList.length>0){
    preferences.rulerUnits = Units.PIXELS;
    if(fileList.length==1) break;
    var mainDoc = open(fileList.shift());
    mainDoc.resizeCanvas(mainDoc.width, (mainDoc.height*2), AnchorPosition.TOPLEFT);
    var tmp = open(fileList.shift());
    tmp.activeLayer.duplicate(mainDoc); 
    tmp.close(SaveOptions.DONOTSAVECHANGES);
    var LB = mainDoc.activeLayer.bounds;
    mainDoc.activeLayer.translate((mainDoc.width-LB[2].value),0);
    mainDoc.flatten();
    preferences.rulerUnits = Units.PERCENT;
    mainDoc.resizeImage(66.66666, undefined, undefined, ResampleMethod.BICUBICSHARPER);
    var saveFile = File(outputFolder + "/" + decodeURI(activeDocument.name));
    SaveJPEG(saveFile, 10);
    mainDoc.close(SaveOptions.DONOTSAVECHANGES);
    }
    preferences.rulerUnits = startRulerUnits;
    }
    function SaveJPEG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality; 
    activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
    I had already changed the height in order to double vertically, now I need some help in order to align the second image.

    It will be AnchorPosition.BOTTOMLEFT but where can i put this part?

    Thanks in advance

  8. #8
    Power User
    Join Date
    Mar 2011
    Location
    Belgium
    Posts
    289
    Thanks
    9
    Thanked 64 Times in 61 Posts

    Re: Batch in order to create pairs of images

    hoi do_it

    this works fine if all images are 1200x600 to start with

    #target photoshop
    main();
    function main(){
    var inputFolder = Folder.selectDialog("Please select the folder with Files to process");
    if(inputFolder == null) return;
    var startRulerUnits = preferences.rulerUnits;
    app.displayDialogs = DialogModes.NO;
    var outputFolder = Folder(inputFolder + "/Combined");
    if(!outputFolder.exists) outputFolder.create();
    var fileList = inputFolder.getFiles(/.jpg$/i);
    while(fileList.length>0){
    preferences.rulerUnits = Units.PIXELS;
    if(fileList.length==1) break;
    var mainDoc = open(fileList.shift());
    mainDoc.resizeCanvas((mainDoc.width), (mainDoc.height*2), AnchorPosition.TOPLEFT);
    var tmp = open(fileList.shift());
    tmp.activeLayer.duplicate(mainDoc);
    tmp.close(SaveOptions.DONOTSAVECHANGES);
    var LB = mainDoc.activeLayer.bounds;
    mainDoc.activeLayer.translate((0),(300));
    var saveFile = File(outputFolder + "/" + decodeURI(activeDocument.name));
    SaveJPEG(saveFile, 10);
    mainDoc.close(SaveOptions.DONOTSAVECHANGES);
    }
    preferences.rulerUnits = startRulerUnits;
    }
    function SaveJPEG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality;
    activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

    }
    Last edited by colleague; 12-03-2012 at 10:41 AM.

  9. #9
    Newbie
    Join Date
    Jun 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch in order to create pairs of images

    tnx

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.9
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.
All times are GMT -5. The time now is 02:31 PM.