added support for PIL surfaces