home :: new
iTunes Collage

Collage Creation
I wanted to make a collage of all my album art, but I have found out (see notes here) that iTunes makes it harder to get to your album artwork. I scanned the web and found this article at Instructables, but it was meant for Windows only. Somewhere in the comments, an OSX user makes some comments about getting this to work. There is also a link to the iTunes Album Art Extractor (or IAAE). I downloaded that tool, but it broke during the third phase - building the collage. So, I was left with the extracted iTunes cover art, complete with duplicates. There were a couple of links to various collage projects using iPhoto including Mike Matas and Jim Reid's AppleScript of the same. I modified Jim Reid's script (it was intended to output one page) and ended up with 70+ PDF pages. I was thinking about embarking on a way to automate the merging of the PDF files, but I quickly lost interest. I then tried Adobe's Contact Page maker and found it mostly satisfactory, but I had to address the duplicates.

// extracted iTunes files
I used the IAAE

// simple md5 hashes were not producing dupes.  I'm not sure if this is due to extracting images from apples iTunes library
// after a lot of experimentation, I found that the pictures would often have the same strings value 
// even if they didn't have the same hash value ** see below
// this CLI builds the strings equivalent of every file
flameon:/Volumes/extdsk1-b/collage user$ for i in $(find . -type f); do strings $i > ../collage-strings/$i.strings; done

// now, I can use the dupinator script relatively easily on all of the strings representations
flameon:/Volumes/extdsk1-b/collage-strings user$ ../dupinator.py .

// the dupinator reduces my directory down to what it thinks are unique files ***
// i take the list of reduced files and use it as an instruction to copy files of a similar name from the images directory
flameon:/Volumes/extdsk1-b/collage-strings user$ for i in $(ls -1 | sed 's/.strings$//g'); \
do cp ../collage/$i /Volumes/extdsk1-b/collage-keep/; done

// now, i create thumbnails for OSX
flameon:/Volumes/extdsk1-b/collage-keep user$ for i in $(ls -1); do sips -i $i; done

// next, i review the work by hand and delete remaining duplicates
hand selection from here****

// now, i'm creating new names for the files to make the collage distribution random
// otherwise, albums tend to sort together
// this is ok, but I think the picture should be very captivating for a long period of time
flameon:/Volumes/extdsk1-b/collage-keep user$ for i in $(ls -1); do md5 $i >> hashes.txt ; done

// this will actually rename the files
flameon:/Volumes/extdsk1-b/collage-keep user$ awk '{print $2"."$4}' hashes.txt | \
sed 's/(//g' | sed 's/)//g' | awk -F"." '{print "mv "$1 "." $2 " " $3 "." $2}' > mv.sh && chmod +x mv.sh && ./mv.sh

// then, let Photoshop CS3 build my contact sheet
// modify the merged file with the marquee tool
Odd Hashing**
All of these files are the same (see picture), but have different MD5 hashes. I'm not sure what Apple is doing.
MD5 (6763619FBE107921-0C4145008F1ADC9F.jpg) = a464a6f2857989162017b829fc0956ef
MD5 (6763619FBE107921-0C4145008F1ADCA3.jpg) = 8c3dfa21d747b4e42c479ad7523feeb6
MD5 (6763619FBE107921-0C4145008F1ADCA5.jpg) = 3bda79bf0ebfcaf146c964cff40c7b58
MD5 (6763619FBE107921-0C4145008F1ADCA9.jpg) = eeabba1139291139cc879a2ad4d821d4
MD5 (6763619FBE107921-0C4145008F1ADCAB.jpg) = ed33088ff24d9cf432afec308d0bc8b5
MD5 (6763619FBE107921-0C4145008F1ADCB1.jpg) = 218e21ded5105c3ad03573f3e9c74989
MD5 (6763619FBE107921-0C4145008F1ADCEB.jpg) = 77ad82b6478d8fcb250fcde1229abd72
MD5 (6763619FBE107921-0C4145008F1ADCEE.jpg) = 1fe3d04f71d4a904c0dbdee8c7148b7f

Dupinator***
The Dupinator works through file sizes and MD5 hashes. I already found out that MD5 wasn't going to work, but I thought about it and realized that the strings hash output could use the Dupinator. The Dupinator can be downloaded from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362459

Removing Files****
I used Apple+1 view and then scanned for duplicates by hand.

My MacBook Pro has 2 GB of RAM and this is churner project. It eats up resources at nearly every stage. The real file is 30" x 20".

 
search web like this:
here:  movieclub ::  photos ::  aboutus ::  wedding ::  family ::  mo ::  b ::  stats
others:  savoir ::  cow ::  telnet ::  xunux ::  dotpipe ::  foo ::  vball ::  merchandise
hacks:  find a library (add zipcode) »:: gVisit - tracker »:: Trouble Viewing 32 Bit Alpha Channel PNG files? »