Move write pixel to MACRO