feat: support resize and enlarge images

This commit is contained in:
Tomas Aparicio 2015-04-06 02:04:10 +02:00
parent 37dd5f1d27
commit b20ddbb8f3
4 changed files with 212 additions and 33 deletions

23
vips.h
View file

@ -23,13 +23,6 @@ vips_affine_interpolator(VipsImage *in, VipsImage **out, double a, double b, dou
return vips_affine(in, out, a, b, c, d, "interpolate", interpolator, NULL);
};
VipsImage*
vips_image_buffer_seq(void *buf, size_t len)
{
// todo: handle postclose callback
return vips_image_new_from_buffer(buf, len, "access", VIPS_ACCESS_SEQUENTIAL, NULL);
};
int
vips_jpegload_buffer_shrink(void *buf, size_t len, VipsImage **out, int shrink)
{
@ -37,9 +30,9 @@ vips_jpegload_buffer_shrink(void *buf, size_t len, VipsImage **out, int shrink)
};
int
vips_flip_seq(VipsImage *in, VipsImage **out)
vips_flip_custom(VipsImage *in, VipsImage **out, int direction)
{
return vips_flip(in, out, VIPS_DIRECTION_HORIZONTAL, NULL);
return vips_flip(in, out, direction, NULL);
};
int
@ -48,12 +41,6 @@ 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_rotate(VipsImage *in, VipsImage **buf, int angle)
{
@ -84,19 +71,19 @@ vips_exif_orientation(VipsImage *image) {
};
int
vips_embed_extend(VipsImage *in, VipsImage **out, int left, int top, int width, int height, int extend)
vips_embed_custom(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)
vips_colourspace_custom(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)
vips_extract_area_custom(VipsImage *in, VipsImage **out, int left, int top, int width, int height)
{
return vips_extract_area(in, out, left, top, width, height, NULL);
};