Subversion Repositories Kolibri OS

Rev

Rev 9811 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9811 Rev 9812
Line 2... Line 2...
2
 
2
 
3
#ifndef KOLIBRI_LIBIMG_H
3
#ifndef KOLIBRI_LIBIMG_H
Line 4... Line 4...
4
#define KOLIBRI_LIBIMG_H
4
#define KOLIBRI_LIBIMG_H
-
 
5
 
5
 
6
#include 
Line -... Line 7...
-
 
7
#include 
6
#include 
8
#include 
7
#include 
9
 
8
 
10
 
9
//list of format id's
11
//list of format id's
10
#define LIBIMG_FORMAT_BMP       1
12
#define LIBIMG_FORMAT_BMP       1
Line 93... Line 95...
93
#define ROTATE_180      0x02
95
#define ROTATE_180      0x02
94
#define ROTATE_270_CW   0x03
96
#define ROTATE_270_CW   0x03
95
#define ROTATE_90_CCW   ROTATE_270_CW
97
#define ROTATE_90_CCW   ROTATE_270_CW
96
#define ROTATE_270_CCW  ROTATE_90_CW
98
#define ROTATE_270_CCW  ROTATE_90_CW
Line 97... Line 99...
97
 
99
 
98
extern Image* __stdcall (*img_decode)(void* file_data, uint32_t size, uint32_t b_color);
100
DLLAPI Image* __stdcall img_decode(void* file_data, uint32_t size, uint32_t b_color);
99
extern Image* __stdcall (*img_encode)(Image* img, uint32_t length, uint32_t option);
101
DLLAPI Image* __stdcall img_encode(Image* img, uint32_t length, uint32_t option);
100
extern Image* __stdcall (*img_create)(uint32_t width, uint32_t height, uint32_t type);
102
DLLAPI Image* __stdcall img_create(uint32_t width, uint32_t height, uint32_t type);
101
extern void   __stdcall (*img_to_rgb2)(Image* img, void *rgb_data);
103
DLLAPI void   __stdcall img_to_rgb2(Image* img, void *rgb_data);
102
extern Image* __stdcall (*img_to_rgb)(Image* img);
104
DLLAPI Image* __stdcall img_to_rgb(Image* img);
103
extern bool   __stdcall (*img_flip)(Image* img, uint32_t flip);
105
DLLAPI bool   __stdcall img_flip(Image* img, uint32_t flip);
104
extern bool   __stdcall (*img_flip_layer)(Image *img, uint32_t flip);
106
DLLAPI bool   __stdcall img_flip_layer(Image *img, uint32_t flip);
105
extern bool   __stdcall (*img_rotate)(Image *img, uint32_t rotate);
107
DLLAPI bool   __stdcall img_rotate(Image *img, uint32_t rotate);
106
extern bool   __stdcall (*img_rotate_layer)(Image* data, uint32_t rotate);
108
DLLAPI bool   __stdcall img_rotate_layer(Image* data, uint32_t rotate);
107
extern void   __stdcall (*img_draw)(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff,  uint32_t yoff);
109
DLLAPI void   __stdcall img_draw(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff,  uint32_t yoff);
108
extern int32_t __stdcall (*img_count)(Image *img);
110
DLLAPI int32_t __stdcall img_count(Image *img);
109
extern bool   __stdcall (*img_destroy)(Image *img);
111
DLLAPI bool   __stdcall img_destroy(Image *img);
110
extern bool   __stdcall (*img_destroy_layer)(Image* img);
112
DLLAPI bool   __stdcall img_destroy_layer(Image* img);
111
extern Image* __stdcall (*img_blend)(Image* dst, Image* src, uint32_t out_x, uint32_t out_y, uint32_t in_x, uint32_t in_y, uint32_t width, uint32_t height); 
113
DLLAPI Image* __stdcall img_blend(Image* dst, Image* src, uint32_t out_x, uint32_t out_y, uint32_t in_x, uint32_t in_y, uint32_t width, uint32_t height); 
112
extern Image* __stdcall (*img_convert)(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t); 
114
DLLAPI Image* __stdcall img_convert(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t); 
113
extern Image* __stdcall (*img_resize_data)(Image *src, uint32_t width, uint32_t height);
115
DLLAPI Image* __stdcall img_resize_data(Image *src, uint32_t width, uint32_t height);
Line 114... Line 116...
114
extern Image* __stdcall (*img_scale)(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height);
116
DLLAPI Image* __stdcall img_scale(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height);
115
 
117
 
116
void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){
118
void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){
117
    for (uint32_t i = 0; i < width*height; i++) {
119
    for (uint32_t i = 0; i < width*height; i++) {
118
        img->Data[i] = color;
120
        img->Data[i] = color;
Line 119... Line -...
119
    }
-
 
120
}
-
 
121
 
121
    }