私は優れた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()
期待される結果が含まれていません。
どうすればいいですか?
ありがとう