You are not logged in.

#1 2014-02-14 22:31:55

kopiersperre
Member
Registered: 2011-03-22
Posts: 48

Crop alternating the right/left edge of images

Dear community,
I want to cut the edges of images, but the problem is, that I want to cut the left edge of the pictures 1,3,5 and the right edge of the even numbered pictures. How can I do this?

Offline

#2 2014-02-14 22:50:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Crop alternating the right/left edge of images

Feed the picture list to two slightly different imagemagic (or whatever you use for image cropping) commands, something like

for i in $(seq 1 2 25); do echo foo > $i; done

Offline

#3 2014-02-14 22:54:01

kopiersperre
Member
Registered: 2011-03-22
Posts: 48

Re: Crop alternating the right/left edge of images

I have 200 pictures. How can I get a sequence of even/uneven numbers?

Offline

#4 2014-02-14 22:56:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Crop alternating the right/left edge of images

Doesn't 'seq 1 2 200' and 'seq 2 2 200' work?

Offline

#5 2014-02-15 00:26:24

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Crop alternating the right/left edge of images

If your images are in files numbered 1.jpg 2.jpg 3.jpg etc., the even numbered ones are *[02468].jpg and the odd numbered ones *[13579].jpg.

You haven't described how the images are stored or by what means you intend to crop them, or what language you're using for that matter, so it'll be harder to get more detailed than that.

Offline

Board footer

Powered by FluxBB