diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2015-08-07 18:12:08 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2015-08-07 16:22:23 +0000 |
commit | ff91fbfa59cf3434efd6da7109bb46856f6a5105 (patch) | |
tree | b5ff06078b988461b8671ed7d32f15c1992f05fa /tests/manual/gifs/tst_gifs.cpp | |
parent | 9e1c673cbcb03744920d3663112177c00af1dacb (diff) |
GifRecorder: add a high quality option.
byzanz-record will heavily optimize colors in certain GIFs. The GIF
generated for BusyIndicator, for example, lost all of its
"transparency" that it has in the source image.
The man page says that the .flv format is lossless, so when
setHighQuality(true) is called, we record a video and then
convert it to a bunch of frames with avconv, then to a GIF with
convert.
Finally, to further optimize the GIF, we could run it through gifsicle,
so I haven't updated any GIFs in the docs yet.
Change-Id: I0ccc5e2258d7c6dac52e464bcd6fb61128541e82
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/manual/gifs/tst_gifs.cpp')
-rw-r--r-- | tests/manual/gifs/tst_gifs.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/manual/gifs/tst_gifs.cpp b/tests/manual/gifs/tst_gifs.cpp index acaa49d4..bb4e5d2a 100644 --- a/tests/manual/gifs/tst_gifs.cpp +++ b/tests/manual/gifs/tst_gifs.cpp @@ -150,6 +150,7 @@ void tst_Gifs::slider() gifRecorder.setDataDirPath(dataDirPath); gifRecorder.setOutputDir(outputDir); gifRecorder.setRecordingDuration(3); + gifRecorder.setHighQuality(true); gifRecorder.setQmlFileName("qtquickcontrols2-slider.qml"); gifRecorder.setView(&view); @@ -267,7 +268,8 @@ void tst_Gifs::busyIndicator() GifRecorder gifRecorder; gifRecorder.setDataDirPath(dataDirPath); gifRecorder.setOutputDir(outputDir); - gifRecorder.setRecordingDuration(4); + gifRecorder.setRecordingDuration(3); + gifRecorder.setHighQuality(true); gifRecorder.setQmlFileName("qtquickcontrols2-busyindicator.qml"); gifRecorder.setView(&view); @@ -284,7 +286,7 @@ void tst_Gifs::busyIndicator() busyIndicator->setProperty("running", true); // 800 ms is the duration of one rotation animation cycle for BusyIndicator. - QTest::qWait(800 * 3); + QTest::qWait(800 * 2); busyIndicator->setProperty("running", false); |