MCPcopy Create free account
hub / github.com/Card-Forge/forge / read

Method read

forge-gui-mobile/src/forge/animation/GifDecoder.java:267–286  ·  view source on GitHub ↗

Reads GIF image from stream @param is containing GIF file. @return read status code (0 = no errors)

(InputStream is)

Source from the content-addressed store, hash-verified

265 * @return read status code (0 = no errors)
266 */
267 public int read(InputStream is) {
268 init();
269 if (is != null) {
270 in = is;
271 readHeader();
272 if (!err()) {
273 readContents();
274 if (frameCount < 0) {
275 status = STATUS_FORMAT_ERROR;
276 }
277 }
278 } else {
279 status = STATUS_OPEN_ERROR;
280 }
281 try {
282 is.close();
283 } catch (Exception e) {
284 }
285 return status;
286 }
287
288 /**
289 * Decodes LZW image data into pixel array. Adapted from John Cristy's BitmapMagick.

Callers 15

decodeBitmapDataMethod · 0.95
readBlockMethod · 0.95
readContentsMethod · 0.95
readGraphicControlExtMethod · 0.95
readHeaderMethod · 0.95
readBitmapMethod · 0.95
readLSDMethod · 0.95
readShortMethod · 0.95
loadGIFAnimationMethod · 0.95
readColorTableMethod · 0.45
GifAnimationMethod · 0.45
onCreateMethod · 0.45

Calls 5

initMethod · 0.95
readHeaderMethod · 0.95
errMethod · 0.95
readContentsMethod · 0.95
closeMethod · 0.65

Tested by

no test coverage detected