feat(core): 非标分辨率改为每1024px一档并扩展至19K
This commit is contained in:
+243
-33
@@ -154,27 +154,47 @@ func handleGifImage(path string) {
|
||||
// 处理垂直图片
|
||||
func handleVerticalImage(currentImagePath string, height int) {
|
||||
// 非标规格
|
||||
if height < 1000 {
|
||||
if height < 1024 {
|
||||
vars.ImageVerticalNormalList = append(vars.ImageVerticalNormalList, currentImagePath)
|
||||
} else if height < 2000 {
|
||||
} else if height < 2048 {
|
||||
vars.ImageVertical1KList = append(vars.ImageVertical1KList, currentImagePath)
|
||||
} else if height < 3000 {
|
||||
} else if height < 3072 {
|
||||
vars.ImageVertical2KList = append(vars.ImageVertical2KList, currentImagePath)
|
||||
} else if height < 4000 {
|
||||
} else if height < 4096 {
|
||||
vars.ImageVertical3KList = append(vars.ImageVertical3KList, currentImagePath)
|
||||
} else if height < 5000 {
|
||||
} else if height < 5120 {
|
||||
vars.ImageVertical4KList = append(vars.ImageVertical4KList, currentImagePath)
|
||||
} else if height < 6000 {
|
||||
} else if height < 6144 {
|
||||
vars.ImageVertical5KList = append(vars.ImageVertical5KList, currentImagePath)
|
||||
} else if height < 7000 {
|
||||
} else if height < 7168 {
|
||||
vars.ImageVertical6KList = append(vars.ImageVertical6KList, currentImagePath)
|
||||
} else if height < 8000 {
|
||||
} else if height < 8192 {
|
||||
vars.ImageVertical7KList = append(vars.ImageVertical7KList, currentImagePath)
|
||||
} else if height < 9000 {
|
||||
} else if height < 9216 {
|
||||
vars.ImageVertical8KList = append(vars.ImageVertical8KList, currentImagePath)
|
||||
} else if height < 10000 {
|
||||
} else if height < 10240 {
|
||||
vars.ImageVertical9KList = append(vars.ImageVertical9KList, currentImagePath)
|
||||
} else if height >= 10000 { // 提示请忽略
|
||||
} else if height < 11264 {
|
||||
vars.ImageVertical10KList = append(vars.ImageVertical10KList, currentImagePath)
|
||||
} else if height < 12288 {
|
||||
vars.ImageVertical11KList = append(vars.ImageVertical11KList, currentImagePath)
|
||||
} else if height < 13312 {
|
||||
vars.ImageVertical12KList = append(vars.ImageVertical12KList, currentImagePath)
|
||||
} else if height < 14336 {
|
||||
vars.ImageVertical13KList = append(vars.ImageVertical13KList, currentImagePath)
|
||||
} else if height < 15360 {
|
||||
vars.ImageVertical14KList = append(vars.ImageVertical14KList, currentImagePath)
|
||||
} else if height < 16384 {
|
||||
vars.ImageVertical15KList = append(vars.ImageVertical15KList, currentImagePath)
|
||||
} else if height < 17408 {
|
||||
vars.ImageVertical16KList = append(vars.ImageVertical16KList, currentImagePath)
|
||||
} else if height < 18432 {
|
||||
vars.ImageVertical17KList = append(vars.ImageVertical17KList, currentImagePath)
|
||||
} else if height < 19456 {
|
||||
vars.ImageVertical18KList = append(vars.ImageVertical18KList, currentImagePath)
|
||||
} else if height < 20480 {
|
||||
vars.ImageVertical19KList = append(vars.ImageVertical19KList, currentImagePath)
|
||||
} else if height >= 20480 { // 提示请忽略
|
||||
vars.ImageVerticalHKList = append(vars.ImageVerticalHKList, currentImagePath)
|
||||
}
|
||||
}
|
||||
@@ -237,27 +257,47 @@ func handleHorizontalImage(currentImagePath string, width int, height int) {
|
||||
return
|
||||
}
|
||||
// 非标规格
|
||||
if width < 1000 {
|
||||
if width < 1024 {
|
||||
vars.ImageHorizontalNormalList = append(vars.ImageHorizontalNormalList, currentImagePath)
|
||||
} else if width < 2000 {
|
||||
} else if width < 2048 {
|
||||
vars.ImageHorizontal1KList = append(vars.ImageHorizontal1KList, currentImagePath)
|
||||
} else if width < 3000 {
|
||||
} else if width < 3072 {
|
||||
vars.ImageHorizontal2KList = append(vars.ImageHorizontal2KList, currentImagePath)
|
||||
} else if width < 4000 {
|
||||
} else if width < 4096 {
|
||||
vars.ImageHorizontal3KList = append(vars.ImageHorizontal3KList, currentImagePath)
|
||||
} else if width < 5000 {
|
||||
} else if width < 5120 {
|
||||
vars.ImageHorizontal4KList = append(vars.ImageHorizontal4KList, currentImagePath)
|
||||
} else if width < 6000 {
|
||||
} else if width < 6144 {
|
||||
vars.ImageHorizontal5KList = append(vars.ImageHorizontal5KList, currentImagePath)
|
||||
} else if width < 7000 {
|
||||
} else if width < 7168 {
|
||||
vars.ImageHorizontal6KList = append(vars.ImageHorizontal6KList, currentImagePath)
|
||||
} else if width < 8000 {
|
||||
} else if width < 8192 {
|
||||
vars.ImageHorizontal7KList = append(vars.ImageHorizontal7KList, currentImagePath)
|
||||
} else if width < 9000 {
|
||||
} else if width < 9216 {
|
||||
vars.ImageHorizontal8KList = append(vars.ImageHorizontal8KList, currentImagePath)
|
||||
} else if width < 10000 {
|
||||
} else if width < 10240 {
|
||||
vars.ImageHorizontal9KList = append(vars.ImageHorizontal9KList, currentImagePath)
|
||||
} else if width >= 10000 { // 提示请忽略
|
||||
} else if width < 11264 {
|
||||
vars.ImageHorizontal10KList = append(vars.ImageHorizontal10KList, currentImagePath)
|
||||
} else if width < 12288 {
|
||||
vars.ImageHorizontal11KList = append(vars.ImageHorizontal11KList, currentImagePath)
|
||||
} else if width < 13312 {
|
||||
vars.ImageHorizontal12KList = append(vars.ImageHorizontal12KList, currentImagePath)
|
||||
} else if width < 14336 {
|
||||
vars.ImageHorizontal13KList = append(vars.ImageHorizontal13KList, currentImagePath)
|
||||
} else if width < 15360 {
|
||||
vars.ImageHorizontal14KList = append(vars.ImageHorizontal14KList, currentImagePath)
|
||||
} else if width < 16384 {
|
||||
vars.ImageHorizontal15KList = append(vars.ImageHorizontal15KList, currentImagePath)
|
||||
} else if width < 17408 {
|
||||
vars.ImageHorizontal16KList = append(vars.ImageHorizontal16KList, currentImagePath)
|
||||
} else if width < 18432 {
|
||||
vars.ImageHorizontal17KList = append(vars.ImageHorizontal17KList, currentImagePath)
|
||||
} else if width < 19456 {
|
||||
vars.ImageHorizontal18KList = append(vars.ImageHorizontal18KList, currentImagePath)
|
||||
} else if width < 20480 {
|
||||
vars.ImageHorizontal19KList = append(vars.ImageHorizontal19KList, currentImagePath)
|
||||
} else if width >= 20480 { // 提示请忽略
|
||||
vars.ImageHorizontalHKList = append(vars.ImageHorizontalHKList, currentImagePath)
|
||||
}
|
||||
}
|
||||
@@ -265,27 +305,47 @@ func handleHorizontalImage(currentImagePath string, width int, height int) {
|
||||
// 处理等比图片
|
||||
func handleSquareImage(currentImagePath string, width int) {
|
||||
// 非标规格
|
||||
if width < 1000 {
|
||||
if width < 1024 {
|
||||
vars.ImageSquareNormalList = append(vars.ImageSquareNormalList, currentImagePath)
|
||||
} else if width < 2000 {
|
||||
} else if width < 2048 {
|
||||
vars.ImageSquare1KList = append(vars.ImageSquare1KList, currentImagePath)
|
||||
} else if width < 3000 {
|
||||
} else if width < 3072 {
|
||||
vars.ImageSquare2KList = append(vars.ImageSquare2KList, currentImagePath)
|
||||
} else if width < 4000 {
|
||||
} else if width < 4096 {
|
||||
vars.ImageSquare3KList = append(vars.ImageSquare3KList, currentImagePath)
|
||||
} else if width < 5000 {
|
||||
} else if width < 5120 {
|
||||
vars.ImageSquare4KList = append(vars.ImageSquare4KList, currentImagePath)
|
||||
} else if width < 6000 {
|
||||
} else if width < 6144 {
|
||||
vars.ImageSquare5KList = append(vars.ImageSquare5KList, currentImagePath)
|
||||
} else if width < 7000 {
|
||||
} else if width < 7168 {
|
||||
vars.ImageSquare6KList = append(vars.ImageSquare6KList, currentImagePath)
|
||||
} else if width < 8000 {
|
||||
} else if width < 8192 {
|
||||
vars.ImageSquare7KList = append(vars.ImageSquare7KList, currentImagePath)
|
||||
} else if width < 9000 {
|
||||
} else if width < 9216 {
|
||||
vars.ImageSquare8KList = append(vars.ImageSquare8KList, currentImagePath)
|
||||
} else if width < 10000 {
|
||||
} else if width < 10240 {
|
||||
vars.ImageSquare9KList = append(vars.ImageSquare9KList, currentImagePath)
|
||||
} else if width >= 10000 {
|
||||
} else if width < 11264 {
|
||||
vars.ImageSquare10KList = append(vars.ImageSquare10KList, currentImagePath)
|
||||
} else if width < 12288 {
|
||||
vars.ImageSquare11KList = append(vars.ImageSquare11KList, currentImagePath)
|
||||
} else if width < 13312 {
|
||||
vars.ImageSquare12KList = append(vars.ImageSquare12KList, currentImagePath)
|
||||
} else if width < 14336 {
|
||||
vars.ImageSquare13KList = append(vars.ImageSquare13KList, currentImagePath)
|
||||
} else if width < 15360 {
|
||||
vars.ImageSquare14KList = append(vars.ImageSquare14KList, currentImagePath)
|
||||
} else if width < 16384 {
|
||||
vars.ImageSquare15KList = append(vars.ImageSquare15KList, currentImagePath)
|
||||
} else if width < 17408 {
|
||||
vars.ImageSquare16KList = append(vars.ImageSquare16KList, currentImagePath)
|
||||
} else if width < 18432 {
|
||||
vars.ImageSquare17KList = append(vars.ImageSquare17KList, currentImagePath)
|
||||
} else if width < 19456 {
|
||||
vars.ImageSquare18KList = append(vars.ImageSquare18KList, currentImagePath)
|
||||
} else if width < 20480 {
|
||||
vars.ImageSquare19KList = append(vars.ImageSquare19KList, currentImagePath)
|
||||
} else if width >= 20480 {
|
||||
vars.ImageSquareHKList = append(vars.ImageSquareHKList, currentImagePath)
|
||||
}
|
||||
}
|
||||
@@ -400,6 +460,56 @@ func moveHorizontalImage(pickerDir string) {
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal9KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal10KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_10K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal10KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal11KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_11K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal11KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal12KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_12K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal12KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal13KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_13K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal13KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal14KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_14K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal14KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal15KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_15K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal15KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal16KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_16K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal16KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal17KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_17K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal17KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal18KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_18K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal18KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontal19KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_19K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageHorizontal19KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageHorizontalHKList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_横屏_原图"
|
||||
util.CreateDir(imageDirPath)
|
||||
@@ -461,6 +571,56 @@ func moveVerticalImage(pickerDir string) {
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical9KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical10KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_10K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical10KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical11KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_11K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical11KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical12KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_12K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical12KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical13KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_13K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical13KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical14KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_14K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical14KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical15KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_15K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical15KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical16KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_16K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical16KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical17KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_17K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical17KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical18KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_18K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical18KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVertical19KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_19K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageVertical19KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageVerticalHKList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_竖屏_原图"
|
||||
util.CreateDir(imageDirPath)
|
||||
@@ -522,6 +682,56 @@ func moveSquareImage(pickerDir string) {
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare9KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare10KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_10K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare10KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare11KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_11K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare11KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare12KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_12K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare12KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare13KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_13K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare13KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare14KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_14K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare14KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare15KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_15K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare15KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare16KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_16K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare16KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare17KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_17K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare17KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare18KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_18K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare18KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquare19KList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_19K"
|
||||
util.CreateDir(imageDirPath)
|
||||
util.DoMoveFileToDir(vars.ImageSquare19KList, imageDirPath)
|
||||
}
|
||||
if len(vars.ImageSquareHKList) > 0 {
|
||||
imageDirPath := pickerDir + pathSeparator + "图片_等比_原图"
|
||||
util.CreateDir(imageDirPath)
|
||||
|
||||
+243
-33
@@ -146,6 +146,56 @@ func moveVerticalVideo(pickerDir string) {
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical9KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical10KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_10k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical10KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical11KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_11k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical11KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical12KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_12k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical12KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical13KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_13k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical13KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical14KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_14k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical14KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical15KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_15k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical15KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical16KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_16k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical16KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical17KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_17k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical17KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical18KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_18k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical18KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical19KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_19k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical19KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVerticalHKList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_原画质"
|
||||
util.CreateDir(videoDirPath)
|
||||
@@ -201,6 +251,56 @@ func moveHorizontalVideo(pickerDir string) {
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal9KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal10KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_10k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal10KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal11KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_11k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal11KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal12KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_12k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal12KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal13KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_13k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal13KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal14KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_14k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal14KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal15KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_15k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal15KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal16KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_16k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal16KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal17KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_17k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal17KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal18KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_18k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal18KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal19KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_19k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal19KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontalHKList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_原画质"
|
||||
util.CreateDir(videoDirPath)
|
||||
@@ -311,6 +411,56 @@ func moveSquareVideo(pickerDir string) {
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare9KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare10KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_10k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare10KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare11KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_11k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare11KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare12KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_12k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare12KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare13KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_13k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare13KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare14KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_14k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare14KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare15KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_15k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare15KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare16KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_16k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare16KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare17KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_17k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare17KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare18KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_18k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare18KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare19KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_19k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare19KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquareHKList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_原画质"
|
||||
util.CreateDir(videoDirPath)
|
||||
@@ -364,27 +514,47 @@ func handleVerticalVideo(currentVideoPath string, height int, suffix string) {
|
||||
vars.VideoVerticalGifList = append(vars.VideoVerticalGifList, currentVideoPath)
|
||||
return
|
||||
}
|
||||
if height < 1000 {
|
||||
if height < 1024 {
|
||||
vars.VideoVerticalNormalList = append(vars.VideoVerticalNormalList, currentVideoPath)
|
||||
} else if height < 2000 {
|
||||
} else if height < 2048 {
|
||||
vars.VideoVertical1KList = append(vars.VideoVertical1KList, currentVideoPath)
|
||||
} else if height < 3000 {
|
||||
} else if height < 3072 {
|
||||
vars.VideoVertical2KList = append(vars.VideoVertical2KList, currentVideoPath)
|
||||
} else if height < 4000 {
|
||||
} else if height < 4096 {
|
||||
vars.VideoVertical3KList = append(vars.VideoVertical3KList, currentVideoPath)
|
||||
} else if height < 5000 {
|
||||
} else if height < 5120 {
|
||||
vars.VideoVertical4KList = append(vars.VideoVertical4KList, currentVideoPath)
|
||||
} else if height < 6000 {
|
||||
} else if height < 6144 {
|
||||
vars.VideoVertical5KList = append(vars.VideoVertical5KList, currentVideoPath)
|
||||
} else if height < 7000 {
|
||||
} else if height < 7168 {
|
||||
vars.VideoVertical6KList = append(vars.VideoVertical6KList, currentVideoPath)
|
||||
} else if height < 8000 {
|
||||
} else if height < 8192 {
|
||||
vars.VideoVertical7KList = append(vars.VideoVertical7KList, currentVideoPath)
|
||||
} else if height < 9000 {
|
||||
} else if height < 9216 {
|
||||
vars.VideoVertical8KList = append(vars.VideoVertical8KList, currentVideoPath)
|
||||
} else if height < 10000 {
|
||||
} else if height < 10240 {
|
||||
vars.VideoVertical9KList = append(vars.VideoVertical9KList, currentVideoPath)
|
||||
} else if height >= 10000 {
|
||||
} else if height < 11264 {
|
||||
vars.VideoVertical10KList = append(vars.VideoVertical10KList, currentVideoPath)
|
||||
} else if height < 12288 {
|
||||
vars.VideoVertical11KList = append(vars.VideoVertical11KList, currentVideoPath)
|
||||
} else if height < 13312 {
|
||||
vars.VideoVertical12KList = append(vars.VideoVertical12KList, currentVideoPath)
|
||||
} else if height < 14336 {
|
||||
vars.VideoVertical13KList = append(vars.VideoVertical13KList, currentVideoPath)
|
||||
} else if height < 15360 {
|
||||
vars.VideoVertical14KList = append(vars.VideoVertical14KList, currentVideoPath)
|
||||
} else if height < 16384 {
|
||||
vars.VideoVertical15KList = append(vars.VideoVertical15KList, currentVideoPath)
|
||||
} else if height < 17408 {
|
||||
vars.VideoVertical16KList = append(vars.VideoVertical16KList, currentVideoPath)
|
||||
} else if height < 18432 {
|
||||
vars.VideoVertical17KList = append(vars.VideoVertical17KList, currentVideoPath)
|
||||
} else if height < 19456 {
|
||||
vars.VideoVertical18KList = append(vars.VideoVertical18KList, currentVideoPath)
|
||||
} else if height < 20480 {
|
||||
vars.VideoVertical19KList = append(vars.VideoVertical19KList, currentVideoPath)
|
||||
} else if height >= 20480 {
|
||||
vars.VideoVerticalHKList = append(vars.VideoVerticalHKList, currentVideoPath)
|
||||
}
|
||||
}
|
||||
@@ -451,27 +621,47 @@ func handleHorizontalVideo(currentVideoPath string, width int, height int, suffi
|
||||
return
|
||||
}
|
||||
// 非标规格
|
||||
if width < 1000 {
|
||||
if width < 1024 {
|
||||
vars.VideoHorizontalNormalList = append(vars.VideoHorizontalNormalList, currentVideoPath)
|
||||
} else if width < 2000 {
|
||||
} else if width < 2048 {
|
||||
vars.VideoHorizontal1KList = append(vars.VideoHorizontal1KList, currentVideoPath)
|
||||
} else if width < 3000 {
|
||||
} else if width < 3072 {
|
||||
vars.VideoHorizontal2KList = append(vars.VideoHorizontal2KList, currentVideoPath)
|
||||
} else if width < 4000 {
|
||||
} else if width < 4096 {
|
||||
vars.VideoHorizontal3KList = append(vars.VideoHorizontal3KList, currentVideoPath)
|
||||
} else if width < 5000 {
|
||||
} else if width < 5120 {
|
||||
vars.VideoHorizontal4KList = append(vars.VideoHorizontal4KList, currentVideoPath)
|
||||
} else if width < 6000 {
|
||||
} else if width < 6144 {
|
||||
vars.VideoHorizontal5KList = append(vars.VideoHorizontal5KList, currentVideoPath)
|
||||
} else if width < 7000 {
|
||||
} else if width < 7168 {
|
||||
vars.VideoHorizontal6KList = append(vars.VideoHorizontal6KList, currentVideoPath)
|
||||
} else if width < 8000 {
|
||||
} else if width < 8192 {
|
||||
vars.VideoHorizontal7KList = append(vars.VideoHorizontal7KList, currentVideoPath)
|
||||
} else if width < 9000 {
|
||||
} else if width < 9216 {
|
||||
vars.VideoHorizontal8KList = append(vars.VideoHorizontal8KList, currentVideoPath)
|
||||
} else if width < 10000 {
|
||||
} else if width < 10240 {
|
||||
vars.VideoHorizontal9KList = append(vars.VideoHorizontal9KList, currentVideoPath)
|
||||
} else if width >= 10000 { // 提示请忽略
|
||||
} else if width < 11264 {
|
||||
vars.VideoHorizontal10KList = append(vars.VideoHorizontal10KList, currentVideoPath)
|
||||
} else if width < 12288 {
|
||||
vars.VideoHorizontal11KList = append(vars.VideoHorizontal11KList, currentVideoPath)
|
||||
} else if width < 13312 {
|
||||
vars.VideoHorizontal12KList = append(vars.VideoHorizontal12KList, currentVideoPath)
|
||||
} else if width < 14336 {
|
||||
vars.VideoHorizontal13KList = append(vars.VideoHorizontal13KList, currentVideoPath)
|
||||
} else if width < 15360 {
|
||||
vars.VideoHorizontal14KList = append(vars.VideoHorizontal14KList, currentVideoPath)
|
||||
} else if width < 16384 {
|
||||
vars.VideoHorizontal15KList = append(vars.VideoHorizontal15KList, currentVideoPath)
|
||||
} else if width < 17408 {
|
||||
vars.VideoHorizontal16KList = append(vars.VideoHorizontal16KList, currentVideoPath)
|
||||
} else if width < 18432 {
|
||||
vars.VideoHorizontal17KList = append(vars.VideoHorizontal17KList, currentVideoPath)
|
||||
} else if width < 19456 {
|
||||
vars.VideoHorizontal18KList = append(vars.VideoHorizontal18KList, currentVideoPath)
|
||||
} else if width < 20480 {
|
||||
vars.VideoHorizontal19KList = append(vars.VideoHorizontal19KList, currentVideoPath)
|
||||
} else if width >= 20480 { // 提示请忽略
|
||||
vars.VideoHorizontalHKList = append(vars.VideoHorizontalHKList, currentVideoPath)
|
||||
}
|
||||
}
|
||||
@@ -482,27 +672,47 @@ func handleSquareVideo(currentVideoPath string, width int, height int, suffix st
|
||||
vars.VideoSquareGifList = append(vars.VideoSquareGifList, currentVideoPath)
|
||||
return
|
||||
}
|
||||
if width < 1000 {
|
||||
if width < 1024 {
|
||||
vars.VideoSquareNormalList = append(vars.VideoSquareNormalList, currentVideoPath)
|
||||
} else if width < 2000 {
|
||||
} else if width < 2048 {
|
||||
vars.VideoSquare1KList = append(vars.VideoSquare1KList, currentVideoPath)
|
||||
} else if width < 3000 {
|
||||
} else if width < 3072 {
|
||||
vars.VideoSquare2KList = append(vars.VideoSquare2KList, currentVideoPath)
|
||||
} else if width < 4000 {
|
||||
} else if width < 4096 {
|
||||
vars.VideoSquare3KList = append(vars.VideoSquare3KList, currentVideoPath)
|
||||
} else if width < 5000 {
|
||||
} else if width < 5120 {
|
||||
vars.VideoSquare4KList = append(vars.VideoSquare4KList, currentVideoPath)
|
||||
} else if width < 6000 {
|
||||
} else if width < 6144 {
|
||||
vars.VideoSquare5KList = append(vars.VideoSquare5KList, currentVideoPath)
|
||||
} else if width < 7000 {
|
||||
} else if width < 7168 {
|
||||
vars.VideoSquare6KList = append(vars.VideoSquare6KList, currentVideoPath)
|
||||
} else if width < 8000 {
|
||||
} else if width < 8192 {
|
||||
vars.VideoSquare7KList = append(vars.VideoSquare7KList, currentVideoPath)
|
||||
} else if width < 9000 {
|
||||
} else if width < 9216 {
|
||||
vars.VideoSquare8KList = append(vars.VideoSquare8KList, currentVideoPath)
|
||||
} else if width < 10000 {
|
||||
} else if width < 10240 {
|
||||
vars.VideoSquare9KList = append(vars.VideoSquare9KList, currentVideoPath)
|
||||
} else if width >= 10000 {
|
||||
} else if width < 11264 {
|
||||
vars.VideoSquare10KList = append(vars.VideoSquare10KList, currentVideoPath)
|
||||
} else if width < 12288 {
|
||||
vars.VideoSquare11KList = append(vars.VideoSquare11KList, currentVideoPath)
|
||||
} else if width < 13312 {
|
||||
vars.VideoSquare12KList = append(vars.VideoSquare12KList, currentVideoPath)
|
||||
} else if width < 14336 {
|
||||
vars.VideoSquare13KList = append(vars.VideoSquare13KList, currentVideoPath)
|
||||
} else if width < 15360 {
|
||||
vars.VideoSquare14KList = append(vars.VideoSquare14KList, currentVideoPath)
|
||||
} else if width < 16384 {
|
||||
vars.VideoSquare15KList = append(vars.VideoSquare15KList, currentVideoPath)
|
||||
} else if width < 17408 {
|
||||
vars.VideoSquare16KList = append(vars.VideoSquare16KList, currentVideoPath)
|
||||
} else if width < 18432 {
|
||||
vars.VideoSquare17KList = append(vars.VideoSquare17KList, currentVideoPath)
|
||||
} else if width < 19456 {
|
||||
vars.VideoSquare18KList = append(vars.VideoSquare18KList, currentVideoPath)
|
||||
} else if width < 20480 {
|
||||
vars.VideoSquare19KList = append(vars.VideoSquare19KList, currentVideoPath)
|
||||
} else if width >= 20480 {
|
||||
vars.VideoSquareHKList = append(vars.VideoSquareHKList, currentVideoPath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user