Fix PHP strict standards
Fix #248 : use better algorithm for thumbnailing
Add filter argument to thumbnail method