How do i create an action to crop to fit something?

Hello, I have a bunch or 3d renders which are a flat colour background with an object in the center.
I  need to create an action to crop the flat colour around the object,  leaving a specified space. Mantaining the aspect ratio of the picture  would be nice, but no completelly necessary.
Maybe theres a plugin, script or other software for doing this?
I attached an example.
001.jpg (6.94 KiB) Viewed 1 time
HELP!

Keep in mind Trim will only work if the color is an exact match in all pixels, and things get complicated when you start re-expanding the image using a sampled color.  It all falls apart if there's any variation in the background color.  I don't think Trim it's the best choice.
However, one can imagine creating an action based on the Magic Wand tool and an appropriate tolerance value to get the job done. It would go something like this:
1. Click the Magic Wand in the upper-left corner. That selects virtually all of the background color.
2. Select - Inverse.
3. Select - Expand - XX pixels where XX is the amount of border you want.
4. Image - Crop.
5. Select - Deselect.
I even tried it to ensure it works.  A sample version is here:  http://Noel.ProDigitalSoftware.com/temp/Goblino.zip
-Noel

Similar Messages

  • Creating an action to crop straighten and save

    I have scanned in a hundred or so pages from old photo albums, and have a thousand or so more to save.
    I am hoping to use a batch process or script to automate the cropping/straightening & saving, but I can't work out how to get the files saved.
    The album pages do not have a fixed number of images, so the crop/straighten is creating a variable number of images  from 1 to 8 or 9 (maybe more - they are really old photos some of which which are very small).
    So I need to find a way to create an action to crop and straighten (the easy bit), and then to automate the saving without asking for a file name and path for each image - the names created in the crop process are fine.
    Can anyone help please.
    Many thanks

    There is free script which works just fine. Here is entire discussion http://forums.adobe.com/thread/290194. I tested script with Photoshop CC on WIndows and everything works perfect. Download, actually select all and copy from this page http://www.tranberry.com/photoshop/photoshop_scripting/PS4GeeksOrlando/IntroScripts/cropAn dStraightenBatch.jsx. Open text editor and paste then save as cropAndStraightenBatch.jsx file in Presets > Scripts folder or save on Desktop then copy and paste in mentioned folder. Run script from File > Scripts menu without any image open. In the first dialog navigate to folder with scanned photos then in second window navigate to folder where you want to save.

  • How  Do I create a Action In PSE7

    I was wondering how to create an action in PSE7.  I've created them in CS4, but the stops dont work in PSE7.  ???

    Unfortunately, you can't create an action in PSE, only in PS. The stops should work as long as the steps are things PSE can understand, which is significantly more restricted than what you can do in Photoshop.
    However, to get the stops to work, you need to install the action into the effects palette, not the actions player, which won't stop for anything and doesn't give you access to the layers palette, either.

  • How can I create side bars without cropping the image?

    I want to create side bars because I am projecting in an vertical panel, but if I crop the image them I only get the middle part of it.
    How can I create side bars in an way that I can still move the image inside?

    On a Video Track directly above the clip(s) you want to have behind the side bars, place a clip of Color (or whatever you want to use for your sidebars).
    Now go to the Effects Tab > Matte >Mask Shape and drag the Mask Shape filter to the Color clip you have placed on the timeline.
    Double click on the clip to open it in the viewer, and click on the Filters Tab.
    Click Invert Box, and adjust the shape to get the side bars you want.
    And now the clip(s) that are beneath this effect will have the side bars and be independent of it, so that you can move them around.
    MtD

  • How can I create an action that dynamically appends the filename, when saving?

    I have created a batch file that watches a folder for .jpgs. When a jpg is found, it runs a Photoshop droplet that resizes and exports six different sizes of the same image, then closes the image. This all works fine, however the step I am stuck on is getting Photoshop to dynamically rename the files. What I mean is when I drop in a file named something like filename.jpg, I want the images to be named according to the width of resize. Exported files should be filename-1400.jpg, filename-1200.jpg, filename-800.jpg, etc. filename2.jpg would become filename2-1400.jpg, filename2-1200.jpg, filename-800.jpg. As it is now, Photoshop names the files the same names I saved them as, while creating the actions.
    I am using Photoshop CS6.

    What OS and verson of AI? Along with what Myle said, in the Actions panel is a column which allows the dialogs to be turned on/off. Make sure this is unchecked at all levels of the Action.

  • How can I create an action that uses "Find and replace"?

    Hi there,
    I'm trying to create an action that will use "Find and replace" to change certain words and phrases in my .psd-files. These are words and phrases I change a lot (I'm translating emails and website banners) and I would like to speed up that process using actions.
    When I tried to create the action I got the error message "The object "in contents of all text layers" is not currently available".
    Then I tried "insert menu items" and chose "Find and replace" and then did my change, but then it stopped when the FAR-window popped up. That's what I want to skip, so it just changes my words and phrases that I want.
    Is this possible?
    Best,
    Carl

    Anyway, in the Script in that other thread the function replaceText takes two Strings, so something like
    function main () {
    var myDocument = app.activeDocument;
    replaceText ("replace this", "with this")
    would be a possibility.

  • How do I create an action to save as, but into a different folder than the one I used to create the action?

    I am having an issue with my action being created to save under the same folder that my action was created with.  For instance, I opened an image, recorded the action, then I went to a different folder to play the action, but it saves to the previous folder.  How do I add some way to change the folder I want my pics to save to?

    If you want to give Scripting a try paste the following text into a new file in ExtendScript Toolkit and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
    // saves jpg into same folder;
    // be advised: this  overwrites existing jpgs of the same name without prompting.
    // 2010, use it at your own risk;
    #target photoshop;
    if (app.documents.length > 0) {
    var thedoc = app.activeDocument;
    // getting the name and location;
    var docName = thedoc.name;
    if (docName.indexOf(".") != -1) {var basename = docName.match(/(.*)\.[^\.]+$/)[1]}
    else {var basename = docName};
    // getting the location, if unsaved save to desktop;
    try {var docPath = thedoc.path}
    catch (e) {var docPath = "~/Desktop"};
    // jpg options;
    var jpegOptions = new JPEGSaveOptions();
    jpegOptions.quality = 12;
    jpegOptions.embedColorProfile = true;
    jpegOptions.matte = MatteType.NONE;
    //save jpg as a copy:
    thedoc.saveAs((new File(docPath+'/'+basename+'.jpg')),jpegOptions,true);
    //that’s it; thanks to xbytor;

  • How do I create an action that saves files as JPG in the same folder?

    Hey folks!
    So I'm sitting at work, trying to optimize my workflow a bit..
    What I'd like, is a droplet, that will allow me to open PSD's and save them as JPG in a new folder inside the original folder.
    Like the Image Processor that makes a new folder named 'JPG' but without opening the dialog box and having to press buttons.. Drag-drop-done
    Sitting on Imac with OS X 10.10.2 with Photoshop CC 2014.
    Hope you can help
    Regards
    Emil Rye

    Use scriptListener to create the code for adjusting the hue.  find the line in the code that denotes the change in hue replace that value with a variable that stores a random number:
    var rangeForRandomNumber = 200
    var offsetForRandomNumber = -100
    var randomNumber = Math.random() * rangeForRandomNumber + offsetForRandomNumber

  • How do I create a script to crop the channels within specific limits defined by me?

    Hi,
    I am trying to automate processing of my channels, but as a first step I need to crop them within specific boundaries (all data at once).
    Kindly let me know any specific script commands which would help me in doing the same.
    Solved!
    Go to Solution.

    Hi Brad_Turpin,
    I have attached a sample data with this post for your reference. In the attached file, there is one time channel (X axis) and one data channel (Y axis), and I need to crop both the channels apart from 0 to 20 sec.
    I checked the syntax for DataBlDel() which is 'Call DataBlDel(ChnNoStr, ChnRow, ValNo, [ValDelOnly])'. What I understand from this is (please correct me if I am wrong), I need to input the 'row no.' and the number of values from and to which I want to delete values from the channel data.
    But the problem for using it is that the 'row no.' and the number of values I want delete may vary when I pull in a different dataset. (i.e. If you look at the attached file you can see that for this example time channels starts from -5 to 40 sec, but for a different dataset time channel may start from -10 to 35 sec. But my requirement for the new dataset still remains same, that is from 0 to 20 sec). What should I do for this condition
    Additionally, I would also like to know the best way to crop if I am having more than one data channels (lets say, I am having 5 data channels apart from the time channel and want to crop all of them from 0 to 20 sec).
    Hope I have not confused you, please let me know for further clarification of my requirement.
    Thanks in advance.
    Regards,
    Fazil Shah.
    Attachments:
    to crop_1.zip ‏7 KB

  • How do I create this? I believe it has something to do with radial color gradient...

    I want the balloons in this logo to look like the below picture; however, I want to change the color and I am not sure how to recreate the radial effect the balloons currently have. Any suggestions would be greatly appreciated...Thanks!!!!

    Here's a screenshot of the process

  • Artboard Action/Script Crop to Artwork Bounds

    I have just finished manually cropping the artboard to fit the artwork bounds for 1500 files.
    It is not possible to create an action or keyboard shortcut for artboard options. It is not even possible to set and save another default artboard size.
    AI CS4 ships with sample scripts to add artboards, but I understand that it is not currently possible to write a script to modify the properties of a file's existing artboard.
    There are several messages on the Illustrator forums requesting help to create an action to crop the artboard to the artwork, so this must be a reasonably common problem.

    Does this help anyone?:
    You can automatically create a new Artboard to fit precisely around any object by 1. Selecting the object, 2. Selecting the Artboard Tool, and then 3. Clicking on the object with the Artboard Tool. A new artboard will appear which wraps tightly around your object. Your old artboard will still be there, but you can zap it right away since the Artboard Tool is still active, or you can just note the Artboard number for when you go to export.
    It's not a perfect solution, but nothing ever is with Adobe Illustrator.
    When I used Corel Draw I could simply select anything and export it and the result would be cropped to the object.
    Sigh.

  • Trying to create an action to save to web

    When I create an action to save to web, it always saves the file name in the action. Every save after that creates a file to replace the previous one. The actions that came with AI CS4 save the file as the file name.
    How can I create an action to save to web as the file name of the open file?
    Dean

    Check the naming conventions in the save for web panel itself. Unfortunately they introduce their own redundant naming which may conflict with conventional save steps in the action...
    Mylenium

  • How to create an action that will crop two sections from one scanned image?

    I'm trying to create an action that will automate the process of cropping the left and right pages from a series of two-page book scans.
    I tried to create a 2 step action which first crops the left half of a scan (by setting the left margin to 0in and the right margin to 6in) and then the right half of the scan (by setting the left margin to 6in and the right margin to. 12in), however when executing, only the left half appears to be cropped.
    I imagine this is due to the fact that once one side of the initial scan is cropped, the other side disappears.
    Is there any way around this?

    Basically i need to create a new document out of a folder full of images.
    You may have to look into Scripting to achieve something like this.
    You could ask in the Scriptimg Forum
    Photoshop Scripting
    But maybe it would suffice to insert the Menu Item
    File – Scripts – Load Files into Stack
    into the Action and then iterate through the Layers with [ or ] and reset the opacities and Blend Modes – but as Actions would not be able to change the number of repetitions of the operation conditionally a custom Script would still seem preferable. 

  • Is there a way to create an action or keyboard shortcut to set Crop tool to the front window size?

    Is there any way to create an action or keyboard shortcut to set the Crop tool to the front window size in Photoshop CS6?
    I find that I use that several times a day. I got used to it being the top choice in the Crop tool presets menu.
    Thanks.

    It depends on whether you have the cloud version or perpetual license version.
    For the cloud version press  I (eye)
    For the perpectual version press  F

  • How to create new actions ? in the interaction record screen

    Hi all,
    I'm working with the IC web client.
    In the interaction record screen the is a link to actions.
    But how to create new actions ? schedule actions ?
    Component "ICCMP_BT_INR"
    View "InrHeaderViewSet"

    Hi Eran,
    Gret is absolutely right ..The actions are transaction type specific and can be attached along in the customizing as mentioned above by gret , these can then be tested in the SAP gui first for their scheduled and start conditions and then in the ICWC.
    There is no special settings for actions in ICWC if they are there in your transaction they will come in the ICWC.
    Hope this helps
    Regards
    Raj

Maybe you are looking for