Commit graph

7 commits

Author SHA1 Message Date
Hermet Park
a12accbc93 updated copyright 2025-01-03 14:32:31 +09:00
Hermet Park
4aaa0dafc4 common: code refactoring
replaced internal string usage with char*
2024-11-08 15:26:04 +09:00
Jinny You
2c6c8d3b21
updated copyright date (#1866) 2023-12-28 10:43:25 +09:00
Hermet Park
561a6d8935 savers: provides a background setting.
Allow users to set a custom background with a saver.

API:
- Result Saver::background(std::unique_ptr<Paint> paint);
2023-11-14 10:47:52 +09:00
JunsuChoi
d03bf7a089 saver GifSaver: Introduce GifSaver for animation
Add save() API that takes tvg::Animation as a parameter.
This API uses gif.h to create each animation frame as a gif frame.
Gif creation do not support threads because they must be added sequentially.
Please see example/GifSaver.cpp

ex)
auto animation = tvg::Animation::gen();
auto picture = animation->picture();
picture->load(EXAMPLE_DIR"/walker.json");
auto saver = tvg::Saver::gen();
saver->save(std::move(animation), EXAMPLE_DIR"/test.gif");
saver->sync();

New API:
Result Saver::save(std::unique_ptr<Animation> animation, const std::string& path, uint32_t quality = 100, uint32_t fps = 0);

Issue: https://github.com/thorvg/thorvg/issues/1712
2023-11-02 17:50:27 +09:00
Hermet Park
d879e56856 saver: Revised the API for the 1.0 release
replaced the 'compress' option with 'quality'

API changes:
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path, bool compress) ->
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path, uint32_t quality = 100)

TVG_API Tvg_Result tvg_saver_save(Tvg_Saver* saver, Tvg_Paint* paint, const char* path, bool compress) ->
Tvg_Result tvg_saver_save(Tvg_Saver* saver, Tvg_Paint* paint, const char* path, uint32_t quality)

Issue: #1372
2023-11-02 11:58:23 +09:00
Hermet Park
24711e485c infra: renames the source folders
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00
Renamed from src/lib/tvgSaveModule.h (Browse further)