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

Method call

src/main/java/field/graphics/util/Saver.java:183–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 FastJPEG j2 = new FastJPEG();
182
183 private Callable<Pair<ByteBuffer, ByteBuffer>> makeWorker(final Pair<ByteBuffer, ByteBuffer> storage, final String filename) {
184 return new Callable<Pair<ByteBuffer, ByteBuffer>>() {
185 public Pair<ByteBuffer, ByteBuffer> call() throws Exception {
186
187 for(int y=0;y<height;y++)
188 {
189 storage.first.position(y*width*3);
190 storage.first.limit((y+1)*width*3);
191 storage.second.position((height-y-1)*width*3);
192 storage.second.limit((height-y-1+1)*width*3);
193 storage.second.put(storage.first);
194 storage.second.clear();
195 storage.first.clear();
196 }
197
198 try {
199
200
201// j2.compress(filename, storage.second, width, height);
202 System.out.println(" -- slow save --");
203 new SlowJPEG().compress(filename, storage.second, width, height);
204 } catch (Throwable t) {
205 System.err.println(" -- exception thrown in compress for :" + filename + " " + storage + " " + width + " " + height);
206 t.printStackTrace();
207 }
208 return storage;
209
210 }
211 };

Callers 2

wrappedCallMethod · 0.45
makeCloseBoxMethod · 0.45

Calls 6

positionMethod · 0.65
limitMethod · 0.45
putMethod · 0.45
clearMethod · 0.45
printlnMethod · 0.45
compressMethod · 0.45

Tested by

no test coverage detected