Subversion Repositories Kolibri OS

Rev

Rev 6457 | Rev 8545 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6453 punk_joker 1
#ifndef KOLIBRI_LIBIMG_H
2
#define KOLIBRI_LIBIMG_H
3
 
6495 punk_joker 4
extern int kolibri_libimg_init(void);
6453 punk_joker 5
 
6457 punk_joker 6
//list of format id's
7
#define LIBIMG_FORMAT_BMP       1
8
#define LIBIMG_FORMAT_ICO       2
9
#define LIBIMG_FORMAT_CUR       3
10
#define LIBIMG_FORMAT_GIF       4
11
#define LIBIMG_FORMAT_PNG       5
12
#define LIBIMG_FORMAT_JPEG      6
13
#define LIBIMG_FORMAT_TGA       7
14
#define LIBIMG_FORMAT_PCX       8
15
#define LIBIMG_FORMAT_XCF       9
16
#define LIBIMG_FORMAT_TIFF      10
17
#define LIBIMG_FORMAT_PNM       11
18
#define LIBIMG_FORMAT_WBMP      12
19
#define LIBIMG_FORMAT_XBM       13
20
#define LIBIMG_FORMAT_Z80       14
21
 
22
//error codes
23
#define LIBIMG_ERROR_OUT_OF_MEMORY      1
24
#define LIBIMG_ERROR_FORMAT             2
25
#define LIBIMG_ERROR_CONDITIONS         3
26
#define LIBIMG_ERROR_BIT_DEPTH          4
27
#define LIBIMG_ERROR_ENCODER            5
28
#define LIBIMG_ERROR_SRC_TYPE           6
29
#define LIBIMG_ERROR_SCALE              7
30
#define LIBIMG_ERROR_INTER              8
31
#define LIBIMG_ERROR_NOT_INPLEMENTED    9
32
#define LIBIMG_ERROR_INVALID_INPUT      10
33
 
34
//encode flags (byte 0x02 of _common option)
35
#define LIBIMG_ENCODE_STRICT_SPECIFIC   0x01
36
#define LIBIMG_ENCODE_STRICT_BIT_DEPTH  0x02
37
#define LIBIMG_ENCODE_DELETE_ALPHA      0x08
38
#define LIBIMG_ENCODE_FLUSH_ALPHA       0x10
39
 
40
 
41
#define FLIP_VERTICAL   0x01
42
#define FLIP_HORIZONTAL 0x02
43
 
44
#define ROTATE_90_CW    0x01
45
#define ROTATE_180      0x02
46
#define ROTATE_270_CW   0x03
47
#define ROTATE_90_CCW   ROTATE_270_CW
48
#define ROTATE_270_CCW  ROTATE_90_CW
49
 
6453 punk_joker 50
extern void* (*img_decode)(void *, uint32_t, uint32_t) __attribute__((__stdcall__));
51
extern void* (*img_encode)(void *, uint32_t, uint32_t) __attribute__((__stdcall__));
52
extern void* (*img_create)(uint32_t, uint32_t, uint32_t) __attribute__((__stdcall__));
53
extern void (*img_to_rgb2)(void *, void *) __attribute__((__stdcall__));
54
extern void* (*img_to_rgb)(void *) __attribute__((__stdcall__));
55
extern uint32_t (*img_flip)(void *, uint32_t) __attribute__((__stdcall__));
56
extern uint32_t (*img_flip_layer)(void *, uint32_t) __attribute__((__stdcall__));
57
extern uint32_t (*img_rotate)(void *, uint32_t) __attribute__((__stdcall__));
58
extern uint32_t (*img_rotate_layer)(void *, uint32_t) __attribute__((__stdcall__));
59
extern void (*img_draw)(void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t	) __attribute__((__stdcall__));
60
extern uint32_t (*img_count)(void *) __attribute__((__stdcall__));
61
extern uint32_t (*img_destroy)(void *) __attribute__((__stdcall__));
62
extern uint32_t (*img_destroy_layer)(void *) __attribute__((__stdcall__));
63
 
64
#endif /* KOLIBRI_LIBIMG_H */