I poked around a project and found code for a thumbnail that's more efficient, so I decided to use it for myself.