Automated cropping and resizing with user interaction

Dear all,
after hours of tests with batch processing and search in the internet maybe somebody of you can help me:
I have roughly 3000 jpgs. in one folder (all different sizes and proportions), and I need all of them cropped to a specific proportion (width:height = 4:3) and then resized to a specific size (e.g. 800 x 600px). Batch processing can do a lot, but one critical step is not possible: As soon as one picture has been loaded into PS, I need a user interaction to determine the crop area freely (size and position) before the rest of the process (cropping, resizing and saving) can run automatically again.
For example a picture of 2000 x 1000 px: The"crop window" lets me to choose an arbitrary area concering size and position (i.e.at 20px from the left, and 10 px from the top, size 1000 x 750 px = fixed aspect ratio  - and different for each picture), then the cropped area is resized to 800 x 600px, then it is saved.(Similar to the marquee tool with fixed aspect ratio)
The crucial act is the interaction with the "proportional cropping". If the resizing is not possible in the first step, I coudl also do this with a second batch run myself.
If somebody can help me, I would be very glad....
Thanks a lot,
Elmar Hartje

This should give you the user resize then resize to 800x600.
var doc=activeDocument;
if(doc.width>doc.height){
cropFourThreeRatio(true);
doc.resizeImage(new UnitValue(800,'px'), undefined, undefined, ResampleMethod.BICUBIC);
}else{
cropFourThreeRatio(false);
doc.resizeImage(undefined, new UnitValue(800,'px'), undefined, ResampleMethod.BICUBIC);
function cropFourThreeRatio(landscape) {
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.INCHES;
    var desc1 = new ActionDescriptor();
        var desc2 = new ActionDescriptor();
        desc2.putUnitDouble( charIDToTypeID('Top '), charIDToTypeID('#Rlt'), 0.000000 );
        desc2.putUnitDouble( charIDToTypeID('Left'), charIDToTypeID('#Rlt'), 0.000000 );
  if(landscape){
        desc2.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Rlt'), 147.000000 );
        desc2.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Rlt'), 195.750000 );
  }else{
   desc2.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Rlt'), 127.500000 );
   desc2.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Rlt'), 96.000000 );
    desc1.putObject( charIDToTypeID('T   '), charIDToTypeID('Rctn'), desc2 );
    desc1.putUnitDouble( charIDToTypeID('Angl'), charIDToTypeID('#Ang'), 0.000000 );
if(landscape){
    desc1.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Rlt'), 288.000000 );
    desc1.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Rlt'), 216.000000 );
}else{
  desc1.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Rlt'), 216.000000 );
    desc1.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Rlt'), 288.000000 );
    desc1.putUnitDouble( charIDToTypeID('Rslt'), charIDToTypeID('#Rsl'), 0.000000 );
try{
    executeAction( charIDToTypeID('Crop'), desc1, DialogModes.ALL );
}catch(e){app.preferences.rulerUnits = startRulerUnits;}
app.preferences.rulerUnits = startRulerUnits;

Similar Messages

  • Crop and Resize photo within the COD service in ESS

    Anyway to crop and resize photo within the COD webdynpro java component in ESS?

    No what i mean is how to allow the user to upload a photo using the COD service but also allow them to crop and resize the image as documented here:
    [How to Add Image Crop and Resize Capabilities in Web-Based Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10ab79a4-1fc2-2b10-29bb-ef9ff6771e72]
    The solution above does not use the webdynpro COD service in ESS, it is a portal component with embedded JavaScript which also only stores the photo on portal only (not the infotype in ECC).  I guess I need to figure out how to add these javascript files to the webdynpro COD service in ESS.  Although I don't think Webdynpro Java allows you to add javascript.

  • Crop and Resize video in AME at the same time !

    Hi everybody
    I'm new to Adobe Media Encoder CS4, used to encode with Flash Video Encoder.
    It seems that is it impossible with AME CS4 to crop and resize a video at the same time.
    In input i have a 1280*720 video, that I first resize to obtain the desired height (300px)
    so i obtain a 533*300 video,but when i would like to crop it in the same operation, that's not work, it doesn't keep the height i want (300px)
    If I start by cropping my video, i obtain a 538*683 video, but i can't resize after, because the width and height in right panel are in grey, inaccessible.
    In Flash Video Encoder (with Flash 8) it was possible to do this 2 operations at the same time, why doesn't this work in AME CS4 ?
    (please excuse my poor english ^^)
    Thanx by advance
    Pierre-Alexis

    maybe you have outgrown or just need to look at the "pro" applications instead.
    Other pro audio applications
    https://discussions.apple.com/community/professional_applications/other_pro_audi o
    http://www.apple.com/support/logicexpress/
    http://www.apple.com/support/logicstudio/
    http://www.apple.com/support/finalcutstudio/
    At the least, check out their communities.

  • Video Crop and Resize

    Not sure if this is a bug but it's frustrating! I'm using the
    Mac version of Flash CS3. I set everything up correctly to crop a
    video clip (dragging the sliders in the 'Crop and Resize' tab). I
    then start the queue etc. The resulting flv has NOT cropped as I
    specified?? I get strange sizes, distortions etc. This also happens
    by direct import to the stage (embed or external).
    Also I find that I need to check the 'Resize Video' check box
    even if I don't want to resize the video to get Flash to import at
    the correct size of the original! This renders the cropping tool
    useless. Any ideas anyone?

    I've since done some tests. The issue appears to be related
    to the source video and not the Flash Video Encoder, particularly
    the compression format. I have a set of clips at the same size but
    the compression formats are different (I checked the movie
    properties in QuickTime). Sorenson versions seem to crop and resize
    OK, but the DV format doesn't.
    At least the Flash side of things are fine.

  • Cropping and Resizing Pictures in the Picture Motion Browser (PMB) software.

    Solved!
    Go to Solution.

    For complete information about cropping and resizing pictures, select the appropriate PMB version below.
    PMB 5 or later
    PMB 4.3 or older
    NOTE: The links above take you to the PMB Support Web site.

  • Cropping and resizing Images using Adobe Photoshop Elements 12

    I am trying to edit pictures for my web site and previously used adobe photo shop 4 which I liked very well. When I try to crop and resize in photoshop 12 have been unable to adjust the images using pixels. As every photo on my website needs to be in pixels then this is a big problem for me! Is there anyway to change the preferences in the settings?  Thanks Tess

    You should head over to the Elements forums, this forum is for Photoshop. Go here : http://forums.adobe.com/community/photoshop_elements

  • Adobe Media Encoder CS5 - Can we crop and resize at the same time?

    Flash 8's video encoder, use to let you crop (cut x amount of pixels out) and then resize  a video (and in that order it did it).
    CS5's Media Encoder is confusing, from what I can tell it cannot do both, you either can crop or resize but not both. ANd if you can do both, you definately cant crop before the resize. So which is it?
    Resizing made sense last, because you could put in new values for the resize nad figure out how much you need to crop out.
    Please help this is driving me insane.

    Everyone in my office has the same problem!
    We really need an alternative to AME both because of the crop/resize problem and many other seamingly random issues with preview and export.
    Adobe Media Encoder sucks...

  • Grey stripes after cropping and resizing any raw file

    Dear Members,
    this is an important issue which has forced me to suspend my regular workflow in Photoshop for now. I have updated my graphic drivers but nothing has changed so far (I currently have a Nvidia GTX 580, Intel i7 3770k, 32GB of RAM). I'll describe the issue using a sample raw image publicly released for testing purposes for the Nikon D3200 camera. I open the file in Bridge as usual and edit it with Camera Raw (I have version 8.7.1 now, I have the most updated version of PS as well). I'll low down the Exposure, the Blacks and increase the Contrast somewhat just to make the issue more visible. Then I import the file in Photoshop for other adjustments. First, I crop any area with the crop tool, and then resize it through Image -> Image Resize. Notice that the issue shows up only by resizing after cropping. I choose, say, a new width of 1024px, and then press Ok. Then an irregular pattern of both horizontal and verticle straight grey lines shows up:
    My current Workflow Options in Camera Raw are set as follows:
    Color Space: ProPhoto RGB
    Depth: 16 Bits/Channel
    Image Sizing, Output Sharpening and Photoshop boxes are unchecked.
    This is from Edit->Color Settings in Photoshop:
    I didn't try to test the issue by changing every single option in my workflow. I can only say that it just happens with any raw files under the settings I posted. JPGs work fine.
    I would appreciate if you will solve what it is a very serious problem for my everyday work.
    Best Regards.

    Which version of Photoshop are you using? I tried to re-create this issue and could not:
    If you are using lens corrections in ACR, turn them off. They are know to cause issues at times.
    If still not working, try resetting the crop tool:
    Now try resetting the image size tool. Press Alt and the "cancel" will turn into a "reset."
    If still not working, try a preference reset: Ctrl+Alt+Shift as you initiate Photoshop's startup. It will ask if you would like to proceed, select "yes."
    If still not working, I suggest you both submit a bug report here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&loc=en
    Be sure to include as much information as you can.. System, Photoshop version, ACR version etc...
    You could also try a re-install before submitting bug report.
    Benjamin

  • Crop and resize images on iPhone - app recommendations?

    Does anyone know of a photo-editing app for iPhone that lets you crop an image and also resize to a preferred pixel ratio?
    On my Mac at home I use Photoshop for this (setting the crop-to width at 500 px and then simply cropping the part of the image I want to use), but it would be super-handy if I could load the high-res images onto my iPhone and do it on the move.
    I tried the Photoshop app, but although it lets you crop, there doesn't seem to be a resize function.
    Any ideas?

    Hi Jennifer, I guess It's not possible do what I want directly from iPhone.
    My problem is pinch to small size and keep it then and send to Instagram. When I double tap the image enlarge, so I double tap again and the image go back to normal size. When I pinch to small size that I want and leave my fingers the image goes back to regular size.
    I'm reading others foruns and I guess I have to use some app to post 3:4 photo, like Squaready. I'm trying and seems It work. It need to resize and crop and make all adjustments.
    Thanks for help.

  • Error in creation of text indexes and synching with user datastore

    Hi
    has any body encountered error in creating text indexes on 9.2.0.1 with user datastore. you can create them only with no-populate option. however once created after checking-in documents the indexes cannot be synched using ctx_ddl command manually.

    The only thing that I have seen similar to this was worked around by updating the column to itself, then sync...not sure if this is the same thing you are running into, but it may be worth a try. See the Oracle Text FAQ - take special note of step c:
    ===============================
    Creates the index without populating it.
    SQL > CREATE INDEX GLOBALINDEXEDBLOB_I
    ON ODMM_CONTENTSTORE ("GLOBALINDEXEDBLOB" ) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS (' stoplist CTXSYS.DEFAULT_STOPLIST storage IFS_DEF_STORAGE section group IFS_SECTION_GROUP wordlist IFS_DEF_WORDLIST memory 32000000 filter IFS_DEF_FILTER format column FORMAT charset column CHARACTERSET lexer IFS_GLOBAL_LEXER language column LANGUAGE nopopulate');
    b. Mark globalindexedblob column in every row as updated.
    SQL > update odmm_contentstore set globalindexedblob = globalindexedblob;
    c. Sync the index. If you skipped the previous step, then this step does not index content that existed prior to index creation in step a.
    SQL > exec ctx_ddl.sync_index('GLOBA[i]Long postings are being truncated to ~1 kB at this time.

  • GP and WD with Adobe Interactive form question - need some guidance.

    Hello experts,
    FYI, I'm running ECC 5.0 Support Stack 9, EP 7.0 SPS 11, NWDS 2.0.9_15 with Adobe Livecyle Designer.
    I am slightly stuck with what I'm trying to do. I have created a web dynpro application that has an Adobe interactive form. I'm trying to use guided procedures to initiate a process so that this interactive form can be filled out and submitted to an approver. I need the relevant parties to receive a notification email. I have setup email templates and services, I just need to know how it will fit into the process. Once approved in the process, a BAPI should be invoked to populate some fields in the form. Should I be creating the Web Dynpro application to invoke the bapi or should a guided procedure callable object invoke the bapi? I know how to do these things, but I dont know which method I should use, in order to correctly have this process flow from point A - point B. Should the process appear in the Universal Worklist? If not, why not? Will it only appear in the GP runtime? I have pretty much read thru most of the tutorials but still cannot get this GP stuff to work as a WHOLE process.
    Any guidance, suggestions, possible solutions will be greatly appreciated.
    Thanks
    Kunal.

    Hi,
    It seems you have not activated the Composite Form object. Only after activation you will be able to use it to create a Callable Object of type composite form.
    Hope this helps,
    Ashutosh

  • WLC+SSID with PSK/no PSK and ISE with User Banner

    We force users connected with PSK to land on Agreement page with click OK to continue option. Nomadix appliance is used for the agreement page.  How can we do this using ISE?
    The communication with ISE and WLC looks like is through Radius(old NAC was using SNMP) so videos show using 802.1x on SSID and enable NAC.
    Quetsion is doesn't this force SSID to use Certs? so how can PSK can come into play?

    you're mixing a lot of concepts. ISE is both a Radius authetnication server and a posture-assessment center (on radius and not snmp anymore indeed).
    Radius is often linked with 802.1x on a WLC, it achieves higher security. It does not necessarily involve certificate if using PEAP for example.
    However, if you want to keep your SSID with PSK, it's a different story. What you just need is a login page with an acceptance button right ?
    The WLC can do it on its own.
    Add a layer-3 security "web policy" of type "passthrough" on your SSID config. It will display a page with an acceptance. You can customize the text or also customize the page and load it on the WLC as well. (WLC config guide for mroe info on those steps)

  • Automating Cropping and Link Creation

    Hi guys,
    Every morning, I create a PDF from an Excel spreasheet. I crop each page a certain amount - every day it's the same measuerements for the same pages.
    After cropping the pages, I scroll up to my contents page. I then highlight each entry in the contents page, and choose to create a link, scroll to the page referenced, and then hit Create Link.
    As you can imagine, this very monotonous, and I was hoping someone could tell me how to automate the 2 process mentioned above?
    The amount by which each page is cropped does not change from day to day. As well as this, the contents page does not grow, and the poisiton of objects within the document does not change either, so I'm always setting the same content references to link to the same position within the document.
    Any help on this is very much appreciated
    Thankyou

    Crop is pretty straight forward using a Batch Sequence - there is already a Crop function listed there which you can use to define the page size and crop multiple PDF at once.
    The hyperlinking is much more complicated and requires some rather complicated logic. Basically this too could be done with a custom Batch Sequence and a JavaScript. The process would iterate over the text of the page and based on regular expression pattern matching identify numbers representing page numbers. These numbers would also have to match other criteria such as page location i.e. page coordinates. Once the page text has been filtered this way creating bookmarks or hypertext automatically would be possible using standard JavaScript methods.

  • Find and Replace with User Defined Variable

    I am in the process of converting some legacy help content to RoboHelp HTML 9 in order to give it some more features and customization for our clients. I have been taking advantage of User Defined Variables in order to customize the content. Up to this point I have been manually going through each topic and replacing each instance of a word ("statements" for example) with a user defined variable saying the same thing but with the possibility of being changed later should the customer want to. Though we only have about 200 topics, this is still relatively time-consuming and I would like to automate this as much as possible.
    Is there any way to find and replace content with a User Defined Variable?

    Hi there
    If you open the Script Explorer pod I believe one of the sample scripts is a "UDV Converter" script. Perhaps you could give that a try.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Crop and fill with image

    Hello
    I intend to use lasso for free style cropping an image, but I want to the fill in that cropped section with another image. I intend to , say crop a dress floral pattern on a sleeve, and fill it with another floral pattern of my choice.
    Thanks

    Hi there,
    Here's a quick tutorial for working with masks to replace patterns and textures in an image.
    1) Here's my starting image, and I want to replace the fabric on the pocket of this shirt.
    2) Bring in the pattern you want to incorporate into your original image by copy and pasting or by going to File > Place.
    3) With the pattern layer selected, option + click on the icon marked below to create a mask over the layer. The image will seem to disappear, but this is only because the mask is solid black— black in the mask indicates hidden areas, white areas are where the image will be revealed.
    4) Use the lasso tool to select the area in which you want the pattern to appear.
    5) Being sure the mask is selected in the layers panel, use the paint bucket to fill in the selection area with white. The pattern will appear.
    My next steps would then be to paint on the mask with black to reveal the stitched areas and the button on the pocket. Alternatively, as Silkrooster said, you can experiment with blend modes. Below is the pattern layer set to Multiply. Using this setting would work well if you were placing a pattern over a white or light-colored garment. Good luck!

