-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimage.h
46 lines (40 loc) · 1.81 KB
/
image.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/********************************************************
* @author Airead Fan <[email protected]> *
* @date 2011 9月 07 09:04:52 CST *
********************************************************
* after studying C 51 days *
* after studying APUE 16 days *
********************************************************/
#ifndef FB_IMAGE_H
#define FB_IMAGE_H
#include "framebuffer.h"
#define IMAGE_FULL_LOCK 1
#define IMAGE_FULL_UNLOCK 0
typedef struct image{
int x; /* xpos */
int y; /* ypos */
int width; /* pix */
int height; /* pix */
float proportionx; /* proportion h*/
float proportiony; /* proportion v*/
int components; /* bytes */
unsigned long imagesize; /* bytes */
unsigned char *imagestart; /* image start */
}FB_IMAGE;
int fb_image_init(FB_IMAGE *imagep, int width, int height, int components);
int fb_image_show(FB *fbp, FB_IMAGE *image);
int fb_imageinfo(FB_IMAGE *imagep);
int fb_image_transform(FB *fbp, FB_IMAGE *imagep, float hs, float vs);
int fb_image_transformm(FB *fbp, FB_IMAGE *imagep, float hs, float vs);
int fb_image_transformm2(FB *fbp, FB_IMAGE *imagep, float hs, float vs);
int fb_image_destory(FB_IMAGE *imagep);
int fb_image_enlarge(FB_IMAGE *imagep, FB_IMAGE *retimgp, float proportionx, float proportiony);
int fb_image_enlarge_setcenter(FB_IMAGE *image, FB_IMAGE *retimgp);
int fb_image_setpos(FB_IMAGE *imagep, int x, int y);
int fb_image_rotate(FB_IMAGE *imagep, FB_IMAGE *retimgp, float radian);
int fb_image_rotate2(FB_IMAGE *imagep, FB_IMAGE *retimgp, float radian);
int fb_image_getmini(FB_IMAGE *imagep, FB_IMAGE *retimgp, int img_width, int img_height);
int fb_image_full_image(FB_IMAGE *imagep, FB_IMAGE *retimgp, int flag);
int fb_image_add_image(FB_IMAGE *imagep, FB_IMAGE *retimgp);
int fb_image_add_image_byline(FB_IMAGE *imagep, FB_IMAGE *retimgp, int line);
#endif