| | |
| | | /* |
| | | Skript zum Verkleinern von Bildern mit Hilfe |
| | | der Klasse Bild |
| | | |
| | | args[0] - Anzahl Pixel an der laengsten Kante |
| | | args[1] - qualitaet JPEG, z.B. 75 fuer 75% |
| | | args[2] - Eingangsordner |
| | | args[3] - Ausgabeordner |
| | | */ |
| | | |
| | | FileNameMap fileNameMap = URLConnection.getFileNameMap(); |
| | | int width = Integer.parseInt(args[0]); |
| | | int height = width; |
| | | String inDirName = args[1]; |
| | | String outDirName = args[2]; |
| | | String inDirName = args[2]; |
| | | String outDirName = args[3]; |
| | | File inFile = new File(inDirName); |
| | | File[] fileList = inFile.listFiles(); |
| | | if(fileList != null && fileList.length > 0) { |
| | |
| | | mediaTracker.waitForID(0); |
| | | if (!mediaTracker.isErrorAny()) { |
| | | |
| | | int quality = 90; |
| | | int quality = Integer.parseInt(args[1]); |
| | | float factor = (float) 0.0; |
| | | |
| | | BufferedImage thumbImage; |