write_picture is using public API now