1 | // Copyright 2019 Google LLC. |
2 | // Use of this source code is governed by the BSD-3-Clause license that can be |
3 | // found in the LICENSE.md file. |
4 | |
5 | #ifndef SkGifCodec_DEFINED |
6 | #define SkGifCodec_DEFINED |
7 | |
8 | #include "include/codec/SkCodec.h" |
9 | |
10 | namespace SkGifCodec { |
11 | |
12 | // Returns true if the span of bytes appears to be GIF encoded data. |
13 | bool IsGif(const void*, size_t); |
14 | |
15 | // Assumes IsGif was called and returned true. |
16 | // Reads enough of the stream to determine the image format. |
17 | std::unique_ptr<SkCodec> MakeFromStream(std::unique_ptr<SkStream>, SkCodec::Result*); |
18 | |
19 | } // namespace SkGifCodec |
20 | #endif // SkGifCodec_DEFINED |
21 | |