Automatic Image Compilation

Hello All,
I am hoping this great community can help me out.
I am looking to take two images and automatically compile them in to one.  Seems easy but there is a catch, I guess there is always a catch.
Image A is the same each time.  It is a picture of a person in a 4x6 aspect ratio.
Image B changes each time.  This image also has a predetermined location that is transparent where I want Image A to be resized to and placed automatically.
Step as I see them
Take image B and determine the size and location of the transparency
Resize image A to be the size determined
Create a canvas to the overall size of image B
Move image A to the location of the transparency on the new canvas
Place image B on on the new canvas thus being on top of image A
Save new Canvas
Is this possibly to script so I can batch do 350 or so of these?
Thanks in advance.

Thanks for the responses. 
I have actively tried to solve this as well and I have come up with a pretty darn good solution so far...I have pulled a bunch of different ideas from others and created some custom scripting too.  This is a PoC to show that it can be done for 1 image.  I just need to clean it up and then figure out to it to run as a batch.  Be nice as this is my first attempt at PhotoShop Scripting
layerPixels2Selection = function(fLayer){
          if(mainPhoto.activeLayer.isBackgroundLayer){
             return;// background doesn't have a transparency mask
          var desc = new ActionDescriptor();
          var ref = new ActionReference();
          ref.putProperty( charIDToTypeID( "Chnl" ), charIDToTypeID( "fsel" ) );
          desc.putReference( charIDToTypeID( "null" ), ref );
          var ref1 = new ActionReference();
          ref1.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Trsp" ) );
          desc.putReference( charIDToTypeID( "T   " ), ref1 );
          executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
function MoveLayerTo(fLayer,fX,fY) {
  var Position = fLayer.bounds;
  Position[0] = fX - Position[0];
  Position[1] = fY - Position[1];
  fLayer.translate(-Position[0],-Position[1]);
//demo
// Save the current preferences
var startRulerUnits = app.preferences.rulerUnits
var startTypeUnits = app.preferences.typeUnits
var startDisplayDialogs = app.displayDialogs
// Set Adobe Photoshop CS6 to use pixels and display no dialogs
app.preferences.rulerUnits = Units.PIXELS
app.preferences.typeUnits = TypeUnits.PIXELS
app.displayDialogs = DialogModes.NO
var mainPhoto = app.activeDocument;
layerPixels2Selection(mainPhoto)
mainPhoto.selection.invert();
var mainPhotoWidth = mainPhoto.width;
var mainPhotoHeight = mainPhoto.height;
var mainPhotoResolution = mainPhoto.resolution;
var mainPhotoAspect = mainPhoto.width / mainPhoto.height;
var selectionTopLeftXOffset = mainPhoto.selection.bounds[0].as('px')
var selectionTopLeftYOffset = mainPhoto.selection.bounds[1].as('px')
var selectionBottomRightXOffset = mainPhoto.selection.bounds[2].as('px')
var selectionBottomRightYOffset = mainPhoto.selection.bounds[3].as('px')
var selectionWidth = mainPhoto.selection.bounds[2].as('px') -  mainPhoto.selection.bounds[0].as('px');
var selectionHeight = mainPhoto.selection.bounds[3].as('px') -  mainPhoto.selection.bounds[1].as('px');
var selectionAspect = selectionWidth / selectionHeight;
//alert (selectionWidth + ", " + selectionHeight);
var lifestylePhoto = File("C:/Greeting Cards - Resized/lifestyle.jpg")
open (lifestylePhoto)
var lifestylePhoto = app.documents.getByName("lifestyle.jpg")
var lifestylePhotoAspect = lifestylePhoto.width / lifestylePhoto.height;
if (selectionAspect > lifestylePhotoAspect) {
          var lifestylePhotoNewWidth = selectionWidth;
          var lifestylePhotoNewHeight = selectionWidth / lifestylePhotoAspect;
} else {
          var lifestylePhotoNewWidth = selectionHeight * lifestylePhotoAspect;
          var lifestylePhotoNewHeight = selectionHeight;
lifestylePhoto.resizeImage(lifestylePhotoNewWidth, lifestylePhotoNewHeight);
lifestylePhoto.selection.selectAll();
lifestylePhoto.selection.copy();
app.documents.add(mainPhotoWidth, mainPhotoHeight, mainPhotoResolution, 'newImage');
var newPhoto = app.documents.getByName("newImage");
newPhoto.paste();
MoveLayerTo(newPhoto.artLayers[0], selectionTopLeftXOffset, selectionTopLeftYOffset);
app.activeDocument = mainPhoto;
mainPhoto.selection.selectAll();
mainPhoto.selection.copy();
app.activeDocument = newPhoto
newPhoto.paste();
// Reset the application preferences
app.preferences.rulerUnits = startRulerUnits
app.preferences.typeUnits = startTypeUnits
app.displayDialogs = startDisplayDialogs

Similar Messages

  • How do I disable automatic image downloads if there is no option to turn that function on/off in Options/Control???

    I want to turn off the automatic image download function, and DO NOT have that option on the Option/Content tab. I have looked everywhere I can think of for an option to stop web pages from downloading a ton of stuff I don't want to see, and I cannot find a way to do it anywhere. I am VERY frustrated at this point, because all the help info I found online from other sources say to uncheck the Automatic Image Download box on the Content Tab in the Options dialog box.
    That option isn't there... The only things available on that tab are "Block Pop-ups," "Fonts & Colors," and "Language." That's it. I have automatic updates enabled for Firefox, and it is up to date.
    Please help me solve this very annoying problem. Thank you.
    BTW... EVERY search I did on the tech support page said there were 1000 answers/solutions found. This tells me that your search function is NOT working very well at all...Every search should not return the EXACT same quantity of results.

    Go to the '''[https://addons.mozilla.org/en-US/firefox/ Mozilla Add-ons Web Page]''' {web link}
    (There’s a lot of good stuff here) and search for what you want.

  • How can i stop automatically image loading in my browser?

    there is no option of stoping automatically image loading in my firefox 25.01 as this option was in old firefox. Pls help!!!!!!!

    Hello fuad.aman
    # In the [[Location bar autocomplete|Location bar]], type '''about:config''' and press '''Enter'''. The about:config "''This might void your warranty!''" warning page may appear.
    # Click '''I'll be careful, I promise!''', to continue to the about:config page.
    # type(or copy/paste from here) '''permissions.default.image'''
    # double-click on it and change the value to '''2'''
    # exit firefox and restart-it.
    you can also see the next add-ons to take back again the image setting
    https://addons.mozilla.org/en-us/firefox/addon/quickimage/
    https://addons.mozilla.org/en-us/firefox/addon/image-block/
    https://addons.mozilla.org/en-US/firefox/addon/quickjava/
    thank you

  • How do I turn automatic imaging back on?

    Somehow the images on my home page got turned off. How do I turn automatic imaging on again? Thanks.

    I recently ran into that problem after my last upgrade,  "Visual Voicemail is currently unavailable.  Call Voicemail" message.  I went on the Chat Line with AT&T.  First he had me remove my wifi, but that did not help.  Then he had me go to Settings, General, Reset, and then to Reset Network Settings.  That semed to work for me.  I redid my wifi and that message is still gone.  Good luck.

  • Automatic JSP compilation

    All,
    I am working with R12-iStore. As per metalink link note: 458338.1, I have enabled automatic JSP compilation. Bounced all services.
    After logging into iStore then when I click on Profile link, blank page displayed.
    ibeCAcpProfMenuHome.jsp -> This is the JSP file which is used for Profile page. This page exists in $OA_HTML & class file in $COMMON_TOP/_pages directory.
    The above profile jsp page contains the following JSPs. These files are there in $OA_HTML directory but the classe files are not there in $COMMON_TOP/_pages directory.
    1) ibeCZzpHeader.jsp
    2) jtfincl.jsp
    My question is , do I need to compile them to fix this issue even though auto JSP compilation option is enabled ?
    is this auto compilation doesn't compile the pages while loading or accessing ??
    Thanks,

    Hi Hussein,
    I have checked the log file. It looks like , the bounce was proper.
    Also, I have raised SR with ORacle Support.. lets hope we get some good solution.
    ================================================================================
    04/03/09-16:10:34 :: adapcctl.sh version 120.6.12000000.4
    04/03/09-16:10:34 :: adapcctl.sh: stopping OPMN managed OHS instance
    opmnctl: stopping opmn managed processes...
    04/03/09-16:10:36 :: adapcctl.sh: exiting with status 0
    ================================================================================
    04/03/09-16:10:48 :: adapcctl.sh version 120.6.12000000.4
    04/03/09-16:10:48 :: adapcctl.sh: starting OPMN if it is not running
    opmnctl: opmn is already running.
    04/03/09-16:10:48 :: adapcctl.sh: starting OPMN managed OHS instance
    opmnctl: starting opmn managed processes...
    04/03/09-16:10:51 :: adapcctl.sh: exiting with status 0
    ================================================================================

  • Genbscript automation - Making genbscript run automatically after compile.

    Hello,
    Is there any way where we can make the genbscript run as soon as we click on compile. What am doing now is, every time I compile, i run the genbscript seperately.
    So I would like to know , is there any method where the genbscript runs automatically as soon as we compile? If so plz let me know.
    Thank and Regards,
    Abhishek.

    What version of Siebel are you using? If you are on 8.0, in Siebel Tools go to menu item View and choose Options.
    Choose the Scripting tab and enter a value in "Browser script compilation folder".
    Or just have a look here:
    Using Siebel Tools
    http://download.oracle.com/docs/cd/B40099_02/books/UsingTools/UsingToolsTOC.html
    Setting Scripting Preferences
    http://download.oracle.com/docs/cd/B40099_02/books/UsingTools/UsingTools_ScriptEditors3.html#wp1109335
    Axel

  • How can we know there is a picture if I disabled automatic image loading?

    If I disable the option "load image automatically", all the images disappeared and do not hold a space in the web page. But the program is that I want to know that there is an image. If the images just disappeared, I don't even know there exist some images. Maybe we can add a frame to the place where the image originally existed?
    My ultimate goal is to eliminate the bandwidth occupied by images, so I want to disable them. But the image can be helpful sometimes.

    It sounds like you are talking about the cloning tool?
    Tool looks like this:
    Then when selected you can change the size of the brush and using Alt (windows) and Command (Mac) to select your region you want to copy then start to create you cloned image.
    Hope this helps?

  • Automatic image stacking in Bridge CC by filename.

    Hi,
    I work at a CGI Studio and we use Bridge to acess and manage our library of textures etc.
    Now textures usually consist of several seperate image files, let's say three (_DIFFUSE, _BUMP, _SPECULAR)
    The filename of these three files, say they're from a wood material, would always be like "Wood-"+counter+"_DIFFUSE", example: "Wood-003_DIFFUSE.jpg", "Wood-003_BUMP.jpg" and "Wood-003_SPECULAR.jpg"
    Now I manually grouped the three seperate image files together so I have a stack of three. The thing is we got hundreds of those 3-file-images.
    Basically I need a way to automatically stack all the images which have the same beginning/pattern
    Related: I did this once manually but for some reason Bridge messed up after a few days and got them all half-*** together and jumbled them around resulting in all files still being there but not properly stacked anymore...
    Now I know my way around proprietary scripting languages and am familiar with stuff in general. Do I need to do scripting here or is there a better way to do so?
    How would I start? Where? Has anyone links to a solution for this (I think common) problem?

    Here is one solution.
    #target bridge 
       if( BridgeTalk.appName == "bridge" ) { 
    woodStack = MenuElement.create("command", "Wood Stack", "at the end of submenu/Stack");
    woodStack.onSelect = function () {
    var fileList = Folder(app.document.presentationPath).getFiles("*diffuse*");
    for(var a in fileList){
        var firstFile = decodeURI(fileList[a].name.match(/[^_]*/));
        var filesToStack = Folder(app.document.presentationPath).getFiles("*"+firstFile+"*");
        if(filesToStack.length == 3) {
            app.document.deselectAll();
            for(var s in filesToStack){
            app.document.select(new Thumbnail(filesToStack[s]));
        app.document.chooseMenuItem("StackGroup");
    Copy and paste the script into ExtendScript Toolkit or a PLAIN TEXT editor.
    Then save it out as filename.jsx
    The correct folder to save the script can be found by opening Bridge, going to the preferences - Startup Scripts and clicking on the "Reveal my startup scripts" button.
    Once saved close and re-start Bridge.
    To use, selected the folder you want to stack the groups of files and select Stacks - Wood Stack

  • Automate image capture / deploy WinPE 4.0

    Hi All,
    I need help with capturing an image on a Win8.1 tablet. The Thinkpad Tablet 2 only has 1 USB port and no keyboard support in WinPE as far as I know. I was able to inject the touch screen drivers to the PE environment and even execute gimageX, but
    I am not sure how to format the partition before applying the image. (  I can't type diskpart and select the drive) 
    I have the idea, at least I think so. create a script that will automatically format the local drive of the target machine with diskpart, then since gimagex can execute after that, the rest will be easy I guess. I just don't know much about scripting part
    I am more interested in a script that can format the correct partition and not my thumb drive, additionally if possible, I would also like a script to capture / deploy - or point me to the right direction please.
    thanks in advanced!!

    http://gallery.technet.microsoft.com/Wim-Image-USB-Drive-25381932
    ¯\_(ツ)_/¯

  • Automatic image resize

    Does anyone know of a free JS which automatically resizes images
    in the correct aspect ratio?
    i could do with one because a lot of my sites have functions so the client can upload images.
    if i need to write it myself would the following process work, or have i got my maths wrong?
    find the width of the image
    find the height of the image
    divide the width of the image by the width of the area deciatied to holding the image - set this as var W
    divide the height of the image by the height of the area deciatied to holding the image - set this as var H
    (I should now know how many times too big the image is)
    set the width of the image to existing width / W
    set the height of the image to the existing height / H
    place the whole thing in an IF statement top stop it from running iof the image nativly fits into its space.

    That would be alot simpler, I did not realise that browsers could do that.
    However with that method you can only limit the width of the area the image may occupy, with my method both the width and the height can be fixed.

  • Automate image adjustments

    Hi!
    I have 13 000+ BW images, some are ok, some are too dark and some are too light. Is there any way to separate file according their general darknes so i could run a different batch curve to images that need adjustmets. I know it's a rough way but at least some kind of corrections would be made. Hand adjusting everything is not an option.
    I used to be able to do this waaaaaay back when there was a wonderful app called MarkScout Markzware (mac os 9).
    Any thoughts?
    jukka

    I'd use auto levels at first.
    Next - create image copy on layer above, equalize it, make transparent (20-40%) and blend with original image layer in screen or luminosity mode. Delivers pretty good result, given it's fully automatic. I prefer to keep the layers unflattened, so it's possible to make adjustments later, if something is really wrong.

  • Automate object compilation using Sqlplus

    Hi,
    Why is that when you try to compile an object in sqlplus it prompts for you to hit the '/' key and then enter key. Is there a way to not wait for those key entries and compile automatically.
    For eg. when I issue a command like
    c:\Sqlplus> @c:\proca.pkg
    it get the following
    c:\sqlplus> @c:proca.pkg
    436
    It basically waits at the line number 436 and then I have to hit "/" and enter key to get the message Package Created.
    I would like to suppress that and want the package compiled without user inputs.
    Any help would be appreciated.
    Thanks
    Ash

    Put the '/' inside in your package it won't prompt that again.
    Regards.
    Satyaki De.

  • Automatic Image Upload.. is it possible?

    Hi Experts,
    I have a situation where i get the materail data in excel.
    Each excel will have 20 records(so 20 material details).
    i upload it via IS(port).
    Now there is a new requirement to Include a image for each material!!
    I have included a new field in my main table (lookup image).
    I can see in Data manager that manually uploading images for each record.
    But how do i upload a set of images for materails automatically!!
    Is it possible??
    Could someone guide me!!
    KR
    John

    Hi Experts,
    I got through the process of uploading images to my records.
    1) In DM select the Image folder(which has 50 images init) from the desktop and upload in Images table.
    2) have an excel with unique field and Images names, upload it via IM.
    Now, during the step 1, Will it be possible to restrict the user to Not to allow upload of image More than 2 MB of size??
    1 image > 2MB THEN fail to import or some message intimating cannot cross the limit per file as 2MB.
    i have checked the image properties in console but it never said about image limit??
    Please help
    Kind Regards
    John

  • Can InDesign CC 2014 automate image placement?

    I have designed a certificate of achievement to award participants for a variety of activities.
    I have also designed badges for each activity in the form of png files.
    I will be creating numerous certificaes and already know how to auto-generate them with customized names from an exported csv file.
    However I am wondering if InDesign CS6 is able to automatically place the unique png badges on the certificates through a similar automated feature or via coding or other customized approach?
    Thanks in advance for your consideration.

    You might find this Lynda.com tutorial helpful:
    Watch the Online Video Course InDesign Insider Training: Data Merge and Database Publishing
    Derek

  • Automatic image compression for photo gallery web apps?

    Is it possible to scale and compress images to a maximum size when uploading to a web app? This is for a photo gallery that allows public submissions, and we are anticipating that we will get lots of photos that are very large. This is a task that would be best handled by a server-side image processing lib, but is there another way since we don't have that on BC?
    Thanks!

    I understand that you are probably concerned with data storage limits when asking this question. But, you can create thumbnails when displaying images within the photo gallery. This will allow a very large image to display very quickly within the gallery.

Maybe you are looking for

  • I cannot uninstall or install the latest version of Flash Player

    Hi, the latest version of this  player is showing up, and is enabled on my computer but does not work: I cannot view any video or listen to radio except for youtube. When I try to uninstall it  and to retry the download of the latest version the inst

  • Error in Adobe LiveCycle ES configuration manager

    Hello,<br /><br />When running Adobe LiveCycle ES configuration manager I´m getting this error, and the configuration process stops:<br /><br />what is this component: DeployDSCs? Can I take it form the configuration?<br /><br />Thank you<br /><br />

  • Issue with backing up Archive logs

    Hi All, Please help me with the issues/confusions I am facing : 1. Currently, the  "First active log file  = S0008351.LOG"  from "db2 get db cfg for SMR"     In the log_dir, there should be logs >=S0008351.LOG     But in my case, in addition to these

  • HT1338 backup from external hard drives?

    hello.i have 2 wd 1tb external hard.if i want to get backup from them,what should i do?does it need to having 2 tb free space?please explain.

  • CharacterFormat fails to take values

    I'm finding that CharacterFormat (soon ITextLayoutFormat) fails to take a value of "regular" for fontStyle. This code illustrates the case (attached) On the first run the traces are as expected, setting the text to italic: "existing fontWeight: norma