Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: not2easy

Filtering images. Is this a manual job?

   
2:00 am on Apr 5, 2009 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Here's my situation

I have approximately 80,000 jpgs. They are sorted into folders in a variety of sizes: 80x80 (large), 40x40 (medium), 20x20 (small), and 10x10 (icon).

many of them, perhaps a few thousand, are real photos. But probably the majority of them are blank - just a black square. A scan gone bad.

I need to delete all the empty ones - remove any jpg image of a plain black square, leaving only the JPGs that are not plain black squares.

What is the quickest way to do this? Say, if I needed it to be finished by tomorrow morning, and it's 9:52pm now, and I still have to do my laundry. How would you do this?

I looked at the folder sorted by file size. I figured if one of the black squares is 809 bytes, then all the images with exactly 809 bytes will be empty ones. But Windows Explorer, for some unfathomable reason, won't show me the exact byte size of the 10x10 files - they all say 1KB,1KB,1KB,1KB,1KB. Same in XP or Vista, I've checked in both.

This should be a simple job, but I'm discovering that it might actually be a long, arduous chore. Any advice warmly welcomed

2:14 am on Apr 5, 2009 (gmt 0)

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Windows Explorer will round file sizes. Drop to run/cmd.exe yourtopfolder/dir /s *.ext > list.txt. Parse list.txt for < x-bytes then run batch to delete. Old school, works a treat.
3:13 am on Apr 5, 2009 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



thanks tangor!

I found a more comfortable way. In Vista, I viewed the folder as "medium icons". Waited a few seconds for all the thumbnails to render, then sorted the view by size. Then it was easy to see a large section on continugous blank squares, select those, and delete.

That method also allowed me to do a full-page visual scan to make sure I wasn't deleting any legit images. The task is finished and it only took me 10 minutes. Now... it'll take an hour to upload them all to my server... now off to do my laundry.

Cheers

4:19 am on Apr 5, 2009 (gmt 0)

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



I keep forgetting about windoze xp-ish thumbs.db (turned off on my systems as I do not find it a practical or necessary "perk"). The litter of files that "perk" creates gives me heebie-jeebies (I do miss my DOS 3.11 and clean tight code and ordinary housecleaning). Meanwhile, I do run ThumbsPlus as my image app that gives me the same visual...without littering the drive with thumbs.db files.

That reminds me. I need to do some laundry myself! :)

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month