equal
deleted
inserted
replaced
7 * Tile-based access to large PNG images. |
7 * Tile-based access to large PNG images. |
8 */ |
8 */ |
9 #include <stddef.h> |
9 #include <stddef.h> |
10 #include <stdio.h> // for FILE* |
10 #include <stdio.h> // for FILE* |
11 #include <stdint.h> |
11 #include <stdint.h> |
|
12 #include <sys/types.h> // for time_t |
12 |
13 |
13 /** |
14 /** |
14 * "Global" context shared between images |
15 * "Global" context shared between images |
15 */ |
16 */ |
16 struct pt_ctx; |
17 struct pt_ctx; |
44 |
45 |
45 /** Cache exists, but is stale */ |
46 /** Cache exists, but is stale */ |
46 PT_CACHE_STALE = 2, |
47 PT_CACHE_STALE = 2, |
47 }; |
48 }; |
48 |
49 |
49 /** Metadata info for image */ |
50 /** Metadata info for image. Values will be set to zero if not available */ |
50 struct pt_image_info { |
51 struct pt_image_info { |
51 /** Dimensions of image */ |
52 /** Dimensions of image */ |
52 size_t width, height; |
53 size_t width, height; |
53 |
54 |
|
55 /** Last update of image file */ |
|
56 time_t image_mtime; |
|
57 |
54 /** Size of image file in bytes */ |
58 /** Size of image file in bytes */ |
55 size_t image_bytes; |
59 size_t image_bytes; |
56 |
60 |
|
61 /** Last update of cache file */ |
|
62 time_t cache_mtime; |
|
63 |
57 /** Size of cache file in bytes */ |
64 /** Size of cache file in bytes */ |
58 size_t cache_bytes; |
65 size_t cache_bytes; |
59 |
66 |
60 /** Size of cache file in blocks (for sparse cache files) */ |
67 /** Size of cache file in blocks (for sparse cache files) - 512 bytes / block? */ |
61 size_t cache_blocks; |
68 size_t cache_blocks; |
62 }; |
69 }; |
63 |
70 |
64 /** |
71 /** |
65 * Modifyable params for update |
72 * Modifyable params for update |