forked from DAddYE/vips
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vips.h
95 lines (78 loc) · 2.49 KB
/
vips.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include <stdlib.h>
#include <vips/vips.h>
#include <vips/vips7compat.h>
int
vips_initialize()
{
return vips_init("govips");
}
int
vips_affine_interpolator(VipsImage *in, VipsImage **out, double a, double b, double c, double d, VipsInterpolate *interpolator)
{
return vips_affine(in, out, a, b, c, d, "interpolate", interpolator, NULL);
};
int
vips_jpegload_buffer_seq(void *buf, size_t len, VipsImage **out)
{
return vips_jpegload_buffer(buf, len, out, "access", VIPS_ACCESS_SEQUENTIAL, NULL);
};
int
vips_jpegload_buffer_custom_autorotate(void *buf, size_t len, VipsImage **out)
{
return vips_jpegload_buffer(buf, len, out, "access", VIPS_ACCESS_SEQUENTIAL, "autorotate", TRUE, NULL);
};
int
vips_jpegload_buffer_shrink(void *buf, size_t len, VipsImage **out, int shrink)
{
return vips_jpegload_buffer(buf, len, out, "shrink", shrink, NULL);
};
int
vips_jpegload_buffer_shrink_custom_autorotate(void *buf, size_t len, VipsImage **out, int shrink)
{
return vips_jpegload_buffer(buf, len, out, "shrink", shrink, "autorotate", TRUE, NULL);
};
int
vips_pngload_buffer_seq(void *buf, size_t len, VipsImage **out)
{
return vips_pngload_buffer(buf, len, out, "access", VIPS_ACCESS_SEQUENTIAL, NULL);
};
int
vips_shrink_0(VipsImage *in, VipsImage **out, double xshrink, double yshrink)
{
return vips_shrink(in, out, xshrink, yshrink, NULL);
};
int
vips_copy_0(VipsImage *in, VipsImage **out)
{
return vips_copy(in, out, NULL);
}
int
vips_embed_extend(VipsImage *in, VipsImage **out, int left, int top, int width, int height, int extend)
{
return vips_embed(in, out, left, top, width, height, "extend", extend, NULL);
}
int
vips_colourspace_0(VipsImage *in, VipsImage **out, VipsInterpretation space)
{
return vips_colourspace(in, out, space, NULL);
};
int
vips_extract_area_0(VipsImage *in, VipsImage **out, int left, int top, int width, int height)
{
return vips_extract_area(in, out, left, top, width, height, NULL);
}
int
vips_jpegsave_custom(VipsImage *in, void **buf, size_t *len, int strip, int quality, int interlace)
{
return vips_jpegsave_buffer(in, buf, len, "strip", strip, "Q", quality, "optimize_coding", TRUE, "interlace", interlace, NULL);
}
int
vips_webpsave_custom(VipsImage *in, void **buf, size_t *len, int quality)
{
return vips_webpsave_buffer(in, buf, len, "Q", quality, NULL);
}
int
vips_pngsave_custom(VipsImage *in, void **buf, size_t *len, int strip, int quality, int interlace)
{
return vips_pngsave_buffer(in, buf, len, "interlace", interlace, NULL);
}