如何使用 im4java 创建一个空的透明画布。
使用命令行,我可以这样做:
convert.exe -size "64x32" canvas:transparent out.png
但是使用 im4java,我被卡在 canvas 命令上:
ConvertCmd cmd = new ConvertCmd();
IMOperation io = new IMOperation();
io.size(64,32);
//how to add the canvas command here?
io.addImage(); //output
cmd.run(io, "out.png");
但这只会引发无法找到 out.png 的错误。所以我假设它想用它作为输入图像。
如何创建新图像?