|
|
@ -82,21 +82,21 @@ public class sigPlace { |
|
|
|
final static int TRANSPARENT = new Color(0,0,0,0).getRGB(); |
|
|
|
final static int TRANSPARENT = new Color(0,0,0,0).getRGB(); |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
public static void main(String[] args) { |
|
|
|
/*String fontName = "popn_noteCount"; |
|
|
|
/*String fontName = "sdvx_EXScore"; |
|
|
|
String value = "36"; |
|
|
|
String value = "00457"; |
|
|
|
Path f = Paths.get("tests","popn2.png"); |
|
|
|
Path f = Paths.get("tests","sdvx8.png"); |
|
|
|
BufferedImage img; |
|
|
|
BufferedImage img; |
|
|
|
try { |
|
|
|
try { |
|
|
|
img = ImageIO.read(f.toFile()); |
|
|
|
img = ImageIO.read(f.toFile()); |
|
|
|
Box scoreBox = new Box(1060,800,157,40); |
|
|
|
Box scoreBox = new Box(630,1142,110,16); |
|
|
|
|
|
|
|
|
|
|
|
int[] arr = img.getRGB(scoreBox.x, scoreBox.y, scoreBox.w, scoreBox.h, null, 0, scoreBox.w); |
|
|
|
int[] arr = img.getRGB(scoreBox.x, scoreBox.y, scoreBox.w, scoreBox.h, null, 0, scoreBox.w); |
|
|
|
|
|
|
|
|
|
|
|
BufferedImage newImg = new BufferedImage(scoreBox.w,scoreBox.h,BufferedImage.TYPE_INT_ARGB); |
|
|
|
BufferedImage newImg = new BufferedImage(scoreBox.w,scoreBox.h,BufferedImage.TYPE_INT_ARGB); |
|
|
|
int width=scoreBox.w; |
|
|
|
int width=scoreBox.w; |
|
|
|
|
|
|
|
|
|
|
|
final ColorRange TARGETCOLOR = new ColorRange(90,120,190,220,240,255); |
|
|
|
final ColorRange TARGETCOLOR = new ColorRange(230,255,180,255,20,255); |
|
|
|
final ColorRange SEEKINGCOLOR = new ColorRange(85,255,165,255,220,255); |
|
|
|
final ColorRange SEEKINGCOLOR = new ColorRange(180,255,140,255,15,255); |
|
|
|
final Color FINALCOLOR = Color.MAGENTA; |
|
|
|
final Color FINALCOLOR = Color.MAGENTA; |
|
|
|
for (int i=0;i<arr.length;i++) { |
|
|
|
for (int i=0;i<arr.length;i++) { |
|
|
|
Color col = new Color(arr[i],true); |
|
|
|
Color col = new Color(arr[i],true); |
|
|
|