reorganize is_pixel_transparent