seems to be IOError, not OSError.
ad hoc support for gif, rgba, grayscale
fix some bugs and created some.