ITGreader invalid data fix
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
d7115ef89f
commit
baf1916417
BIN
bin/ArcadeReader$1.class
Normal file
BIN
bin/ArcadeReader$1.class
Normal file
Binary file not shown.
BIN
bin/ArcadeReader.class
Normal file
BIN
bin/ArcadeReader.class
Normal file
Binary file not shown.
BIN
bin/exceptions/FailedResponseException.class
Normal file
BIN
bin/exceptions/FailedResponseException.class
Normal file
Binary file not shown.
BIN
bin/readers/Box.class
Normal file
BIN
bin/readers/Box.class
Normal file
Binary file not shown.
BIN
bin/readers/ColorRange.class
Normal file
BIN
bin/readers/ColorRange.class
Normal file
Binary file not shown.
BIN
bin/readers/DDRReader.class
Normal file
BIN
bin/readers/DDRReader.class
Normal file
Binary file not shown.
BIN
bin/readers/ITGReader.class
Normal file
BIN
bin/readers/ITGReader.class
Normal file
Binary file not shown.
BIN
bin/readers/LoveLiveReader.class
Normal file
BIN
bin/readers/LoveLiveReader.class
Normal file
Binary file not shown.
BIN
bin/readers/PopnReader.class
Normal file
BIN
bin/readers/PopnReader.class
Normal file
Binary file not shown.
BIN
bin/readers/Reader.class
Normal file
BIN
bin/readers/Reader.class
Normal file
Binary file not shown.
BIN
bin/readers/SoundVoltexReader.class
Normal file
BIN
bin/readers/SoundVoltexReader.class
Normal file
Binary file not shown.
BIN
bin/readers/TestReader.class
Normal file
BIN
bin/readers/TestReader.class
Normal file
Binary file not shown.
BIN
bin/readers/fonts/Font.class
Normal file
BIN
bin/readers/fonts/Font.class
Normal file
Binary file not shown.
BIN
bin/readers/fonts/Glyph.class
Normal file
BIN
bin/readers/fonts/Glyph.class
Normal file
Binary file not shown.
BIN
bin/requests/GETRequest$1.class
Normal file
BIN
bin/requests/GETRequest$1.class
Normal file
Binary file not shown.
BIN
bin/requests/GETRequest.class
Normal file
BIN
bin/requests/GETRequest.class
Normal file
Binary file not shown.
BIN
bin/requests/MultipartUtility.class
Normal file
BIN
bin/requests/MultipartUtility.class
Normal file
Binary file not shown.
BIN
bin/requests/POSTRequest$1.class
Normal file
BIN
bin/requests/POSTRequest$1.class
Normal file
Binary file not shown.
BIN
bin/requests/POSTRequest.class
Normal file
BIN
bin/requests/POSTRequest.class
Normal file
Binary file not shown.
BIN
bin/sigPlace.class
Normal file
BIN
bin/sigPlace.class
Normal file
Binary file not shown.
BIN
bin/sigServer.class
Normal file
BIN
bin/sigServer.class
Normal file
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();
|
||||
|
||||
BIN
sigPlace.jar
BIN
sigPlace.jar
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…
x
Reference in New Issue
Block a user