Added support for indexed color images, needs some more work with adam7 and indexed though.