|
@@ -120,7 +120,12 @@ public class UploadUtil {
|
|
|
public static String getImageThumbUrl(String url, Integer target, Integer width, Integer height) {
|
|
|
return getImageThumbUrl(url, target, width, height, StyleEnums.THUMB_BACKGROUND.getValue());
|
|
|
}
|
|
|
- public static String getImageThumbUrl(String url, Integer target, Integer width, Integer height, String backgroundColor) {
|
|
|
+ public static String getImageThumbUrl(String url, Integer target, Integer width, Integer height,
|
|
|
+ String backgroundColor) {
|
|
|
+ return getImageThumbUrl(url, target, width, height, backgroundColor, false);
|
|
|
+ }
|
|
|
+ public static String getImageThumbUrl(String url, Integer target, Integer width, Integer height,
|
|
|
+ String backgroundColor, Boolean is_importent) {
|
|
|
if (target == -1) {
|
|
|
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
|
|
|
if (width != null) builder.queryParam("w", width);
|
|
@@ -133,7 +138,8 @@ public class UploadUtil {
|
|
|
backgroundColor = "#" + backgroundColor;
|
|
|
String w = (width != null) ? Convert.toStr(width) : "";
|
|
|
String h = (height != null) ? Convert.toStr(height) : "";
|
|
|
- return url + "?imageMogr2/thumbnail/" + w + "x" + h + "/pad/1/color/" + Base64.encode(backgroundColor);
|
|
|
+ return url + "?imageMogr2/thumbnail/" + (w != null ? w : "") + "x" + (h != null ? h : "") +
|
|
|
+ (is_importent ? "!" : "") + "/pad/1/color/" + Base64.encode(backgroundColor);
|
|
|
}
|
|
|
// 抖音云
|
|
|
if (target == 3) {
|