Update masking method for transparent images