Imported Upstream version 0.9.0
[platform/upstream/libjxl.git] / lib / extras / dec / gif.h
1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file.
5
6 #ifndef LIB_EXTRAS_DEC_GIF_H_
7 #define LIB_EXTRAS_DEC_GIF_H_
8
9 // Decodes GIF images in memory.
10
11 #include <stdint.h>
12
13 #include "lib/extras/dec/color_hints.h"
14 #include "lib/extras/packed_image.h"
15 #include "lib/jxl/base/data_parallel.h"
16 #include "lib/jxl/base/span.h"
17 #include "lib/jxl/base/status.h"
18
19 namespace jxl {
20
21 struct SizeConstraints;
22
23 namespace extras {
24
25 bool CanDecodeGIF();
26
27 // Decodes `bytes` into `ppf`. color_hints are ignored.
28 Status DecodeImageGIF(Span<const uint8_t> bytes, const ColorHints& color_hints,
29                       PackedPixelFile* ppf,
30                       const SizeConstraints* constraints = nullptr);
31
32 }  // namespace extras
33 }  // namespace jxl
34
35 #endif  // LIB_EXTRAS_DEC_GIF_H_