Rev 8107 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8107 | Rev 8540 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef KOLIBRI_LIBIMG_H |
1 | #ifndef KOLIBRI_LIBIMG_H |
2 | #define KOLIBRI_LIBIMG_H |
2 | #define KOLIBRI_LIBIMG_H |
Line -... | Line 3... | ||
- | 3 | ||
3 | 4 | #include |
|
Line 4... | Line 5... | ||
4 | extern int kolibri_libimg_init(void); |
5 | extern int kolibri_libimg_init(void); |
5 | 6 | ||
6 | //list of format id's |
7 | //list of format id's |
Line 17... | Line 18... | ||
17 | #define LIBIMG_FORMAT_PNM 11 |
18 | #define LIBIMG_FORMAT_PNM 11 |
18 | #define LIBIMG_FORMAT_WBMP 12 |
19 | #define LIBIMG_FORMAT_WBMP 12 |
19 | #define LIBIMG_FORMAT_XBM 13 |
20 | #define LIBIMG_FORMAT_XBM 13 |
20 | #define LIBIMG_FORMAT_Z80 14 |
21 | #define LIBIMG_FORMAT_Z80 14 |
Line -... | Line 22... | ||
- | 22 | ||
- | 23 | #define IMAGE_BPP8i 1 // indexed |
|
- | 24 | #define IMAGE_BPP24 2 |
|
- | 25 | #define IMAGE_BPP32 3 |
|
- | 26 | #define IMAGE_BPP15 4 |
|
- | 27 | #define IMAGE_BPP16 5 |
|
- | 28 | #define IMAGE_BPP1 6 |
|
- | 29 | #define IMAGE_BPP8g 7 // grayscale |
|
- | 30 | #define IMAGE_BPP2i 8 |
|
- | 31 | #define IMAGE_BPP4i 9 |
|
- | 32 | #define IMAGE_BPP8a 10 |
|
21 | 33 | ||
22 | //error codes |
34 | //error codes |
23 | #define LIBIMG_ERROR_OUT_OF_MEMORY 1 |
35 | #define LIBIMG_ERROR_OUT_OF_MEMORY 1 |
24 | #define LIBIMG_ERROR_FORMAT 2 |
36 | #define LIBIMG_ERROR_FORMAT 2 |
25 | #define LIBIMG_ERROR_CONDITIONS 3 |
37 | #define LIBIMG_ERROR_CONDITIONS 3 |
Line 45... | Line 57... | ||
45 | #define ROTATE_180 0x02 |
57 | #define ROTATE_180 0x02 |
46 | #define ROTATE_270_CW 0x03 |
58 | #define ROTATE_270_CW 0x03 |
47 | #define ROTATE_90_CCW ROTATE_270_CW |
59 | #define ROTATE_90_CCW ROTATE_270_CW |
48 | #define ROTATE_270_CCW ROTATE_90_CW |
60 | #define ROTATE_270_CCW ROTATE_90_CW |
Line 49... | Line 61... | ||
49 | 61 | ||
50 | extern void* (*img_decode __attribute__((__stdcall__)))(void *, uint32_t, uint32_t); |
62 | extern void* (*img_decode __attribute__((__stdcall__)))(void* file_data, uint32_t length, uint32_t options); |
51 | extern void* (*img_encode __attribute__((__stdcall__)))(void *, uint32_t, uint32_t); |
63 | extern void* (*img_encode __attribute__((__stdcall__)))(void* image_data, uint32_t length, uint32_t option); |
52 | extern void* (*img_create __attribute__((__stdcall__)))(uint32_t, uint32_t, uint32_t); |
64 | extern void* (*img_create __attribute__((__stdcall__)))(uint32_t width, uint32_t height, uint32_t type); |
53 | extern void (*img_to_rgb2 __attribute__((__stdcall__)))(void *, void *); |
65 | extern void (*img_to_rgb2 __attribute__((__stdcall__)))(void* image_data, void *rgb_data); |
54 | extern void* (*img_to_rgb __attribute__((__stdcall__)))(void *); |
66 | extern void* (*img_to_rgb __attribute__((__stdcall__)))(void *image_data); |
55 | extern uint32_t (*img_flip __attribute__((__stdcall__)))(void *, uint32_t); |
67 | extern uint32_t (*img_flip __attribute__((__stdcall__)))(void* image_data, uint32_t flip); |
56 | extern uint32_t (*img_flip_layer __attribute__((__stdcall__)))(void *, uint32_t); |
68 | extern uint32_t (*img_flip_layer __attribute__((__stdcall__)))(void *image_data, uint32_t flip); |
57 | extern uint32_t (*img_rotate __attribute__((__stdcall__)))(void *, uint32_t); |
69 | extern uint32_t (*img_rotate __attribute__((__stdcall__)))(void* image_data, uint32_t rotate); |
58 | extern uint32_t (*img_rotate_layer __attribute__((__stdcall__)))(void *, uint32_t); |
70 | extern uint32_t (*img_rotate_layer __attribute__((__stdcall__)))(void* image_data, uint32_t rotate); |
59 | extern void (*img_draw __attribute__((__stdcall__)))(void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t ); |
71 | extern void (*img_draw __attribute__((__stdcall__)))(void *image_data, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff, uint32_t yoff); |
60 | extern uint32_t (*img_count __attribute__((__stdcall__)))(void *); |
72 | extern uint32_t (*img_count __attribute__((__stdcall__)))(void *image_data); |
61 | extern uint32_t (*img_destroy __attribute__((__stdcall__)))(void *) ; |
73 | extern uint32_t (*img_destroy __attribute__((__stdcall__)))(void *image_data); |
Line 62... | Line 74... | ||
62 | extern uint32_t (*img_destroy_layer __attribute__((__stdcall__)))(void *); |
74 | extern uint32_t (*img_destroy_layer __attribute__((__stdcall__)))(void* image_data); |