mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-14 18:05:55 -07:00
parent
885b315035
commit
d471c49348
5 changed files with 168 additions and 47 deletions
24
vips.h
24
vips.h
|
|
@ -11,6 +11,12 @@ enum types {
|
|||
MAGICK
|
||||
};
|
||||
|
||||
void
|
||||
vips_malloc_cb(VipsObject *object, char *buf)
|
||||
{
|
||||
g_free(buf);
|
||||
};
|
||||
|
||||
int
|
||||
vips_affine_interpolator(VipsImage *in, VipsImage **out, double a, double b, double c, double d, VipsInterpolate *interpolator)
|
||||
{
|
||||
|
|
@ -94,9 +100,27 @@ vips_init_image(void *buf, size_t len, int imageType, VipsImage **out) {
|
|||
#endif
|
||||
}
|
||||
|
||||
if (out != NULL) {
|
||||
// Listen for "postclose" signal to delete input buffer
|
||||
//g_signal_connect(out, "postclose", G_CALLBACK(vips_malloc_cb), buf);
|
||||
}
|
||||
|
||||
return code;
|
||||
};
|
||||
|
||||
int
|
||||
vips_exif_orientation(VipsImage *image) {
|
||||
int orientation = 0;
|
||||
const char **exif;
|
||||
if (
|
||||
vips_image_get_typeof(image, "exif-ifd0-Orientation") != 0 &&
|
||||
!vips_image_get_string(image, "exif-ifd0-Orientation", exif)
|
||||
) {
|
||||
orientation = atoi(exif[0]);
|
||||
}
|
||||
return orientation;
|
||||
};
|
||||
|
||||
int
|
||||
vips_embed_extend(VipsImage *in, VipsImage **out, int left, int top, int width, int height, int extend)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue