Cropping images and resizing

I'm trying to take several images, find the largest one and then make sure all the rest are that size and centered in that image with a transparent border/background around them for any space left.
For example:
I have 3 100x100px images and the 4th is 150x120px. I want the first 3 to be the same size as number 4 but not be enlarged, just centered in an image that is the same size as the 4th.
I have hundreds of images to do this to so one at a time isn't a great option, is there a way to make an action to do this? I've had no luck.
So far I've tried using scripts to merge the files as layers into one document, crop the image way bigger than any image will be then trim to hit the border of the largest image. That works fine...but then how can I save those layers back out as their respective png files again?
I'm on CS5 btw.
Thanks.

blanktarget2 wrote:
I'm trying to take several images, find the largest one and then make sure all the rest are that size and centered in that image with a transparent border/background around them for any space left.
To start with depending on your image file mix there may be a basic problem.  If there is a mixture of Landscape and portrait images none of the images you have may not have a width and height that is largest of all  the images.
Photoshop ships with a script you can use that will help you do what you want though.  If you open Photoshop and use menu File>Scripts>Load Files into Stack... you can point its dialog to a folder that has your image collection. This script will load all images in that folder into a single document that will have a canvas size that is as wide as the image with the largest width and as high as the images with the largest height.  None of the layers may be that size and the layers contents may not be centered within this canvas size. However that can easly be done.
The top layer I beleive will be the current target after Load Files into stack runs. Hold down the shift ken and mous click on the bottom layer in the layers palette. All layers should now be targeted.
Then do a select all
then  menu Layers>align layers to selection>Vertical Center
then  menu Layers>align layers to selection>Horizontal Center
All layers will now be centered within the documents canvas size. That would be easy to do in an action.  Now you would need to create a new document with a transparent background  the current canvas size for each  layer and mover a layer centered into it and delete the bottom layer and save a image file in a format that supports transparency.
Once you have your image stack in the proper canvas sized document centered or not you should be able to create an script to create your output files.

