diff --git a/demo/c++/rundemo.cpp b/demo/c++/rundemo.cpp index 9156e90f9..84c67ac3b 100644 --- a/demo/c++/rundemo.cpp +++ b/demo/c++/rundemo.cpp @@ -244,9 +244,9 @@ int main ( int argc , char** argv) agg_renderer ren(m,buf); ren.apply(); - save_to_file("demo.jpg","jpeg",buf.data()); - save_to_file("demo.png","png",buf.data()); - save_to_file("demo256.png","png256",buf.data()); + save_to_file(buf.data(),"demo.jpg","jpeg"); + save_to_file(buf.data(),"demo.png","png"); + save_to_file(buf.data(),"demo256.png","png256"); std::cout << "Three maps have been rendered in the current directory:\n" "- demo.jpg\n" "- demo.png\n"