| The Following User Says Thank You to Benson For This Useful Post: | ||
|
|
2008-03-25
, 19:15
|
|
|
Posts: 4,708 |
Thanked: 4,649 times |
Joined on Oct 2007
@ Bulgaria
|
#2
|
can grab image size
any size...
|
|
2008-03-25
, 19:19
|
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#3
|
|
|
2008-03-25
, 21:02
|
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#4
|
#!/bin/sh quiver /home/user/MyDocs/.images/driftnet/& sudo /usr/bin/driftnet -i wlan0 -a -d /home/user/MyDocs/.images/driftnet | imagetosser.sh
#!/bin/sh
minpix=300
minsize=1024
if [ "x`which identify`" != x ] ; then
echo `which identify` found!
echo Tossing images less than $minpix pixels.
while true ; do
read img
size=$( expr `identify -format '%w' "$img"` \* `identify -format '%h' "$img"` )
echo $size
if [ $size -lt $minpix ] ; then
echo removing...
rm "$img"
fi
done
else
echo identify not found! using ls
echo Tossing images less than $minsize bytes.
echo
while true ; do
read img
size=$( ls -l "$img" | awk '{print $5}' )
echo $size
if [ $size -lt $minsize ] ; then
echo removing...
rm "$img"
fi
done
fi
|
|
2008-03-25
, 22:00
|
|
Posts: 46 |
Thanked: 15 times |
Joined on Feb 2007
|
#5
|
|
|
2008-03-25
, 22:56
|
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#6
|
|
|
2008-03-25
, 23:28
|
|
Posts: 46 |
Thanked: 15 times |
Joined on Feb 2007
|
#7
|
|
|
2008-03-25
, 23:43
|
|
|
Posts: 31 |
Thanked: 1 time |
Joined on Jan 2008
|
#8
|
|
|
2008-03-26
, 01:03
|
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#9
|
- displays them with a gtk1 window
- saves them to a directory for some other process (e.g. jwz's webcollage) to handle
Since (AFAIK) ITs are gtk2 only, adjunct mode (b) is the way to go, as the binary may be compiled with no gtk support for that purpose.--or--
Quiver works great for handling the output... See the picture where it shows some itT forum avatars. And as new images are snagged, Quiver automatically adds them at the bottom of the film-strip, so no need to refresh or anything.
Enjoy!
To get it running:
p.s. Just had a brilliant idea to exclude "small" images -- if you have imagemagick installed. That's coming up in a few, and I'm open to any suggestions of other apps that can grab image size. (And don't take up 23 MB)