MCPcopy Index your code
hub / github.com/dumbledore/AlbiteREADER / loadHeader

Method loadHeader

src/org/albite/image/AlbiteImage.java:33–47  ·  view source on GitHub ↗
(final DataInputStream din)

Source from the content-addressed store, hash-verified

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) {

Callers 2

AlbiteImageMonoMethod · 0.80
AlbiteImageARGBMethod · 0.80

Calls 2

readIntMethod · 0.80
readShortMethod · 0.80

Tested by

no test coverage detected