refactor(vips.h)

master
Tomas Aparicio 11 years ago
parent 6f5f7ff644
commit b55834edf2

@ -186,8 +186,7 @@ vips_watermark(VipsImage *in, VipsImage **out, watermarkTextOptions *to, waterma
NULL) ||
vips_linear1(t[1], &t[2], o->Opacity, 0.0, NULL) ||
vips_cast(t[2], &t[3], VIPS_FORMAT_UCHAR, NULL) ||
vips_embed(t[3], &t[4], 100, 100,
t[3]->Xsize + o->Margin, t[3]->Ysize + o->Margin, NULL)
vips_embed(t[3], &t[4], 100, 100, t[3]->Xsize + o->Margin, t[3]->Ysize + o->Margin, NULL)
) {
g_object_unref(base);
return (1);
@ -198,9 +197,8 @@ vips_watermark(VipsImage *in, VipsImage **out, watermarkTextOptions *to, waterma
vips_replicate(t[4], &t[5],
1 + t[0]->Xsize / t[4]->Xsize,
1 + t[0]->Ysize / t[4]->Ysize, NULL) ||
vips_crop(t[5], &t[6], 0, 0,
t[0]->Xsize, t[0]->Ysize, NULL)
)) {
vips_crop(t[5], &t[6], 0, 0, t[0]->Xsize, t[0]->Ysize, NULL))
) {
g_object_unref(base);
return (1);
}
@ -210,13 +208,8 @@ vips_watermark(VipsImage *in, VipsImage **out, watermarkTextOptions *to, waterma
vips_black(&t[7], 1, 1, NULL) ||
vips_linear( t[7], &t[8], ones, o->Background, 3, NULL) ||
vips_cast(t[8], &t[9], VIPS_FORMAT_UCHAR, NULL) ||
vips_copy(t[9], &t[10],
"interpretation", t[0]->Type,
NULL) ||
vips_embed(t[10], &t[11], 0, 0,
t[0]->Xsize, t[0]->Ysize,
"extend", VIPS_EXTEND_COPY,
NULL)
vips_copy(t[9], &t[10], "interpretation", t[0]->Type, NULL) ||
vips_embed(t[10], &t[11], 0, 0, t[0]->Xsize, t[0]->Ysize, "extend", VIPS_EXTEND_COPY, NULL)
) {
g_object_unref(base);
return (1);

Loading…
Cancel
Save