| | |
| | | InputStream portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像 |
| | | InputStream erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码 |
| | | |
| | | // 官方默认头像 |
| | | if (portraitInputStream == null) { |
| | | portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png"); |
| | | } |
| | | |
| | | |
| | | // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片 |
| | | ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, inviteCode); |
| | | |
| | |
| | | InputStream portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像 |
| | | InputStream erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码 |
| | | |
| | | // 官方默认头像 |
| | | if (portraitInputStream == null) { |
| | | portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png"); |
| | | } |
| | | |
| | | // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片 |
| | | ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, |
| | | erCodePostionX, erCodePostionY, erCodeSize, inviteCode); |
| | |
| | | portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png"); |
| | | |
| | | } else { |
| | | |
| | | targetPath = FileUtil.getCacheDir() + "/share_" + uid + "_" + System.currentTimeMillis() + ".jpg"; |
| | | erCodeTempPath = FileUtil.getCacheDir() + "/" + uid + "_" + System.currentTimeMillis() + ".jpg"; |
| | | |
| | |
| | | portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像 |
| | | erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码 |
| | | } |
| | | |
| | | |
| | | // 官方默认头像 |
| | | if (portraitInputStream == null) { |
| | | portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png"); |
| | | } |
| | | |
| | | |
| | | // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片 |
| | | ImageUtil.inviteFriendImgWhitecustom(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, pX, pY, |
| | | size, inviteCode); |
| | |
| | | portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像 |
| | | } |
| | | |
| | | // 官方默认头像 |
| | | if (portraitInputStream == null) { |
| | | portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png"); |
| | | } |
| | | |
| | | // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片 |
| | | ImageUtil.drawInviteToGreet(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, inviteCode, |
| | | content, date); |