Similar Messages

  • How to load images in List from Xml and view the image and resize the image & save in Flex?

    Hi Friends,
    I am new to flex i am doing application for image resizing rotating and save the resize image.
    I want to load the images from xml file to listcontrol and show that images as a icon in the listview,then i want to drag that image to panel that time it should show it original size of the Image.then it allows user to resize ,crop,rotate the image.then i want to save the resize image,when i save the resize image it should replace the original image in the xmllist.
    I am looking for some useful suggession ,if you dont mind want to see some snippet code.
    It will help me to understand the concept.
    Cheers,
    B.Venkatesan

    Not in Crystal Reports Basic for Visual Studio 2008. You'll have to upgrade to CR 2008 (12.x). Then use kbase [1320507|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] as a guide on how to do this.
    Ludek

  • Cropped Images and My Photostream

    Having finally solved the problem images from my iPhone are now uploading to iCloud again..
    Problem now is that images that I have edited on the Phone ( Cropped ) appear un-cropped in My Photostream on the PC
    I use the phone to record images of expense reciepts when travelling and it would be usefull to have acess to the edited version on the PC
    Is there a simple workaround for this ?

    but however they are saved in my library under "events"sorted according to year and date even after 30 days.
    Then you have probably "automatic import" enabled; and your Photo Steam photos are automatically imported into monthly events in your library. The Photos in the monthly events are part of your library and will stay, if the photos are deleted from the Photo Stream.

  • Batch or script cropping, renaming and resizing pdf's

    HELP!
    I'm desperatley looking for a way to do the folowwing in one batch or script with a complete folder of pdf's with printer marks and bleeds:
    Crop
    Create a file of 600*800 pixel on 72dpi with the addition of the word 'groot_' in front of the file name.
    Create a file of 300*400 pixel on 72dpi with the addition of the word 'klein_' in front of the file name.
    I work with CS4 on the mac.
    I have looking for a solution for a couple of days and found a work around:
    Cropping the files in a batch with acrobat.
    Create a 600*800 file with a photoshop script.
    The same thing for the 300*400 file.
    Add the words in front of the files with apple automator.
    This are 5 actions with 3 programs. I'm happy I found some way but I have the idea it could be done alot easier. Best would be with 1 script or batch in 1 program since I have to do this at least once a month and want to be able to instruct others as well without it being to complicated.
    Does anyone have an idea?
    Thanks!!!

    Yes this is doable in one go with script. You don't have to crop the PDF files in Acrobat is you set which PDF box to use with Photoshop's PDF open options. The only things that get a little more tricky are dealing with multi-page PDF's…

  • Photoshop CC: Have a template that I moved image into.  Image is too small.  How do I resize the image while in the template?  Or must I go to original image file and resize there again and again until I get the right fit?

    I have a template that I am able to plug different pictures into at different times.  The problem is that when I plug an image into that template, I find that the image is either too big or too small.  Is there a way to plug the image into the template and resize the image (and not the template itself) OR will I have to go to the file with the original image and resize it there and then try to plug it in to the template to see if it fits------and if it does not fit, go back to the original file with the image and resize it again and see if that fits---and so on and so on...........?  I have tried the" image size" option but it's hit or miss------mostly miss!
    Thanks!

    Read up on Smart Objects. It looks like you have no idea as to how to create and use them.
    Jut create a Smart Object from the layer containing whatever it image it is that you are "plugging into your template".  But you do need to learn the application at its most basic levels.
    Photoshop is a professional level application that makes no apologies for its very long and steep learning curve.  You cannot learn Photoshop in a forum, one question at a time.
    Or is it possible that you don't even have Photoshop proper but the stripped-down Photoshop Elements?"
    If the latter is the case, you're in the wrong forum.  This is not the Elements forum.
    Here's the link to the forum you would want if you're working in Elements.:
    https://forums.adobe.com/community/photoshop_elements/content
    If you do have Photoshop proper, please provide the exact version number of that application and of your OS.
    (edited for clarification)

  • How do import an image into CS3 and resize it?

    Hi, let me say first I know very little of Illustrator C3.  I have a poster that was created by someone else.  I'm supposed to take that image and resize to fit on a pop up banner.  I created a new doc in Ill. with the correct dimensions and copied and pasted the image.  Now how to I get the original image with layers to conform to the new doc. sizing?  I need to take the image and enlarge it and make it fit within the confines of my new doc.  How do I do that without distorting the image.

    Shift, Ctrl and Alt modifier keys offer constraining options in all Adobe programs. Shift will retain proportions, Alt scale from the center etc. and when combined you can scale constrained from the center. anyway, the question is, what you are referring to by "image". Bitmaps as in photographs or other pixel images? Then AI is the wrong choice. You need to do such things in Photoshop. If its a PDF or another AI file, scaling should be no problem. you may just wish to group items before doing so to retain their relative placement within teh group and avoid unpleasant surprises when you only mass-select them.
    Mylenium

  • Need help regarding image scanning from scanner and resizing it...

    Hi,
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!
    Thanks,
    Avinash.
    Edited by: Kalakonda on Jul 24, 2009 8:08 AM

    Kalakonda wrote:
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!So what you are doing is you have a Scanner (hardware: like an HP flatbed scanner) attached to a server that you want to use as a scanning station? Is this the senario that you are talking about?

  • External Image and Text

    hi,
    I need to load an external image and resize it and load also
    external text down of image.
    swi files should be fantastic reponse for me
    thanks in advise
    asap

    Unfortunately the Tecra S2 isn't capable to display the resolution 1400x1050.
    Here are the resolutions you can use.
    Support Resolution/Color(CRT)
    640x480 16bit/32bit colors(Depending on CRT)
    800x600 16bit/32bit colors(Depending on CRT)
    1024x768 16bit/32bit colors(Depending on CRT)
    1280x1024 16bit/32bit colors(Depending on CRT)
    1400x1050 N/A
    1600x1200 16bit/32bit colors(Depending on CRT)
    1920x1440 16bit/32bit colors(Depending on CRT)
    2048x1536 16bit/32bit colors(Depending on CRT)
    May you find an enhanced but not official driver here: http://www.laptopvideo2go.com/enhancer

  • 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

  • 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.

  • When opening an image Photoshop Elements 12 is opening it in Camera Raw, it is not a RAW image and it is cropped How do I uncrop the opened image?

    When I am opening a .jpg image not an actual raw camera image from Elements 12 it is being opened as a camera Raw image and the image is cropped, I can't find anyway to get the image to uncrop or zoom out so that the entire image is visible so that I can actually edit it to something that is useable. The images were taken with an iPad and copied I suspect using the organizer from Elements 11 but I can't be sure. If I could just uncrop the opened image so that the entire image is visible this would not be a big deal.
    Is there a way to uncrop the image that is being opened by Camera Raw? Am I going to have to get my hands on the source of the images (the iPad) and copy the images again using explorer and not let them be copied with the organizer?

    Uncheck the boxes at the bottom of the dialog Scale styles and resample Image so that only constrain proportions is checked. If you the change the resolution box from 240 to 300 you will get back to your original dimensions.
    This is a meaningless thing to do, you still have the exact same number of pixels, you have only changed the metadata number in the file for ppi, and your prints are not affected by this number.
    You could also use the same method to change the dimensions to 6 x 4 or 9 x 6 etc.
    There are some cases (actually most cases) where you need to CROP the photo to change the dimensions, when the aspect ratio of the original photos is different than the aspect ratio of the final photo; the specific case in 99jon's example is the only case you ever want to change dimensions using Image->Resize->Image Size, where the aspect ratio doesn't change from 6x4 to 9x6 (or 12x8 or 18x12 or ...), and even then, you could do the same thing simply by telling the printer the size you want, you don't really need to do anything in PSE.

  • 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

  • Cropping when moving and resizing a cropping rectangle

    I created a program that crops an image and displays the cropped image but I'm trying to add more functionality
    by making it movable and resizable. The rectangle moves and resizes but it only crops an image when user draws the rectangle and not when moved or resized. I know that the X,Y, height and width position of the rectangle would need to be updated but I'm not
    sure how I can accomplish this being new to WPF. Below is my user control "CropControl and the code behind. Also, I'm implementing my code using MVVM framework.
    XAML: 
    <UserControl x:Class="Klein_Tools_Profile_Pic_Generator.CropControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:s="clr-namespace:Klein_Tools_Profile_Pic_Generator"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
    <ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type s:MoveThumb}">
    <Rectangle Fill="Transparent"/>
    </ControlTemplate>
    <!-- ResizeDecorator Template -->
    <ControlTemplate x:Key="ResizeDecoratorTemplate" TargetType="{x:Type Control}">
    <Grid>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeNS" Margin="0 -4 0 0"
    VerticalAlignment="Top"/>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeWE" Margin="-4 0 0 0"
    VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeWE" Margin="0 0 -4 0"
    VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeNS" Margin="0 0 0 -4"
    VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNWSE"
    VerticalAlignment="Top" HorizontalAlignment="Left"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNESW"
    VerticalAlignment="Top" HorizontalAlignment="Right"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNESW"
    VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNWSE"
    VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
    </Grid>
    </ControlTemplate>
    <!-- Designer Item Template-->
    <ControlTemplate x:Key="DesignerItemTemplate" TargetType="ContentControl">
    <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
    <s:MoveThumb Template="{StaticResource MoveThumbTemplate}" Cursor="SizeAll"/>
    <Control Template="{StaticResource ResizeDecoratorTemplate}"/>
    <ContentPresenter Content="{TemplateBinding ContentControl.Content}"/>
    </Grid>
    </ControlTemplate>
    </UserControl.Resources>
    <Canvas x:Name="BackPanel"
    MouseLeftButtonDown="LoadedImage_MouseLeftButtonDown"
    MouseMove="LoadedImage_MouseMove"
    MouseLeftButtonUp="LoadedImage_MouseLeftButtonUp"
    Background="Transparent">
    <ContentControl x:Name="contControl" Visibility="Collapsed"
    Template="{StaticResource DesignerItemTemplate}">
    <Rectangle x:Name="selectionRectangle" Fill="#220000FF"
    IsHitTestVisible="False"/>
    </ContentControl>
    </Canvas>
    </UserControl>
    CODE BEHIND:
    namespace Klein_Tools_Profile_Pic_Generator
    /// <summary>
    /// Interaction logic for CropControl.xaml
    /// </summary>
    public partial class CropControl : UserControl
    private bool isDragging = false;
    private Point anchorPoint = new Point();
    private bool moveRect;
    TranslateTransform trans = null;
    Point originalMousePosition;
    public CropControl()
    InitializeComponent();
    //Register the Dependency Property
    public static readonly DependencyProperty SelectionProperty =
    DependencyProperty.Register("Selection", typeof(Rect), typeof(CropControl), new PropertyMetadata(default(Rect)));
    public Rect Selection
    get { return (Rect)GetValue(SelectionProperty); }
    set { SetValue(SelectionProperty, value); }
    // this is used, to react on changes from ViewModel. If you assign a
    // new Rect in your ViewModel you will have to redraw your Rect here
    private static void OnSelectionChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e)
    Rect newRect = (Rect)e.NewValue;
    Rectangle selectionRectangle = d as Rectangle;
    if (selectionRectangle != null)
    return;
    selectionRectangle.SetValue(Canvas.LeftProperty, newRect.X);
    selectionRectangle.SetValue(Canvas.TopProperty, newRect.Y);
    selectionRectangle.Width = newRect.Width;
    selectionRectangle.Height = newRect.Height;
    private void LoadedImage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    if (isDragging == false)
    anchorPoint.X = e.GetPosition(BackPanel).X;
    anchorPoint.Y = e.GetPosition(BackPanel).Y;
    Canvas.SetZIndex(selectionRectangle, 999);
    isDragging = true;
    BackPanel.Cursor = Cursors.Cross;
    private void LoadedImage_MouseMove(object sender, MouseEventArgs e)
    if (isDragging)
    double x = e.GetPosition(BackPanel).X;
    double y = e.GetPosition(BackPanel).Y;
    contControl.SetValue(Canvas.LeftProperty, Math.Min(x, anchorPoint.X));
    contControl.SetValue(Canvas.TopProperty, Math.Min(y, anchorPoint.Y));
    contControl.Width = Math.Abs(x - anchorPoint.X);
    contControl.Height = Math.Abs(y - anchorPoint.Y);
    if (contControl.Visibility != Visibility.Visible)
    contControl.Visibility = Visibility.Visible;
    private void Image_MouseMove(object sender, MouseEventArgs e)
    if (moveRect)
    trans = selectionRectangle.RenderTransform as TranslateTransform;
    if (trans == null)
    selectionRectangle.RenderTransformOrigin = new Point(0, 0);
    trans = new TranslateTransform();
    selectionRectangle.RenderTransform = trans;
    trans.Y = -(originalMousePosition.Y - e.GetPosition(BackPanel).Y);
    trans.X = -(originalMousePosition.X - e.GetPosition(BackPanel).X);
    e.Handled = false;
    private void LoadedImage_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    if (isDragging)
    isDragging = false;
    if (contControl.Width > 0)
    //Crop.IsEnabled = true;
    //Cut.IsEnabled = true;
    BackPanel.Cursor = Cursors.Arrow;
    contControl.GetValue(Canvas.LeftProperty);
    // Set the Selection to the new rect, when the mouse button has been released
    Selection = new Rect(
    (double)contControl.GetValue(Canvas.LeftProperty),
    (double)contControl.GetValue(Canvas.TopProperty),
    contControl.Width,
    contControl.Height);

    Hello HotSawz,
    The ResizeThumb and MoveThumb is not in your code so I cannot compile. Anyway, it is not the problem.
    Anyway, can you clarify more details about "it only crops an image when user draws the rectangle and not when moved or resized", it is already normal behavoir for you to draw a rectangle and then move it. What kind of action do you want? Do you
    mean some controls like this:
    http://www.codeproject.com/Articles/23158/A-Photoshop-like-Cropping-Adorner-for-WPF
    Best regards,
    Barry
    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 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.

  • Resizing images and canvas

    Help,
    For gallery sumbmissions, I need to resize my image to 1920 by 1920 pixels. In element 3 it was quite simple, but in elements 10 everything has changed. If I try to chang e the image size, it won't let me chang e the pixels, only the size in inches. Then, moving to the canvass and not changing the image size,when changing the canvass, the original image is cropped and I can't fined anyway to match the image size with the change in canvass.
    thanks.
    Charlie

    Turn on Resample Image and then you can change the pixel size.

Maybe you are looking for