|
|
@@ -183,7 +183,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
Map<String, String> uploadMap = new HashMap<>();
|
|
|
|
|
|
//切图
|
|
|
- String fragmentCmd = "vips dzsave --tile-size " + tileSize + " " + origFilePath + " " + workPath;
|
|
|
+ String tempFilePath = workPath + "/temp_rotated.v";
|
|
|
+ String autorotCmd = "docker run --rm --security-opt seccomp=unconfined --pids-limit=4096 -v /mnt:/mnt vips:8.15.1 vips autorot " + origFilePath + " " + tempFilePath;
|
|
|
+ CmdUtils.callLine(autorotCmd);
|
|
|
+ String fragmentCmd = "docker run --rm --security-opt seccomp=unconfined --pids-limit=4096 -v /mnt:/mnt vips:8.15.1 vips dzsave --tile-size " + tileSize + " " + tempFilePath + " " + workPath;
|
|
|
+ log.info("fragmentCmd:{}" + fragmentCmd);
|
|
|
CmdUtils.callLine(fragmentCmd);
|
|
|
if(!ComputerUtil.checkComputeCompleted(dziPath, 5, 200)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5052);
|
|
|
@@ -203,7 +207,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
Integer maxSize = height > width ? height : width;
|
|
|
if(maxSize > size){
|
|
|
String thumbnailPath = workPath + "/" + thumbnailName;
|
|
|
- String scaleCmd = "vipsthumbnail " + origFilePath + " -s " + size + " -o " + thumbnailPath;
|
|
|
+ String scaleCmd = "docker run --rm --security-opt seccomp=unconfined --pids-limit=4096 -v /mnt:/mnt vips:8.15.1 vipsthumbnail " + origFilePath + " -s " + size + " -o " + thumbnailPath;
|
|
|
CmdUtils.callLine(scaleCmd);
|
|
|
if(!ComputerUtil.checkComputeCompleted(thumbnailPath, 5, 200)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5052);
|