Better tests, fixes for leaking RGB->P transparency