Java???????????
???????????? ???????[ 2014/12/11 10:48:36 ] ????????JAVA ??? ???????
???????e???????д???Щ??????????????и???????FindPic???????????Χ??????????????????????????????λ?á?
?????????Java?????????????????????
????????????
????????????????A??(????????????B)??
?????????A????????????B???磬????B???????????A????????
?????????????????B?????????????????????????????????в???4?????????????2??????
??????????????????Χ???????????B?????????????????????????????????????????????2??????
???????????????????????BufferedImage??????????????RGB???????????£???BufferedImage????int??????飺
1 /**
2 * ????BufferedImage?????RGB????
3 * @param bfImage
4 * @return
5 */
6 public static int[][] getImageGRB(BufferedImage bfImage) {
7 int width = bfImage.getWidth();
8 int height = bfImage.getHeight();
9 int[][] result = new int[height][width];
10 for (int h = 0; h < height; h++) {
11 for (int w = 0; w < width; w++) {
12 //???getRGB(w?? h)?????????????ARGB????????????????????RGB???????????ARGB?????RGB????bufImg.getRGB(w?? h) & 0xFFFFFF??
13 result[h][w] = bfImage.getRGB(w?? h) & 0xFFFFFF;
14 }
15 }
16 return result;
17 }
?????????????????RGB??????????????????????????????==Ч?????????????????????????0???????????????RGB??????????????
???????渽????????java????
1 package com.jebysun.test.imagefind;
2
3 import java.awt.AWTException;
4 import java.awt.Rectangle;
5 import java.awt.Robot;
6 import java.awt.Toolkit;
7 import java.awt.image.BufferedImage;
8 import java.io.File;
9 import java.io.IOException;
10
11 import javax.imageio.ImageIO;
12 /**
13 * ?????????????
14 * @author Jeby Sun
15 * @date 2014-09-13
16 * @website http://www.jebysun.com
17 */
18 public class ImageFindDemo {
19
20 BufferedImage screenShotImage; //??????
21 BufferedImage keyImage; //?????????
22
23 int scrShotImgWidth; //?????????
24 int scrShotImgHeight; //?????????
25
26 int keyImgWidth; //????????????
27 int keyImgHeight; //????????????
28
29 int[][] screenShotImageRGBData; //??????RGB????
30 int[][] keyImageRGBData; //?????????RGB????
31
32 int[][][] findImgData; //??????????????λ???????????????????
33
34
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11