HOW TO: Action to resize & center crop images of various sizes

Hello,
I've gotten a lot of help here over the years so I wanted to share an action I created. I needed to resize and automatically center crop images of various sizes for my company's website. For example: All images needed to be 900px x 460px 72dpi - and because input images were from many different sources, the dimensions were different for each image. It seemed straight forward at first (sort of) but I couldn't find a way of doing this without a script or some third party program - so I came up with the following action. Hope someone gets some use out of it.
Note: Change action as needed to suit your needs.
Resize and Center Crop (Auto)
Fit Image
     height: 900px
     width: 900px
     With Don't Enlarge
Canvas Size
     height: 460px
     vertical: center
     extension color: white
Image Size
     width: 900px
     resolution: 72 per inch
     with scale styles
     with constrain proportions
Save (optional)
     As: JPEG
     Quality: 12
     Scans: 5 (for web images)
This assumes that the images are at least horizontal, but if you have photoshop CC you can create a conditional action that will work with vertical and horizontal images. If you are square cropping, this action makes it a breeze. I also have an action that uses the same basic logic, but lets me manually move the crop box. The only real issue I have encountered is when the original image ratio is very narrow, which leads to some white space on the top and bottom (I'm working on updating the action to address this). But it has worked on about 95% of my images. Again, you will probably need to adjust all of the variables depending on what you are trying to do, but it should be possible with the same steps. And of course this can also be used to batch process.
Feel free to let me know if anyone comes up with improvements! Thanks

Hmm thanks Mylenium, I got that response a lot when I was searching before. But if you re-read above, I am explaining a method of doing it without a script. So it wasn't really a question, just a tip in case anyone else wanted to do the same.

Similar Messages

  • Need a script for squaring images of various sizes please

    Hello, new to this group but have been using photoshop for years doing basic editing. I have never done any sripting. I have a project on my hands. I have a lot of image of various sizes with some taller or wider than others. I need to make all these images exactly square though. Currently they vary and are wider or taller etc.
    I was wondering what process I could use hopefully with batch editing but was told scripting might be the answer to automate this process as I have about 8,000 images.
    So for example one image might be 200 pixels wide and 400 pixels high and another is 100 pixels high and 600 pixels wide and so on. I would need the
    1st example to be 400 x 400 and the 2nd example 600 x 600.
    I am using photoshop 5.5
    The software for a shopping cart is using a feature that allows you to zoom in on the image but if it is not perfectly square the image doesn't appear
    well in the software. Using magento e-commerce.
    Thanks for your help and any thoughts on this project of mine.
    Dave

    Here a simple script the does what I think you want.
    // squares the canvas. uses the background color
    var doc = activeDocument;
    var maxDim = Math.max( doc.width, doc.height );
    doc.resizeCanvas( maxDim, maxDim, AnchorPosition.MIDDLECENTER );

  • Resize and crop images to a specific width and height

    Hi,
    I want to convert images to thumbnails with a 'standard' format - I need all images to have the same width and height.
    So I need to resize and then crop the images. Is this possibe with JAI? Are there other libraries which can do this better?
    I've read about ImageMagick - are the Java interfaces to ImageMagick good?
    /best regards, Håkan Jacobsson - System developer in Sweden

    Duplicate posting, answers are here
    http://forums.sun.com/thread.jspa?threadID=5419291
    Pleas don't duplicate unless you note that you have done so and provide pointers to the duplicates - as I'm sure you're aware. . .

  • Can't get cropped images into printable sizes I.e 6x4, 7x5 etc

    I am fairly new to elements and I am having problems with resizing my images. I have cropped some images and want to upload them to say 'photobox' but I can't seem to get the images into the correct size for printing I.e 6x4, 7x5 etc. I have also noticed that I start with an image that is say 7mb in size yet when it has been edited and uploaded it is 700k and rated as a medium quality image ? Any help would be appreciated.  Thanks

    If you have cropped the image precisely  to 6x4, then in the print dialog you need to select the paper size (6x4). If your printer has the capabilitry to print borderless, you can try that as well.

  • Crop image- quickly change size of background

    here is the flash piece that I am working on:
    http://ltcproduction.com/Flash_text.gif
    I need to crop unecessary pieces in the background. What is
    the fastest way to do this?
    Thanks!

    npqster wrote:
    > here is the flash piece that I am working on:
    >
    http://ltcproduction.com/Flash_text.gif
    >
    > I need to crop unecessary pieces in the background. What
    is the fastest way to do this?
    >
    > Thanks!
    There is no crop. You need to resize the canvas and manually
    reposition your content
    to suit the new size.
    You could write JSFL script to do it for you but judging by
    the amount of content I would
    say it's a overkill.
    Perhaps someone else did that already, google for "JSFL Crop
    Command"...
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How do I restore a trim/crop to the original size?

    A few days ago I cropped some clips. Today I played the clips and one of the clips is severely trimmed. How do I restore the clip to its original size?

    In the inspector, go down to the "Crop" section and hit the "reset" arrow in the top right-hand corner. This will return the clip to its original dimensions.

  • Batch processing images of various sizes

    I'm trying to create 125 pixel square thumbnail images using a batch process and I'm having trouble getting it to work consistently with images that have different aspect ratios. I think I know why it's working the way it is, but I don't know how to work around the function. Here is what I'm doing that doesn't work when the image proportions change:
    1. Resize image to 125 pixels high using the "constrain proportions" option.
    2. Resize canvas to 125 pixels wide, thus cropping the sides to create the square image.
    Then I have another process that does the same thing with images in portrait orientation. The problem is, I have some images that are 640x480, for example, and some that are 640x360. If I create the command using a 640x480 image, the 640x360 images are skewed when run through the batch because the "resize image" step is actually setting the dimensions of the image, rather than maintaining the proportions of that particular image. I thought about setting the canvas to a square first, but since not all my images are the same dimensions, I'm not sure how to account for that.
    Anyone have any thoughts? I also have Photoshop, but as a novice, I've found Fireworks to be a little more intuitive for some of these basic commands, particularly batch processes.
    Any help would be appreciated. Thanks so much!
    Jeremy

    It seems tricker than one might expect to create square thumbnails!
    I'm a little confused by the results you're describing. When I try using Modify > Canvas > Canvas Size to crop a document, the result appears in the History panel as "Crop Document". If I select that step and choose "Copy Steps to Clipboard", then paste the results in a text file, I get something like this:
    fw.getDocumentDOM().setDocumentCanvasSize({left:16, top:0, right:141, bottom:125}, true);
    This reveals that the canvas is being cropped according to a specific bounding rectangle that may or may not be a great fit for all the other images being processed (depending on their widths). For a more foolproof result, a rectangle like {left:0, top:0, right:125, bottom:125} would be a better choice; however, aesthetically, I'd personally prefer that images be cropped from the center, not the left side.
    If I had something better to suggest here, I would. It might be worth checking out Photoshop to see if this type of operation is any easier. Here's one online tutorial on the subject: http://demosthenes.info/blog/347/PhotoShop-Batch-Processing-Generating-Image-Thumbnails-vi a-Automated-Crop-&-Resize

  • How to center an Image exported as EPS?

    Hello,
    Does anyone know how a good way to center an image on the page when exporting as EPS via a javascript from AI CS3?
    Here's the workflow:
    Open native AI File with multiple layers
    Make only the layer being exported visible
    Export the layer as EPS using export parameters
    Repeat until all layers are exported
    As it stands now, each image is exported as it was placed on the original AI file. I would like to center the image on the page before exporting.
    Best,
    Don

    Hi Sneedbreedley, welcome back to the forums.
    To center elements, you need just 3 things:
    valid document type (DW does this for you when you create a new page).
    declared width in pixels, ems or %.
    margin-left and margin-right of auto (browser default).
    To center paragraphs, headings, etc... use text-align:center property.
    CSS:
    body {
    width: 980px;
    margin:0 auto; /**this is centered on screen**/
    .center {text-align:center}
    HTML
    <!doctype html>
    <head>
    <meta charset="utf-8">
    </head>
    <body>
    <h1 class="center">This heading is centered</h1>
    <h2>This heading is not centered</h2>
    <p class="center">Insert image here</p>
    </body>
    </html
    Nancy O.

  • Why are my cropped images not printing at the size I have cropped them to?!

    Hey!
    I know how to crop images to specific sizes using either the rectangular marquee or crop tool. However, I am needing to print a number of small images, so want to compile them into one document to save paper. Once the image is cropped, it shows up in 'image size' as being the required size, however, when I copy and paste it into another document in an attempt to arrange it on a page with other cropped images, the images come out at about half the specified size when I print them.
    Is it to do with the view I am using, because it doesn't seem to matter whether I set it to 'print size' or 'actual pixels'?
    I can't seem to find an answer to this, and I'm sure that I didn't have a problem with this when I was using photoshop more regularly a few years ago!

    Hello,
    You need to ake sure the target document and the source documents have the same"resolution", in other words the same PPI.
    You could also use the Edit>Place command, which will respect the print dimensions of the source photo, but import it as a Smart Object.
    CB

  • Raw editor automatic crop/RESIZE upon open image how to turn ON/OFF?

    Win 7 professional, 64 bit OS. PSE 10, Camera raw 6.7, sony a-700 and a-65 raw images taken at 16:9 RAW setting. I use the setting: 17.8x10 @240 dpi for most of my images in the production of HD Blue Ray movies. Previously(OTHER EARLIER VERSIONS)  I would crop my edited images after processing in the RAW editor, after "Open image" , in full edit mode of PSE 10. However, in previous versions of PSE I do not recall that this cropping/auto sizing automatically takes place when "opening Image". There are times when I would like to do a different crop to select different portions of the original image, especially with my 20+MPX camera images. The auto feature is very helpful/time saving but NOT ALWAYS. In preferences>GENERALTAB  I tried unselecting "ALLOW PHOPTOS TO RESIZE" but this did not stop the feature. How do I turn this feature ON or OFF (preferably easily). It would be a great preference/OR SELECTION  to set in RAW 6.7
    Thanks in advance for any help you can provide me,
    DANSY

    thanks for your input. my pictures are not cropped when opened viaFIX>FULL EDIT>OPENS IN CAMERA RAW.  The crop I have been referring to is when finished editing in ACR  and selecting "open image" this just to clarify my issue.So I did as instructed and found NORMAL was checked and clear crop was greyed out. However, I was still getting  the same results> a cropped image. However it occurred to me that I was selecting a RAW file from a "version set" that has versions cropped  to two different sizes ( 17.7x10 and 5x2.8 approx) so perhaps the raw image had some info in its data base that can cause the crop issue.Don't know.
    if my memory is correct I did not have this issue with previous version of PSE.(with A-700 camera)
    I then used some images from my new camera (A-65), opened in Camera RAW (recognizes image comes from this camera). NOW after editing{BUT NOT CROPPING} and opening image it shows up in FULL EDIT AND IS NOT CROPPED!
    The only thing left to do is shoot some images with my A-700 and see what happens when I repeat the procedure. That will take me a few days as I have to address other committments.
    Any further suggestions are most welcome as I don't think I have got to the root of the issue or am missing something I should know.
    If I don't solve it in the next few days, I will be travelling for 6 weeks (with new camera) and will have lots of pics to process. I hope I can solve the issue before I start processing with new camera files, else if the issue reoccurs with these files I'll just have to live with it.
    Is anyone aware of an ACR "handbook" publication by Adobe??
    Thanks again everyone,
    DAN28SY

  • How do I batch resize images with different aspect ratios?

    How do I batch resize images with different aspect ratios?

    poa66 wrote:
    Landscape: I want result to be 1960 x 1103 px and 72 ppi whether the original is 300 ppi or 220 ppi and wether it is 2Mb or 10 Mb. Cropped centered top and bottom.
    There will be a set of Landscapes that that have a narrower aspect ratio the 1960:1103 that would also need the top and bottom cropped like all Portraits would could be.  You need to realize that center cropping Landscape image that have aspect ratios near 1960:1103 will usually produce acceptable compositions.  However Cropping wide panoramas and portraits will only produce acceptable landscape  1960:1103 composition occasionally.
    Here you will see what happens when image have aspect ratio the do not fit the desired aspect ratio.  Where Landscape  are forced to portrait and portrait forced to Landscape.  Here are two Collage I populated with a mixture of image  with different  aspect ratios.   One collage has all 3:2 Landscape places and the other 2:3 Portrait places.
    I create a 1 image 1960x1103 collage 72dpi and create those too. Note the landscape boy foot is cropped off 3:2 is narrow compared to 1960:1103

  • How do I center a slideshow containing various width images?

    Hello.  I have slideshows on my website that are centered as I like them to be.  But when I click on the thumbnail images that serve as links to open a page containing a slideshow, the image first appears at the left side of the page then quickly moves to the center.  The slideshows contain images of various widths.  I would like that the image appear in the center only.  In the stylesheet, the slideshow styling has the following information...
    .cycle-slideshow {
        width: auto;
        max-height: 650px;
        background: #333;
        margin-bottom: 20px;
        z-index: 50;
    .cycle-slideshow img {
        width: 0 auto;
        max-height: 610px;
        padding-top: 50px;
        opacity: 0;
        filter: alpha(opacity=0);
    In the html code, the head section contains the javascript:
    <script type="text/javascript" src="assets/jquery.cycle2.center.js"></script>
    In the html code, the body section contains the following information for centering horizontally:
    <div class="cycle-slideshow"
        data-cycle-fx=fade
        data-cycle-timeout=0
        data-cycle-caption="#alt-caption"
        data-cycle-caption-template="{{alt}}"
             data-cycle-auto-height=container
          data-cycle-center-horz=true
        data-cycle-center-vert=false>
    My first thought was that the movement was due to the width of the slideshow being too wide.  But adjusting the width according to the widest image didn't work.  The widest image is 772px.  I tried other selectors but they didn't work either.  I would appreciate having your advice.  Thank you very much.

    Hello Nancy 0,
    Thank you for the information.  I didn't know that about the position and z-index.  I made the changes to the css as suggested.  But no change happened.  So I  tried changing the following in my html code so that it would be the same as malsup's sample for comparison...
    data-cycle-fx=fade  to scrollHorz   
    data-cycle-timeout=0  to 2000
    The first image slide still loaded from the left and then centered on the page. Then the image slides scrolled along the page from right to left.  I then saw that Malsup has the example showing towards the bottom of its webpage.  After decreasing the window size, I saw that the first image appears very quickly from the lower left and then to the center as does mine except on a smaller scale.  I've come to the conclusion that this is a normal action for the javascipt function.  But would it be too much to ask if this could be less noticeable?   Also, when I made the changes to my slideshow to scroll, I noticed that as the image slides scrolled out of the slideshow, they extended beyond the slideshow border and even the container div.  I notice that this doesn't happen in the malsup example.  Malsup's image slides are not visible beyond the edge of the background color.  How can I have my slideshow images stop at the edge of the slideshow background color also?  I greatly appreciate your advice.  Thank you very much.
    Noradc

  • How can I dynamically center an image in Crystal Reports?

    Hi! I'm using Visual Studio 2010, SQL Server 2008 R2 and Crystal Reports 13_0_11.
    I have a database full of images type image in SQL Server. Every image has diferent width. 
    I create a report with Crystal Reports and a Dataset and does everything that I want. But I can't horinzotal align the image, in the property window, the horizontal align option is disable, I don't know why... and I don't know what to do... 
    Please help me with how can I center the images or how can I enable the option...

    Hi Fafa0239,
    Since it is related to the Crystal Reports, please post questions related to third-party products in their forums (http://scn.sap.com/thread/3440443).
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I center the image created in my pdf files?

    When I create a pdf file from a windows application and the image has a border around it. Then open the file to view it, the border appears to be shoved to the lower left corner of the opened pdf file image so instead of having a 1/4" border around the page, the border is 0 on the left side and bottom, and 1/2" on the right side and top. It prints this way also. How can I make Acrobat 8 Standard center my image so the border is the same all the way around? The border is all the way around in the application the document is created in, and when printed from the application it is correct all the way around, but the pdf file is not.

    Terry
    In your windows application, if you can click "center horizontally" and "center vertically" do that. I'm not sure what windows application you're using, but this happens to me when I use Microsoft Office programs.

  • How do I save a photo after I have zoomed in on it?  I want to save the zoom-in as a new photo and can't work out why this doesn't work the same way saving a cropped image, or adjusted image does.  Thank you.

    How do I save an image after I have zoomed in on it?  I can't work out why I can't save a zoom-in the same way
    I can save a cropped image or an adjusted image. Thanks, Lily A.

    Hi Matt, thanks for your reply.  Have realised that Zoom in Iphoto is just  a viewing tool and not an editing tool.
    Was creating beautiful abstractions by zooming in and wanted to create a new image of the result.   Have since discovered that cropping after zooming takes me a little way to where I want to go but it isn't the same effect.  Will perhaps have to try to create it when actually shooting.  Am doing a photoshop course in February and maybe will learn a bit more then, too.  Am pretty much an amateur just finding my way.
    Thanks again,
    Best, Lily

Maybe you are looking for

  • Spry submenu not loading correctly in IE

    Solved: check out this link http://forums.creativecow.net/thread/191/857297 QUESTION: Hi, I am new to spry and this is my first menu. I cannot for the life of me figure out why the submenu will not load correctly in IE. It is loading at the top of th

  • Opening Videos in Flashplayer

    When I arrive at a website on my mac, videos automatically pen, I want them set on "pause" when I arrive. Is that possible?

  • Editable DataGrid won't sort correctly

    This is the weirdest behavior I've ever seen... I am working on a datagrid (editable="true"), and for some reason the thing does not want to sort correctly. It is a basic datagrid with itemrenderers for each column so that we can edit in the grid. So

  • IPhone 5 preorder 2 colors HTC One 1 color weeks later

    Verizon, it's not fair that you are offering the iPhone 5 in two colors (black or white) in pre-order. Yet the HTC One that comes in (Silver, Black, Blue & Red) in only offered in one color, silver. When will you offer more color options?

  • Top-level navigation & workset title

    Hello, I have created a workset with three pages. Is it possible to display only the title of the pages and not the title of the workset in the top-level navigation ? Thanks VC