MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / readContents

Method readContents

ij/src/main/java/ij/plugin/GIF_Reader.java:449–492  ·  view source on GitHub ↗

Main file parser. Reads GIF content blocks.

()

Source from the content-addressed store, hash-verified

447 * Main file parser. Reads GIF content blocks.
448 */
449 private void readContents() {
450 // read GIF file content blocks
451 boolean done = false;
452 while (!(done || err())) {
453 int code = read();
454 switch (code) {
455
456 case 0x2C: // image separator
457 readImage();
458 break;
459
460 case 0x21: // extension
461 code = read();
462 switch (code) {
463
464 case 0xf9: // graphics control extension
465 readGraphicControlExt();
466 break;
467
468 case 0xff: // application extension
469 readBlock();
470 String app = "";
471 for (int i = 0; i < 11; i++)
472 app += (char) block[i];
473 if (app.equals("NETSCAPE2.0"))
474 readNetscapeExt();
475 else
476 skip(); // don't care
477 break;
478
479 default: // uninteresting extension
480 skip();
481 }
482 break;
483
484 case 0x3b: // terminator
485 done = true;
486 break;
487
488 default:
489 status = STATUS_FORMAT_ERROR;
490 }
491 }
492 }
493
494
495 /**

Callers 1

readMethod · 0.95

Calls 8

errMethod · 0.95
readMethod · 0.95
readImageMethod · 0.95
readGraphicControlExtMethod · 0.95
readBlockMethod · 0.95
readNetscapeExtMethod · 0.95
skipMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected