Releases: thorvg/thorvg
ThorVG 0.12.1
This release includes several improvements and minor bug fixes:
- [Lottie] Enhanced feature support for Text elements.
- [Lottie] Corrected the starting position issue in trim path animations.
- [TTF] Resolved an issue with invalid Unicode encoding.
- [SVG] Implemented a workaround for quote checks within quotes, addressing issue. #1892
- [Web] Fixed a problem with animation loading.
- [Web] Improved the 'stop animation' behavior: now stopping an animation resets it to the initial position.
- [Portability] Addressed a compiler type mismatch issue on the STM32 MCU system.
ThorVG 0.12.0
After a period of three months of steadfast commitment, we are pleased to present the latest version of ThorVG. In this newly revised edition, we are eager to showcase a series of significant advancements.
Community & Infrastructure
Firstly, the ThorVG project has become a member of the Contributor-Covenant organization, which represents our commitment to more mature operations as an open-source project. This pledge means that as members, contributors, and leaders, we strive to create a harassment-free participation experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity and orientation. It signifies our intention to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
You can check the ThorVG's Contributor Covenant Code of Conduct.
Secondly, we've introduced GitHub iOS & Android CI to ensure the continuous maintenance of a robust codebase for those system. With this addition, all our code changes will undergo automatic testing and verification on iOS and Android ensuring the reliability of our software.
Thirdly, considering the popularity of ChatGPT and its usefulness, we have established a dedicated channel ThorVGPT for ThorVG. The purpose of this is to collect more focused information related to ThorVG and provide users with more accurate information through training. If you are a user of ChatGPT, we recommend that you access this channel and ask questions related to ThorVG.
Lottie Animation
ThorVG is currently making a lot of effort to support the range of Lottie animation features. Since v0.11, there have been efforts in improving functionality, ensuring stability, and enhancing performance in terms of compatibility. Also, we are reviewing many feature improvements to support advanced functions like Text, Expression, and Layer Effects with the upcoming version releases.
The good news is that ThorVG is now officially integrated with the dotLottie project; as a result, the player is officially powered by the ThorVG rendering engine. DotLottie is an open-source file format that aggregates one or more Lottie files and their associated resources into a single file. These files are ZIP archives compressed using the Deflate compression method and have the file extension '.lottie.' For more details, please refer to this LottieFiles blog.
Performance
The performance has significantly improved due to enhancements in both the numerical computation and image processing in the Sw Raster engine. Particularly, these improvements will be noticeably evident during intensive rendering processes. We have observed that the rendering performance improves by about 12% when simultaneously outputting hundreds of our animations.
Text Rendering
ThorVG has started to support text functionality, with a specific focus on industry-standard scalable fonts (TTF). To facilitate this, ThorVG has introduced a TTF loader that can be optionally included at build time. The feature would add the ThorVG size approximately 9kb in the total.
Although ttf loader is presently limited to basic text rendering in this version, it offers the following capabilities:
- Horizontal layouting with kerning
- Unicode support with utf32(codepoint) after converting the utf8 text string
Please check Text class documentation for more details. https://www.thorvg.org/apis
Loader Cache
Basically, ThorVG populates a loader instance with a given resource to load. Everytime any resources are requested, Renderer will create a designated loader instance to alloc/dealloc the given resource. Sometimes this would be inefficient when the same resources were requested. Therefore, ThorVG has recently implemented a loader cache, which is a caching feature for the loaders. Essentially, this enhancement is designed to conserve memory and improve loading performance by sharing resources among instances when they reference duplicated resources. The introduction of this feature is primarily driven by the needs of the font loader, as Text instances often utilize the same font data resources. This caching effects would affect all the loaders like png and jpg etc. Now ThorVG's performance is more closely aligned with that of a native canvas engine. With this advancement, users no longer need to implement their own caching strategies for managing duplicated resources on a single canvas.
Lottie to Gif Conversion
ThorVG has seamlessly integrated a GIF conversion function into the tvg::Saver, enabling the conversion of Lottie animations into GIF data. This feature supports a 1-bit alpha channel, allowing for either a transparent background or the composition of a specific background image with the GIF. ThorVG now supports both the tracks-API (tvg::Saver) for apps and an executable (lottie2gif) for backend processes. The lottie2gif tool is designed to generate a GIF file directly from a Lottie file.
Please check the ThorVG Readme Lottie to Gif section for more details.
Usage:
lottie2gif [Lottie file] or [Lottie folder] [-r resolution] [-f fps] [-b background color]
Flags:
-r set the output image resolution.
-f specifies the frames per second (fps) for the generated animation.
-b specifies the base background color (RGB in hex). If not specified, the background color will follow the original content.
Examples:
$ lottie2gif input.json
$ lottie2gif input.json -f 30
$ lottie2gif input.json -r 600x600 -f 30
$ lottie2gif lottiefolder
$ lottie2gif lottiefolder -r 600x600
$ lottie2gif lottiefolder -r 600x600 -f 30 -b fa7410
Test-Automation
We’re grateful that we introduced a ThorVG Test Automation project that is a comprehensive rendering test tool designed for the ThorVG Engine. This versatile tool operates seamlessly as both a Graphical User Interface (GUI) and a Command-Line Interface (CLI). Its primary function is to identify rendering errors by performing a meticulous canvas bitmap comparison automatically.Through a sophisticated canvas bitmap comparison, it quickly identifies discrepancies, ensuring the reliability and accuracy of rendered images.
This figure illustrates a brief workflow of the ThorVG test automation.
Meanwhile, our focus should be on improving Lottie animation compatibility by leveraging the extensive resources available on LottieFiles. Similar to our previous efforts, we have initiated testing and improvements, though this process may take several upcoming updates.
To enhance the resilience of ThorVG, our strategy includes the implementation of Continuous Integration (CI) test automation via ThorVG GitHub Actions. The diagram below succinctly illustrates the workflow for ThorVG's CI test automation. This initiative is aimed at proactively identifying and addressing any potential issues that may arise from changes to ThorVG.
You can find the ThorVG Test-Automation here: https://github.com/thorvg/thorvg.test-automation
WebGPU Engine
Lastly, we are currently developing a WebGPU raster engine targeting the next generation of ThorVG, and its feature development has gradually started to be added to the development branch. This engine aims to extend ThorVG's capabilities beyond the Native Platforms we have targeted so far, to Web systems. It is still in a testing phase, making it difficult to utilize this feature currently, but we anticipate that it will soon be available this year as an official feature.
Major enhancements since v0.11
Renderer
- Optimized the Task Scheduler to reduce binary size.
- Improved the internal structure for compact scene-hierarchy traversing.
- Allowed the initialization of multiple engines.
SwEngine
- Optimized the scaled image rasterization.
- Improved trigonometric & image scaler performance.
Lottie
- Updated frame count unit with float type for smoother animations.
- Enabled layer blending feature: #1737
- Optimized the rendering context to enhance memory efficiency and improve performance.
Major bug fixes since...
ThorVG v0.11.6
ThorVG v0.11.5
This release includes fixes for the following bugs:
[SwEngine] Resolved a bug causing strokes to be improperly invisible due to clipping. #1785
[Lottie] Enhanced compatibility in parsing shapes/group JSON data structures.
[Lottie] Rectified an issue with incorrect stroke scaling. #1730
[Lottie] Addressed regression bugs related to masking/clipping stemming from previous caching optimizations.
[Lottie] Corrected the rotation of polystars. #1773
[Portability] Fixed examples binary image(jpg, png, raw, etc) loading issues on Windows OS.
ThorVG 0.11.4
This release includes fixes for the following bugs:
- [Wasm] Fixed a regression bug where animation frames were not properly updated.
- [Lottie] Corrected an issue with incorrect aspect ratio scaling.
- [Lottie] Addressed an issue with the return value when loading fails.
- [Examples] Resolved threading-related memory corruptions.
- [Renderer/Engine] Improved safety measures.
ThorVG 0.11.3
This release includes some performance optimizations and fixes for the following bugs:
- [Renderer] Improved the internal structure for compact scene-hierarchy traversing.
- [SwEngine] Improved trigonometric & image scaler performance.
- [SwEngine] Fixed a loss of image pixels during image down-scaling.
- [Lottie] Updated frame count unit with float type for smoother animations.
- [Lottie] Introduced a static layer scene/clipper for caching effects.
- [Lottie] Enabled layer blending feature: #1737
ThorVG v0.11.2
This release includes fixes for the following bugs:
- [SwEngine] Resolved a default alpha blending bug. #1716
- [JPG] Fixed a regression bug that previously disrupted image decoding. #1705
- [Lottie] Improved handling of stroking outlines to ensure proper overlap. #1642
- [Lottie] Rectified the trimpath functionality to correctly support simultaneous trimpath operations.
ThorVG v0.11.1
This release includes fixes for the following bugs:
- [SwEngine] Enhanced the quality of the dash line corners. #121
- [Lottie] Fixed handling of multiple strokes in one layer. #1642
- [Lottie] Fixed a regression bug causing broken images due to 3D transformation in Lottie. #1698
- [SVG] Fixed a regression bug related to maskContentUnits userSpaceOnUse/objectBoundingBox. #1694
ThorVG v0.11.0
After two months of unwavering dedication, we are delighted to unveil the latest iteration of ThorVG. Within this revamped release, we are eager to introduce a host of significant enhancements.
Lottie Animation
First and foremost, ThorVG has undergone intensive development to offer comprehensive support for Lottie Animation. Lottie Animation is an industry-popular JSON-based vector animation file format that has gained widespread popularity due to its feature revolution and a growing community. With our latest v0.11 release update, ThorVG now proudly provides enhanced support for key features of Lottie Animations:
- Maskings: Create intricate masking effects to reveal or hide parts of your animations, adding depth and complexity to your designs. Lottie supports four types of maskings such as Add, Subtract, Difference, Intersects by matting methods such as Alpha, Inverse Alpha, Luma and Inverse Luma.
- Trimpath: Fine-tune the appearance of your vector paths by controlling their start and end points, enabling smooth and precise animations.Trimpath is particularly effective for representing changes in the path of a line and state transitions over time, especially when it comes to rendering cursive text writing effects.
- Images: Seamlessly integrate raster images such as jpeg and png into your vector animations, allowing for versatile and dynamic visual content. These bitmaps supplement the motion effects when vector drawing is hard to use in your complex design.
- Polygon(Polystar): Effortlessly create geometric shapes and stars with customizable properties, elevating your animation's visual appeal through structural design input parameters (significantly easier to use than individual Bezier curves).
- Repeater: Simplify complex animations by effortlessly duplicating and arranging elements in patterns, streamlining the creation of intricate designs and animations. Typically, this is used to replicate the same pattern effects with a single design source.
Alongside support for essential features, we have significantly improved various aspects of Lottie, enhancing its functionality and stability. Looking ahead, we plan to continue working on supporting advanced features such as Layer effects, Texts, and Expressions, making it even more versatile and sophisticated.
Furthermore, ThorVG ensures compatibility across nearly all platforms and systems, including Web, Android, MacOS, Linux, and Windows, for Lottie animations in the form of a lightweight, standalone single library with a binary size of less than 300KB.
ThorVG Viewer
ThorVG offers a dedicated test tool for showcasing vector resources powered by the ThorVG engine. This tool enables immediate rendering in a web browser using the ThorVG WebAssembly binary, allowing for real-time editing of vector elements. The loader operates locally, ensuring that resources are not uploaded to external servers, thereby safeguarding the copyright of the designer's resources. Now, you can easily test various vector resources, including Lottie files, to see how they perform with the ThorVG engine directly from your browser.
(Link: https://thorvg.github.io/thorvg.viewer/)
CI & Infrastructure
We've changed the git repository name to 'main' from 'master' to promote inclusivity and eliminate potentially offensive language. The term 'master' carries historical connotations that some may find insensitive, and this change aligns with our commitment to creating a more inclusive and welcoming environment for all contributors and users of our codebase.
We've also introduced GitHub MacOS CI to ensure the continuous maintenance of a robust codebase for the MacOS system. With this addition, all our code changes will undergo automatic testing and verification on MacOS, ensuring the reliability of our software.
Lastly, please take note that we have revamped the repository folder structure to make it more intuitive and coherent. The major changes appear as follows:
"thorvg/src/lib" -> "thorvg/src/renderer" (for vector drawing features)
"thorvg/src/lib" -> "thorvg/src/common" (providing essential common functionalities used internally among the renderer and sub-modules)
"thorvg/src/bin" -> "thorvg/src/tools" (housing utility executable tools)
Feature Changes
In this release, tvg::Picture would avoid attempting forceful loading when the given MIME type is not correct. Loading images when the MIME type is incorrect is unnecessary and often results in failure, adding unnecessary processing overhead. Therefore, tvg::Picture should have a clear MIME type assigned by users.
Also, we've changed the behavior of Canvas::clear(false). The canvas::clear(false) now retains the paints, allowing the user to update the next frame more easily without having to recompose the paint list. Previously, clear(false) removed the paint list from the canvas, requiring the user to re-push all of them in the next frame. Now, we offered the Canvas::paints() API (in v0.10), allowing users to modify the paint list directly instead. This change will break compatibility with previous versions of Canvas.
Here are the major enhancements since v0.10:
[SwEngine]
- Properly implemented the 8-bit masking target with 32-bit source images, resolving certain Lottie matting issues.
- Enhanced support for 8-bit colorspace Linear/Radial gradient composition.
- Optimized the colorspace from 32-bit to 8-bit for the add/subtract/difference/intersect mask operations.
[SVG]
- Ensure support for the objectBoundingBox value of clipPathUnits and for the userSpaceOnUse value of maskContentUnits. #429
- Improved support for the focal property of radial gradients. #1555
- Enhanced support for the dash line offset property. #1591
[Lottie]
- Enhanced support for the trimpath feature. #1559
- Ensure proper support for Polystar/Polygon property. #1559
- Ensured proper support for embedded images. #1559
- Added support for the repeater feature. #1559
- Improved support for masking layers. #1559
- Enhanced support for solid color layers.
- Enhanced the coverage of the rounded corner feature.
- Improved support for the focal property of radial gradients.
- Enhanced support for proper hold interpolation.
- Enhanced support for dash-stroking offset and gradient dash stroking.
- Implemented support for 3D transformations.
Here are major bug fixes since v0.10:
[Renderer]
- Fix a composition issue where gradient stroke and a valid fill were handled together. #445
- Resolve a deadlock problem that occurred when a picture embedded another picture's resources.
- Fixed a bezier curve computation error in an exceptional scenario.
- Fixed an issue of a missing stroke miterlimit property copy in duplicated shapes.
[SwEngine]
- Corrected bitmap image color conversion when using a straight alpha premultiplied canvas. #1671
- Resolved an issue with ghost artifacts on single lines caused by zero-sized visual drawing.
- Corrected anti-aliased blending discrepancies in 8-bit colorspace composition.
- Corrected inaccurate subtract/intersect masking behaviors within chain-masking. #1606
- Fixed incorrect anti-aliasing issue when small stroking is overlapped with shapes.
- Improved rendering behavior to display a single dot when a zero-length bezier curve/line is provided with a stroke width. #218
- Fixed invalid memory access of a bitmap surface in a specific case.
[SVG]
- Corrected handling of clips with multiple transformed shapes, and added support for "use" nodes within the clips.
[Lottie]
- Fixed incorrect stroke width scaling propagation.
- Fixed the proper propagation of opacity values during scene rendering.
- Corrected a computation error in precomp time remapping.
- Fixed an issue with incorrect viewport clipping.
- Fixed a crash issue caused by incorrect gradient alpha handling.
- Prevented the display of layers when the frame is out of range.
- Implemented proper error handling for cases of invalid lottie files.
- Fixed an issue where the time-remapping feature was not functioning correctly.
- Corrected the radial gradient type, ensuring it now operates as intended.
- Addressed an issue with dashed strokes, ensuring they are now displayed accurately.
- Significantly improved overall stability for a smoother user experience.
[Portability]
- Resolved a compilation error that occurred when using MingGW, specifically related to the "_USE_MATH_DEFINES" directive...
ThorVG v0.10.7
This release includes fixes for the following issues:
- [Renderer] Fixed a regression deadlock issue related to thread scheduling. #1636
- [SwEngine] Properly implemented the 8-bit masking target with 32-bit source images, resolving certain Lottie matting issues.
- [SwEngine] Fixed a regression bug that previously led to a dash-line infinite-looping problem.
- [SwEngine] Corrected a focal issue in radial gradient filling that was breaking the image in specific cases. #1555
- [Lottie] Fixed incorrect time-remapping logic, ensuring that the last frame is not considered during drawing.
- [Lottie] Addressed an issue with a missing handling GradientFill opacity values.
- [Lottie] Rectified an invalid Precomp view clipping problem.
- [Lottie] Solved an issue with invalid matting results when the matting target is out of the frame range.
- [Lottie] Fixed a parenting issue when the parent is one of the matte target types.
- [Lottie] Addressed an issue with incorrect stroke width scaling propagation.
- [Portability] Fixed compilation issues related to min() and max() for VS2017. #1661