S
S
Senseich2018-10-27 15:25:57
Automation
Senseich, 2018-10-27 15:25:57

What programming language/program can be used to change the image canvas on a computer automatically?

Hello! I want to automate one process on my computer:
- I have a folder on my PC where I drop product images on a white background, but they are all of different orientations (landscape, portrait). I need to make squares out of them, i.e. resize the image canvas. Those. I threw an image of 600x400, then in the program I change the canvas, take a larger value and assign a smaller one, it turns out 600x600. But it takes time, because there are a lot of photos.
There are programs, but there you need to specify the size of the canvas in pixels, but I need the larger of the sizes to be automatically taken and assigned to the smaller one and saved accordingly in jpg.
I think the meaning is clear, share who knows what!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2018-10-27
@Senseich

You can record an Action in Photoshop and automatically convert, say, an entire folder of images.
You can write a simple script in any programming language (including PHP, Python, JavaScript).

M
Moskus, 2018-10-27
@Moskus

You can use IrfanView in batch mode without any programming at all (located in the File menu).
There is also a reduction in the image with a condition on the long side, and a change in the size of the background. A full-featured Photoshop, which also costs money, is not needed at all for such tasks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question