我正在为优秀的 Java 绑定工作libvips
使用这个功能一切都很好:
VipsImage *in;
in = vips_image_new_from_file( test.jpg, NULL )
vips_image_write_to_file( in, "out.jpg", NULL )
所以用Java映射:
Pointer vips_image_new_from_file(String filename,String params);
但是当这样的参数时我有一个问题:
VipsImage *in;
VipsImage *out;
vips_invert( in, &out, NULL )
vips_image_write_to_file( out, "out.jpg", NULL )
我努力了:
int vips_resize(Pointer in, PointerByReference out, Double scale, String params);
Pointer in = vips_image_new_from_file("file.png",null);
PointerByReference ptr1 = new PointerByReference();
vips_invert(in, ptr1, null);
vips_image_write_to_file( ptr1.getValue(), "fileout.png", null);
但不起作用。ptr1.getValue()
不包含预期结果。
我该怎么做?
谢谢