@Override
    public void imageComplete(int status) {
      if (myWidth > 0 && myHeight > 0) {
        register(this, myWidth * myHeight >>> 8 /* assuming 4 bytes per pixel */);

        myWidth = 0;  // InputStreamImageSource (probably due to a bug) reports IMAGEERROR status after reporting STATICIMAGEDONE
        myHeight = 0; // We want to ignore that

        Runnable runnable = completionRunnable;
        if (runnable != null) runnable.run();
      }
    }
@Override
    public void imageComplete(int status)