Avoid silly assignment
Silly assignment was a bug
Removed silly code
Fixed gd calls for windows bitmap images