diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2016-02-04 21:26:28 +0100 |
---|---|---|
committer | Martijn Kaijser <martijn@xbmc.org> | 2016-02-04 21:26:28 +0100 |
commit | ac50f91a5fa3ef13009690b0b0e9473ec295c75b (patch) | |
tree | d0eda7e07629c591cd9b99d1458032c8828912ae | |
parent | ddbd2f33ba838e4f733348e8df194f7baa2ddaba (diff) | |
parent | 7280327095eaaee78c61e5c2599ae173c7901cb6 (diff) |
Merge pull request #9033 from MartijnKaijser/8971
[TexturePacker][gif] The Graphic Control Extension is optional.
-rw-r--r-- | project/BuildDependencies/scripts/0_package.list | 2 | ||||
-rw-r--r-- | tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp | 22 |
2 files changed, 7 insertions, 17 deletions
diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list index 4ce1934db7..fbb76ab8c3 100644 --- a/project/BuildDependencies/scripts/0_package.list +++ b/project/BuildDependencies/scripts/0_package.list @@ -49,5 +49,5 @@ python-2.7.8-win32.7z sqlite-3.8.6-win32-vc120.7z swig-2.0.7-win32-1.7z taglib-1.9.1-patched-win32-vc120.7z -texturepacker-1.0.5-win32.7z +texturepacker-1.0.6-win32.7z tinyxml-2.6.2_3-win32-vc120.7z diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp index d629844399..500d117efd 100644 --- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp +++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp @@ -263,28 +263,19 @@ bool GifHelper::GcbToFrame(GifFrame &frame, unsigned int imgIdx) { #if GIFLIB_MAJOR == 5 GraphicsControlBlock gcb; - if (!DGifSavedExtensionToGCB(m_gif, imgIdx, &gcb)) + if (DGifSavedExtensionToGCB(m_gif, imgIdx, &gcb)) { - fprintf(stderr, "Gif::GcbToFrame(): Could not read GraphicsControlBlock of frame %d in file %s\n", - imgIdx, m_filename.c_str()), GifErrorString(m_gif->Error); - return false; + // delay in ms + frame.m_delay = gcb.DelayTime * 10; + frame.m_disposal = gcb.DisposalMode; + transparent = gcb.TransparentColor; } - // delay in ms - frame.m_delay = gcb.DelayTime * 10; - frame.m_disposal = gcb.DisposalMode; - transparent = gcb.TransparentColor; #else ExtensionBlock* extb = m_gif->SavedImages[imgIdx].ExtensionBlocks; while (extb && extb->Function != GRAPHICS_EXT_FUNC_CODE) extb++; - if (!extb || extb->ByteCount != 4) - { - fprintf(stderr, "Gif::GcbToFrame() : Could not read GraphicsControlBlock of frame %d in file %s\n", - imgIdx, m_filename.c_str()); - return false; - } - else + if (extb && extb->ByteCount == 4) { uint8_t low = static_cast<uint8_t>(extb->Bytes[1]); uint8_t high = static_cast<uint8_t>(extb->Bytes[2]); @@ -297,7 +288,6 @@ bool GifHelper::GcbToFrame(GifFrame &frame, unsigned int imgIdx) else transparent = -1; } - #endif } |