Correct cutoffs for the small score and title as certain characters were not in range of the subimage

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago
parent 2d02b81d12
commit d1b55d19fc
  1. BIN
      cut.png
  2. 9
      readers/SoundVoltexReader.java
  3. BIN
      result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -2,6 +2,7 @@ package readers;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
@ -18,9 +19,9 @@ public class SoundVoltexReader extends Reader{
static int lastJump=0;
final int TRANSPARENT = new Color(0,0,0,0).getRGB();
public SoundVoltexReader(){
readRegions.add(new Box(434,1006,454,26)); //title[0]
readRegions.add(new Box(458,1075,244,57)); //bigscore[1]
readRegions.add(new Box(706,1096,137,34)); //score[2]
readRegions.add(new Box(430,1006,454,29)); //title[0]
readRegions.add(new Box(458,1075,240,57)); //bigscore[1]
readRegions.add(new Box(697,1096,146,34)); //score[2]
readRegions.add(new Box(630,1142,110,16)); //exscore[3]
readRegions.add(new Box(932,1194,55,19)); //health percentage[4]
readRegions.add(new Box(617,1237,70,23)); //early error[5]
@ -334,6 +335,8 @@ public class SoundVoltexReader extends Reader{
for (int i=0;i<readRegions.size();i++) {
int[] arr = originalImg.getRGB(readRegions.get(i).x, readRegions.get(i).y, readRegions.get(i).w, readRegions.get(i).h, null, 0, readRegions.get(i).w);
//System.out.println(Arrays.toString(arr));
//System.out.println(i);
//ImageIO.write(originalImg.getSubimage(readRegions.get(i).x, readRegions.get(i).y, readRegions.get(i).w, readRegions.get(i).h),"png",new File("cut.png"));
ColorFilter(arr,i,readRegions.get(i).w);
//g.drawImage(originalImg, 0,currentHeight,readRegions.get(i).w,readRegions.get(i).h+currentHeight,readRegions.get(i).x, readRegions.get(i).y, readRegions.get(i).x+readRegions.get(i).w, readRegions.get(i).y+readRegions.get(i).h, null);
int leftMost=readRegions.get(i).w;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Loading…
Cancel
Save