added invert option to bitmap