|
@@ -389,7 +389,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
/**
|
|
|
* 旋转图片
|
|
|
*/
|
|
|
- public static BufferedImage rotateImage(BufferedImage bi) {
|
|
|
+ public BufferedImage rotateImage(BufferedImage bi) {
|
|
|
// 获取原图像的宽和高
|
|
|
int width = bi.getWidth();
|
|
|
int height = bi.getHeight();
|
|
@@ -414,7 +414,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
/**
|
|
|
* 缩放图片
|
|
|
*/
|
|
|
- public static void convert(BufferedImage imageNew, String target) {
|
|
|
+ public void convert(BufferedImage imageNew, String target) {
|
|
|
// 宽度保持不变
|
|
|
int subImageWidth = imageNew.getWidth();
|
|
|
int subImageHeight = 14400;
|
|
@@ -475,7 +475,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
* @param mm 毫米
|
|
|
* @return 像素值
|
|
|
*/
|
|
|
- static int mmToPx(double mm) {
|
|
|
+ private int mmToPx(double mm) {
|
|
|
// 因为1英寸等于25.4毫米
|
|
|
return Convert.toInt(Math.round(mm * MaterialsConstant.DPI / 25.4));
|
|
|
}
|
|
@@ -488,7 +488,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
|
|
|
* @param height 缩放后的高
|
|
|
* @return 缩放后的图片
|
|
|
*/
|
|
|
- public static BufferedImage scale(BufferedImage image, int width, int height) {
|
|
|
+ private BufferedImage scale(BufferedImage image, int width, int height) {
|
|
|
Image newImage = ImgUtil.scale(image, width, height);
|
|
|
|
|
|
// 创建一个具有相同尺寸和类型(ARGB)的新BufferedImage
|