|
|
@ -78,15 +78,11 @@ public class FocalLengthConfigController { |
|
|
QueryWrapper<FocalLengthConfig> query1=new QueryWrapper<>(); |
|
|
QueryWrapper<FocalLengthConfig> query1=new QueryWrapper<>(); |
|
|
query1.in("config_id",meters); |
|
|
query1.in("config_id",meters); |
|
|
List<FocalLengthConfig> lists=focalLengthConfigService.list(query1); |
|
|
List<FocalLengthConfig> lists=focalLengthConfigService.list(query1); |
|
|
File file1=new File("D:\\images\\images\\img_ori.jpg"); |
|
|
|
|
|
if (!file1.getParentFile().exists()) { |
|
|
|
|
|
file1.getParentFile().mkdirs(); |
|
|
|
|
|
} |
|
|
|
|
|
if(focalLengthConfig.getRotate() == null){ |
|
|
if(focalLengthConfig.getRotate() == null){ |
|
|
focalLengthConfig.setRotate(0); |
|
|
focalLengthConfig.setRotate(0); |
|
|
} |
|
|
} |
|
|
|
|
|
BufferedImage bufferedImage=Files.bytesTobufferedImage(config.getFocalPicture()); |
|
|
BufferedImage bufferedImage=ImageIO.read(file1); |
|
|
|
|
|
int width=bufferedImage.getWidth(); |
|
|
int width=bufferedImage.getWidth(); |
|
|
int height=bufferedImage.getHeight(); |
|
|
int height=bufferedImage.getHeight(); |
|
|
File file = new File("D:\\images\\path\\config"); |
|
|
File file = new File("D:\\images\\path\\config"); |
|
|
@ -183,7 +179,7 @@ public class FocalLengthConfigController { |
|
|
stringBuffer.append("\t\t\t\t").append("\"expected_len\":"+focalLengthConfig.getExpectedLen()+",\n"); |
|
|
stringBuffer.append("\t\t\t\t").append("\"expected_len\":"+focalLengthConfig.getExpectedLen()+",\n"); |
|
|
stringBuffer.append("\t\t\t\t\"padding\":\"0\",\n"); |
|
|
stringBuffer.append("\t\t\t\t\"padding\":\"0\",\n"); |
|
|
stringBuffer.append("\t\t\t\t\"append_from\":\"head\",\n"); |
|
|
stringBuffer.append("\t\t\t\t\"append_from\":\"head\",\n"); |
|
|
stringBuffer.append("\t\t\t\t\"shorten_from\":\"tail\",\n"); |
|
|
stringBuffer.append("\t\t\t\t\"shorten_from\":\"tail\"\n"); |
|
|
stringBuffer.append("\t\t\t},\n"); |
|
|
stringBuffer.append("\t\t\t},\n"); |
|
|
stringBuffer.append("\t\t\t\"scales\": [0.0,0.0,1.0,5.0]\n\t\t},"); |
|
|
stringBuffer.append("\t\t\t\"scales\": [0.0,0.0,1.0,5.0]\n\t\t},"); |
|
|
} else if(config1.getConfigType().equals("5")){ |
|
|
} else if(config1.getConfigType().equals("5")){ |
|
|
|