Maybe you are looking for

  • Recording device error on DVD DL -HELP!

    Hi there, I have problems burning a Dual Layer DVD with DVDSP 4. I'm using DVD+R DL Verbatim as the media in a DVD-RW DVR-111D. But it keeps sending the following message: "Recording device reported the media error: Unknown device error (0x73,0x03.)"

  • Can I change the evaluation plan in BDB?

    I am a beginner. I wonder if I can change the evaluation plan in BDB so that I can explicitly say I want to do merge join as an example? thanks a lot! Edited by: user11201453 on May 26, 2009 8:20 AM

  • ADOBE 2.0 PLEASE HELP!!!!!!

    HELLO I HAD ADOBE 2.0 AND HAVE SOME I SEE MY PICS IN THE FILE BUT WHEN I TRY TO RETRIEVE THEM IT SAYS PLEASE RE INSTALL ADOBE EDITION 2.0 I WENT ON THE ADOBE WEB PAGE TO DOWN LOAD IT BUT ITS' NO LONGER THERE I DID HOWEVER DOWN LOAD THE 3.0 IT SEEMS N

  • Power went out and now spinning ball of death

    This morning the power went out while I had been working in InDesign and Illustrator. I came in and saved the project before the back up power went out but did not get the Mac powered off completely before the back up stopped. When the power came bac

  • Transfer pictures fro Mac to iPhone

    How do I transfer pictures from MacBook Air to iPhone 5