Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public WxImgProcAiCropResult aiCrop(String imgUrl, String ratios) throws WxError
ratios = "";
}

final String result = this.service.get(String.format(AI_CROP, imgUrl, ratios), null);
final String result = this.service.post(String.format(AI_CROP, imgUrl, ratios), "");
return WxImgProcAiCropResult.fromJson(result);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public WxImgProcAiCropResult aiCrop(String imgUrl, String ratios) throws WxError
ratios = "";
}

final String result = this.wxMpService.get(String.format(AI_CROP.getUrl(this.wxMpService.getWxMpConfigStorage()),
imgUrl, ratios), null);
final String result = this.wxMpService.post(String.format(AI_CROP.getUrl(this.wxMpService.getWxMpConfigStorage()),
imgUrl, ratios), "");
return WxImgProcAiCropResult.fromJson(result);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ public void testSuperResolution2() throws Exception {

@Test
public void testAiCrop() throws WxErrorException {
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/raw/master/images/qrcodes/mp.png");
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/images/banners/wiki.jpg");
assertThat(result).isNotNull();
System.out.println(result);
}

@Test
public void testAiCrop2() throws WxErrorException {
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/raw/master/images/qrcodes/mp.png", "1,2.35");
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/images/banners/wiki.jpg", "1,2.35");
assertThat(result).isNotNull();
System.out.println(result);
}
Expand Down