MCPcopy Create free account
hub / github.com/HelloBush/Java_MHXYdemo / CaptureJpg

Method CaptureJpg

src/pkgDm/Dm2Java.java:1345–1347  ·  view source on GitHub ↗

抓取指定区域(x1, y1, x2, y2)的图像,保存为file(JPG压缩格式) @param x1 区域的左上X坐标 @param y1 区域的左上Y坐标 @param x2 区域的右下X坐标 @param y2 区域的右下Y坐标 @param file 保存的文件名,保存的地方一般为SetPath中设置的目录 当然这里也可以指定全路径名. @param quality jpg压缩比率(1-100) 越大图片质量越好 @return 0: 失败 1:成功

(int x1,int y1,int x2,int y2,String file, int quality)

Source from the content-addressed store, hash-verified

1343 * @return 0: 失败 1:成功
1344 */
1345 public int CaptureJpg(int x1,int y1,int x2,int y2,String file, int quality){
1346 return Dispatch.call(dm,"CaptureJpg",x1, y1, x2, y2, file, quality).getInt();
1347 }
1348
1349 /**
1350 * 同Capture函数,只是保存的格式为PNG.

Callers

nothing calls this directly

Calls 2

callMethod · 0.95
getIntMethod · 0.45

Tested by

no test coverage detected