Created
April 1, 2026 02:29
-
-
Save jmkim/e6ed2271b8b05f0a0b4d1ba95db6f547 to your computer and use it in GitHub Desktop.
tvg-format.sh output diff for lottie2gif.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tools/lottie2gif/lottie2gif.cpp b/tools/lottie2gif/lottie2gif.cpp | |
| index aa1fe44a..04363501 100644 | |
| --- a/tools/lottie2gif/lottie2gif.cpp | |
| +++ b/tools/lottie2gif/lottie2gif.cpp | |
| @@ -41,20 +41,20 @@ using namespace tvg; | |
| struct App | |
| { | |
| public: | |
| - ~App() { free(full); } // free realpath() or _fullpath() | |
| + ~App() { free(full); } // free realpath() or _fullpath() | |
| private: | |
| - char* full = nullptr; // full path | |
| - uint32_t fps = 30; | |
| - uint32_t width = 600; | |
| - uint32_t height = 600; | |
| - uint8_t r, g, b; //background color | |
| - bool background = false; | |
| + char* full = nullptr; // full path | |
| + uint32_t fps = 30; | |
| + uint32_t width = 600; | |
| + uint32_t height = 600; | |
| + uint8_t r, g, b; // background color | |
| + bool background = false; | |
| - void helpMsg() | |
| - { | |
| - cout << "Usage: \n tvg-lottie2gif [Lottie file] or [Lottie folder] [-r resolution] [-f fps] [-b background color]\n\nExamples: \n $ tvg-lottie2gif input.json\n $ tvg-lottie2gif input.json -r 600x600\n $ tvg-lottie2gif input.json -f 30\n $ tvg-lottie2gif input.json -r 600x600 -f 30\n $ tvg-lottie2gif lottiefolder\n $ tvg-lottie2gif lottiefolder -r 600x600 -f 30 -b fa7410\n\n"; | |
| - } | |
| + void helpMsg() | |
| + { | |
| + cout << "Usage: \n tvg-lottie2gif [Lottie file] or [Lottie folder] [-r resolution] [-f fps] [-b background color]\n\nExamples: \n $ tvg-lottie2gif input.json\n $ tvg-lottie2gif input.json -r 600x600\n $ tvg-lottie2gif input.json -f 30\n $ tvg-lottie2gif input.json -r 600x600 -f 30\n $ tvg-lottie2gif lottiefolder\n $ tvg-lottie2gif lottiefolder -r 600x600 -f 30 -b fa7410\n\n"; | |
| + } | |
| bool validate(string& lottieName) | |
| { | |
| @@ -110,13 +110,13 @@ private: | |
| const char* realPath(const char* path) | |
| { | |
| - free(full); // free previous if exist | |
| + free(full); // free previous if exist | |
| #ifdef _WIN32 | |
| - full = _fullpath(NULL, path, 0); // malloc inside; free'd in destructor | |
| + full = _fullpath(NULL, path, 0); // malloc inside; free'd in destructor | |
| #else | |
| - full = realpath(path, NULL); // malloc inside; free'd in destructor | |
| + full = realpath(path, NULL); // malloc inside; free'd in destructor | |
| #endif | |
| - return full; | |
| + return full; | |
| } | |
| bool isDirectory(const char* path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment