return;\r
}\r
\r
+ if (format == null || !format.matches("^(png|gif|jpg|null)$")) {\r
+ usage("Invalid format given");\r
+ return;\r
+ }\r
+ \r
if (outdir == null) {\r
outdir = file.getParentFile();\r
}\r
\r
- if (outdir == null || !outdir.exists() || !outdir.isDirectory()) {\r
+ if (!"null".equals(format) && (outdir == null || !outdir.exists() || !outdir.isDirectory())) {\r
usage("Output directory doesn't exist");\r
return;\r
}\r
return;\r
}\r
\r
- if (format == null || !format.matches("^(png|gif|jpg|null)$")) {\r
- usage("Invalid format given");\r
- return;\r
- }\r
- \r
if (!quiet) {\r
System.out.println("Processing " + file);\r
}\r