MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / decompress

Method decompress

src/main/java/field/graphics/SlowJPEG.java:22–35  ·  view source on GitHub ↗
(String filename, Buffer dest, int width, int height)

Source from the content-addressed store, hash-verified

20 @Override
21 public void decompress(String filename, Buffer dest, int width, int height) {
22 byte[] f = bytes(filename);
23
24 if(f==null)
25 {
26 throw new IllegalArgumentException(" failed to load :"+filename);
27 }
28 // 4 or 3?
29 dest.rewind();
30 ((ByteBuffer)dest).put(f);
31 dest.rewind();
32
33 }
34
35 public void decompressRaw(String filename, Buffer dest, int width, int height) {
36 byte[] f = bytes(filename);
37
38 if(f==null)

Callers 1

loadTextureMethod · 0.95

Calls 2

bytesMethod · 0.95
putMethod · 0.45

Tested by

no test coverage detected