dynamically determining the width of the shred

Ported Manuel Ebert's trick from his solution at 
http://portwempreludium.tumblr.com/post/13108758604/instagram-unshredding