(final DataInputStream din)
| 31 | } |
| 32 | |
| 33 | protected final void loadHeader(final DataInputStream din) |
| 34 | throws IOException, AlbiteImageException { |
| 35 | |
| 36 | if (din.readInt() != MAGIC_NUMBER) { |
| 37 | throw new AlbiteImageException(INVALID_FILE_ERROR); |
| 38 | } |
| 39 | |
| 40 | width = din.readShort(); |
| 41 | height = din.readShort(); |
| 42 | |
| 43 | /* |
| 44 | * if EOF was risen, then probably the supplied dimensions from the |
| 45 | * header were invalid! |
| 46 | */ |
| 47 | } |
| 48 | |
| 49 | public static Image rescale( |
| 50 | final Image image, final int thumbWidth, final int thumbHeight) { |
no test coverage detected