Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need a script for squaring images of various sizes please

Guest
Oct 08, 2009 Oct 08, 2009

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

TOPICS
Actions and scripting
685
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guru ,
Oct 08, 2009 Oct 08, 2009

You need Photoshop 7 or higher to use scripting.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 08, 2009 Oct 08, 2009

OK, so if I get 7 or higher is there a script that would do this and could anyone share it with me please?

Thanks,

Dave

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Oct 08, 2009 Oct 08, 2009
LATEST

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 );

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines