OK, I think I got it (and yes, this is on a Mac so seq is not available).
#!/bin/bash
LIST="$(ls | awk '{nr++; if (nr % 15 == 0) print $0}' | sort -n -k1.23)"
for i in "$LIST"; do
convert $i -resize 1x480\! ~/Desktop/barcodes/barcode_%04d.jpg
done
The file skipping works by sending the list of ...
Search found 3 matches
- 2011-06-17T14:58:33-07:00
- Forum: Users
- Topic: convert a subset of files in a directory
- Replies: 5
- Views: 10495
- 2011-03-21T10:55:09-07:00
- Forum: Users
- Topic: convert a subset of files in a directory
- Replies: 5
- Views: 10495
Re: convert a subset of files in a directory
OK. That makes sense.
So, I need to dig into shell scripting, eh? I'll see if I can manage to fumble my way through. The script would need to do something like this:
1. Determine number of files in an image sequence in a given directory
2. If there are more than 720 files, divide the actual number ...
So, I need to dig into shell scripting, eh? I'll see if I can manage to fumble my way through. The script would need to do something like this:
1. Determine number of files in an image sequence in a given directory
2. If there are more than 720 files, divide the actual number ...
- 2011-03-18T12:06:32-07:00
- Forum: Users
- Topic: convert a subset of files in a directory
- Replies: 5
- Views: 10495
convert a subset of files in a directory
Say I have a directory with a 1000 item image sequence. If I only want to have ImageMagick convert every other file, how can I do that?
I'm using this command to convert all files in a directory, which works fine:
convert /files/*.dpx -resize 50% small_%04d.jpg
But I'd like to be able to specify ...
I'm using this command to convert all files in a directory, which works fine:
convert /files/*.dpx -resize 50% small_%04d.jpg
But I'd like to be able to specify ...