Image.as_masked and MaskedImage.as_unmasked, tests