Commit cae5276b by 田超

fix bug

parent 890d38c7
...@@ -37,6 +37,10 @@ public class PictureUtil { ...@@ -37,6 +37,10 @@ public class PictureUtil {
public static Color getImagePixel(BufferedImage bi) { public static Color getImagePixel(BufferedImage bi) {
if(bi.getWidth()*bi.getHeight()>10000) {
BufferedImage pic1 = new BufferedImage(60, 60, BufferedImage.TYPE_3BYTE_BGR);
bi = pic1;
}
int width = bi.getWidth(); int width = bi.getWidth();
int height = bi.getHeight(); int height = bi.getHeight();
int sum=width*height; int sum=width*height;
...@@ -45,7 +49,7 @@ public class PictureUtil { ...@@ -45,7 +49,7 @@ public class PictureUtil {
int R = 0; int R = 0;
int G = 0; int G = 0;
int B = 0; int B = 0;
List<String> list=new ArrayList<String>(); List<String> list=new ArrayList<>();
for (int i = minx; i < width; i++) { for (int i = minx; i < width; i++) {
for (int j = miny; j < height; j++) { for (int j = miny; j < height; j++) {
int pixel = bi.getRGB(i, j); int pixel = bi.getRGB(i, j);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment