Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Silly script to find interlaced images on Commons (bug 17645)
# silly script to find interlaced images on Commons
cat jpgcommons.txt | # Take list of filenames, one per line
while read line # As long as there is another line to read ...
URL=$(curl "$line&format=xml" | grep -oE '[^"]+');
echo "URL is $URL"
IDEN=$(curl $URL | exiftool -fast2 - | grep -i "Encoding Process")
# "Baseline DCT" only safe JPEG SOF tag, many less common ones are uncertain
if grep -qi "Baseline DCT" <<< $IDEN; then
echo ">>>>>>> $line is not interlaced <<<<<<<" #Only if we found it and exit status is 0
echo ">>>>>>> $line is probably interlaced/progressive <<<<<<<"
echo "$line" >> interlaced-exiftool.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.