ITGreader invalid data fix

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 2 years ago
parent d7115ef89f
commit baf1916417
  1. BIN
      bin/ArcadeReader$1.class
  2. BIN
      bin/ArcadeReader.class
  3. BIN
      bin/exceptions/FailedResponseException.class
  4. BIN
      bin/readers/Box.class
  5. BIN
      bin/readers/ColorRange.class
  6. BIN
      bin/readers/DDRReader.class
  7. BIN
      bin/readers/ITGReader.class
  8. BIN
      bin/readers/LoveLiveReader.class
  9. BIN
      bin/readers/PopnReader.class
  10. BIN
      bin/readers/Reader.class
  11. BIN
      bin/readers/SoundVoltexReader.class
  12. BIN
      bin/readers/TestReader.class
  13. BIN
      bin/readers/fonts/Font.class
  14. BIN
      bin/readers/fonts/Glyph.class
  15. BIN
      bin/requests/GETRequest$1.class
  16. BIN
      bin/requests/GETRequest.class
  17. BIN
      bin/requests/MultipartUtility.class
  18. BIN
      bin/requests/POSTRequest$1.class
  19. BIN
      bin/requests/POSTRequest.class
  20. BIN
      bin/sigPlace.class
  21. BIN
      bin/sigServer.class
  22. 9
      readers/ITGReader.java
  23. 2
      requests/GETRequest.java
  24. BIN
      sigPlace.jar
  25. 18
      sigPlace.java

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -170,14 +170,19 @@ public class ITGReader extends Reader{
case 0:{
Font f = Font.FONT_ITG_EX;
List<Glyph> glyphs = Glyph.split(cutImg);
glyphs.remove(glyphs.size()-3);
if (glyphs.size()>=3) {
glyphs.remove(glyphs.size()-3);
}
String res = f.convertGlyphs(glyphs);
return res.substring(0,res.length()-2)+"."+res.substring(res.length()-2,res.length());
}
case 7:{
Font f = Font.FONT_ITG_PCT;
List<Glyph> glyphs = Glyph.split(cutImg);
glyphs.remove(glyphs.size()-3);
if (glyphs.size()>=3) {
glyphs.remove(glyphs.size()-3);
}
String res = f.convertGlyphs(glyphs);
return res.substring(0,res.length()-2)+"."+res.substring(res.length()-2,res.length());
}

@ -50,7 +50,7 @@ public class GETRequest{
this(url,timeout,null,headers);
}
public GETRequest(String url){
this(url,30000,null);
this(url,30000,(String[])null);
}
public HttpResponse<?> run() throws FailedResponseException {
build();

Binary file not shown.

@ -110,15 +110,17 @@ public class sigPlace {
}
final Path temp = Paths.get("temp.png");
Reader result = ArcadeReader.interpret(screenshot);
System.out.println("Detected as "+result.getClass().getSimpleName());
ImageIO.write(screenshot,"png",temp.toFile());
result.interpretBoxes(temp, true);
if (result.isReasonableData()) {
System.out.println("Data is reasonable, prepare for submitting...");
if (result!=null) {
System.out.println("Detected as "+result.getClass().getSimpleName());
ImageIO.write(screenshot,"png",temp.toFile());
result.interpretBoxes(temp, true);
if (result.isReasonableData()) {
System.out.println("Data is reasonable, prepare for submitting...");
}
/*if (result.isReasonableData()) {
POSTRequest postRes = new POSTRequest("http://"+args[0]+"/uploadform.html",Path.of("..",filename));
}*/
}
/*if (result.isReasonableData()) {
POSTRequest postRes = new POSTRequest("http://"+args[0]+"/uploadform.html",Path.of("..",filename));
}*/
Thread.sleep(50);
}
} catch (AWTException | InterruptedException | IOException e) {

Loading…
Cancel
Save