1/*
2 * LegacyClonk
3 *
4 * Copyright (c) 2017-2019, The LegacyClonk Team and contributors
5 *
6 * Distributed under the terms of the ISC license; see accompanying file
7 * "COPYING" for details.
8 *
9 * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10 * See accompanying file "TRADEMARK" for details.
11 *
12 * To redistribute this file separately, substitute the full license texts
13 * for the above references.
14 */
15
16#pragma once
17
18#include <cstddef>
19#include <cstdint>
20#include <memory>
21
22// JPEG decoding
23class StdJpeg
24{
25public:
26 StdJpeg(const void *fileContents, std::size_t fileSize);
27 ~StdJpeg();
28 // Decodes one row of JPEG data
29 const void *DecodeRow();
30 // Call after reading the last row
31 void Finish();
32
33 std::uint32_t Width() const;
34 std::uint32_t Height() const;
35
36private:
37 struct Impl;
38 const std::unique_ptr<Impl> impl;
39};
40