Define write_image before creating BakerDisplay instance