20 |
|
|
21 |
static int RESOLUTION = 200; |
static int RESOLUTION = 200; |
22 |
|
|
23 |
static File tmp = new File("../tmpimg"); |
static File __tmp = new File("./tmpimg"); |
24 |
|
|
25 |
|
static File tmp() { |
26 |
|
if(!__tmp.exists()) |
27 |
|
__tmp.mkdir(); |
28 |
|
return __tmp; |
29 |
|
} |
30 |
|
|
31 |
static PythonInterpreter interp; |
static PythonInterpreter interp; |
32 |
|
|
60 |
boolean exist = true; |
boolean exist = true; |
61 |
for(int i=0; i<n; i++) { |
for(int i=0; i<n; i++) { |
62 |
String base = prefix + (i+1); |
String base = prefix + (i+1); |
63 |
File f = new File(tmp, base); |
File f = new File(tmp(), base); |
64 |
paths[i] = f.getPath(); |
paths[i] = f.getPath(); |
65 |
tmppaths[i] = new File(tmp, "tmp"+base).getPath(); |
tmppaths[i] = new File(tmp(), "tmp"+base).getPath(); |
66 |
if(!f.exists()) exist = false; |
if(!f.exists()) exist = false; |
67 |
} |
} |
68 |
if(exist) return paths; |
if(exist) return paths; |
82 |
BlockFile f = pages.getBlockFile(); |
BlockFile f = pages.getBlockFile(); |
83 |
if(! interp.get("cv").__call__(new PyObject[] { |
if(! interp.get("cv").__call__(new PyObject[] { |
84 |
new PyString(f.getFilename()), |
new PyString(f.getFilename()), |
85 |
new PyString(new File(tmp, "tmp"+prefix).getPath()), |
new PyString(new File(tmp(), "tmp"+prefix).getPath()), |
86 |
new PyInteger(RESOLUTION) |
new PyInteger(RESOLUTION) |
87 |
}).__nonzero__()) |
}).__nonzero__()) |
88 |
throw new Error("Conversion unsuccessful"); |
throw new Error("Conversion unsuccessful"); |