imagep(): improve triangles on palette