complete pix_buf.c file