Added alphachannel remove and flatten