Commit | Line | Data |
---|---|---|
3719602c PC |
1 | /* Copyright (C) 2010-2020 The RetroArch team |
2 | * | |
3 | * --------------------------------------------------------------------------------------- | |
4 | * The following license statement only applies to this file (rpng_internal.h). | |
5 | * --------------------------------------------------------------------------------------- | |
6 | * | |
7 | * Permission is hereby granted, free of charge, | |
8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
9 | * to deal in the Software without restriction, including without limitation the rights to | |
10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | |
11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
12 | * | |
13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |
16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
21 | */ | |
22 | ||
23 | #ifndef _RPNG_COMMON_H | |
24 | #define _RPNG_COMMON_H | |
25 | ||
26 | #include <stdint.h> | |
27 | #include <filters.h> | |
28 | #include <formats/rpng.h> | |
29 | ||
30 | #ifndef ARRAY_SIZE | |
31 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) | |
32 | #endif | |
33 | ||
34 | static const uint8_t png_magic[8] = { | |
35 | 0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a, | |
36 | }; | |
37 | ||
38 | struct png_ihdr | |
39 | { | |
40 | uint32_t width; | |
41 | uint32_t height; | |
42 | uint8_t depth; | |
43 | uint8_t color_type; | |
44 | uint8_t compression; | |
45 | uint8_t filter; | |
46 | uint8_t interlace; | |
47 | }; | |
48 | ||
49 | #endif |