浏览代码

测试io-1

wuweihao 3 年之前
父节点
当前提交
21654323f1

+ 6 - 6
720yun_local_manage/gis_pano_producer/src/main/java/com/gis/cms/service/impl/ProduceServiceImpl.java

@@ -51,7 +51,7 @@ public class ProduceServiceImpl implements ProducerService {
         Long userId = JwtUtil.getUserId(request.getHeader("token"));
         long start = System.currentTimeMillis();
         // 全景图只支持jpg图片格式
-//        checkImg(file);
+        checkImg(file);
 
         long kb = fileUtils.getSize(file, "kB");
         BaseRuntimeException.isHas((kb/1024) >=120, null, "全景图文件不能超过120MB");
@@ -121,11 +121,11 @@ public class ProduceServiceImpl implements ProducerService {
             BaseRuntimeException.isHas(!jpg, null,  msg);
 
             // 检查2:1图片
-            BufferedImage read = cn.hutool.core.img.ImgUtil.read(file.getInputStream());
-            int width = read.getWidth();
-            int height = read.getHeight();
-            BaseRuntimeException.isHas(!(width/height == 2), null, "非2:1图片");
-            log.info("校验图片完成");
+//            BufferedImage read = cn.hutool.core.img.ImgUtil.read(file.getInputStream());
+//            int width = read.getWidth();
+//            int height = read.getHeight();
+//            BaseRuntimeException.isHas(!(width/height == 2), null, "非2:1图片");
+//            log.info("校验图片完成");
 
         } catch (IOException e) {
             e.printStackTrace();