From adf12801c9feeb5b24fb6e1ea37f6024494736af Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 22 Jan 2024 18:57:22 +0900 Subject: [PATCH] examples/gif: revise the sample. 60fps takes a bit long time for our daily testing. Removed it for the speed. --- src/examples/GifSaver.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/examples/GifSaver.cpp b/src/examples/GifSaver.cpp index 5eebe398..07a0863a 100644 --- a/src/examples/GifSaver.cpp +++ b/src/examples/GifSaver.cpp @@ -44,31 +44,6 @@ void exportGif() } saver->sync(); cout << "Successfully exported to test.gif." << endl; - - animation = tvg::Animation::gen(); - picture = animation->picture(); - if (picture->load(EXAMPLE_DIR"/walker.json") != tvg::Result::Success) { - cout << "Lottie is not supported. Did you enable Lottie Loader?" << endl; - return; - } - - picture->size(800, 800); - - saver = tvg::Saver::gen(); - - //set a white opaque background - auto bg = tvg::Shape::gen(); - bg->fill(255, 255, 255, 255); - bg->appendRect(0, 0, 800, 800); - - saver->background(std::move(bg)); - - if (saver->save(std::move(animation), "./test_60fps.gif", 100, 60) != tvg::Result::Success) { - cout << "Problem with saving the json file. Did you enable Gif Saver?" << endl; - return; - } - saver->sync(); - cout << "Successfully exported to test_60fps.gif." << endl; }