Encapsulate the transparent pixel detection