Border to make an image square

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Phil_Rose
Posts: 32
Joined: Wed Aug 28, 2019 7:04 pm

Border to make an image square

Post by Phil_Rose »

Hi all, I am wondering if this is possible and I'm thinking it's probably not. I would like to set up a batch edit to take an image, reduce it to 1000 pixels on the long edge and then add a white border only to top and bottom (in the instance that the image is in landscape mode) or to left and right (if the image is in portrait mode) to make the image square with a white strip affecting that. Does that make sense? I can do this to an single individual image by opening it up and going to Canvas Resize but I don't seem to be up to do this as a batch. Can anybody help? I am attaching an image to show what I mean in Canvas resize.

Thanks very much!
You do not have the required permissions to view the files attached to this post.
Phil_Rose
Posts: 32
Joined: Wed Aug 28, 2019 7:04 pm

Re: Border to make an image square

Post by Phil_Rose »

Never mind! Figured it out. I am a fool!
User avatar
Rick
Posts: 233
Joined: Sat Oct 08, 2005 4:10 pm

Re: Border to make an image square

Post by Rick »

Canvas resize is in the batch commands so you should be able to do it. You will probably have to make 2 batches; one for portrait and one for landscape. I would consider incorporating with a resize as a 1px border is a lot different on a 100 x 100px photo than a 1000 X 1000px
--
Rick
seebop
Posts: 1
Joined: Sat Mar 29, 2025 11:03 pm

Re: Border to make an image square

Post by seebop »

Phil_Rose wrote: Tue Jan 21, 2020 1:20 am Never mind! Figured it out. I am a fool!
Hey, old thread but if you see this would you mind explaining how you did it?
I'm trying to do the exact same thing and can't figure it out. Thanks!