use colorspace option instead of flatten to keep transparency