Improve the performance of PngWriter._build_image_data_bd1()
Improve the performance of PngWriter._build_image_data_bd2()
Simplify PngWriter._build_image_data_bd1_nt_1udg()