I'm using Photoshop, though any image program that can handle this issue and PNGs with transparency I would be open to.

I have a multitude of images of picture frames right now, but they are standardized by overall image size and not interior/framed area size. The trouble arises because not all frames are the same width. I'd like to make the area inside the frame a standard size for all of them so that any image with those dimensions can be placed inside with no extra adjustment.

My best plan of attack right now is to make an object of the desired dimensions, place it in the center of the image, and then transform the frame image to contain it. Then trim the canvas accordingly. This is horribly inefficient.

Any ideas on how to get the internal selected area centered and a standard size would be much appreciated.

Apologies in advance for cross-posting this to Graphic Design as well, but manipulating imagery is not exclusive to photography and it seems that individuals from either place may have the answer I need. I UTFSE and found that cross-posting, if accepted, is accepted when relevant to more than one.

  • \$\begingroup\$ Do you need to keep the images as a whole? or are you allowed to crop them to only contain the desired "frame" ? \$\endgroup\$
    – Dragos
    Dec 18, 2015 at 16:49
  • 1
    \$\begingroup\$ Can you also post a sample image ? \$\endgroup\$
    – Dragos
    Dec 18, 2015 at 16:50
  • \$\begingroup\$ @Dragos I need to keep the entire frame visible, maintain the original aspect ratio of the frame, center and standardize internal framed area, and maintain overall image dimensions. Sample Image \$\endgroup\$ Dec 31, 2015 at 17:30

1 Answer 1


You want to implement an algorithm of image manipulation, you should take a time to learn how to code. This task must go with image frame detection and scale/shift/crop functions.

This can be done in after effects btw, first make all the assets the same size on a photoshop macro or another software, then import into AE like a footage, then you set composition size or mask, then export png sequence.

  • \$\begingroup\$ I have some basic experience with AE, but I can't make all the assets the same size. Different frame sizes and orientations have different aspect ratios, though images for each size have the same long dim. I could do your process for every size and orientation as a separate batch though. Are you saying that AE can: - Detect transparent area in each frame - Scale PNG so that detected area is given size - Repeat for each in the sequence - Output each as PNG with alpha channels? \$\endgroup\$ Dec 31, 2015 at 17:22
  • \$\begingroup\$ @Joe Strouth Since you can write your own plugins / actions / scripts to programs like Photoshop and AE, yes, you can do this and a lot more. The learning curve is somewhat steep if you have no coding background. These are major simple tasks for a image handler. \$\endgroup\$
    – T. Braga
    Jan 1, 2016 at 20:14
  • \$\begingroup\$ Thanks. After reading through the scripting manual for photoshop, a few tools stood out to me as being of use for this purpose (and others). Mind you, I have little to no knowledge of how to implement them, but at least I see the path ahead of me. Finally I have a practical reason to learn how to code! I'll be learning javascript in my free time now. As good a new years goal as any. Even though you didn't solve my problem, you directed me towards learning how to solve it so I'm marking yours as the answer. Thanks \$\endgroup\$ Jan 8, 2016 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.