code: public static long getEstimatedMemoryUsage (Iterator<BufferedImage> iter)
      {
          long size = 0;
          while (iter.hasNext()) {
              BufferedImage image = iter.next();
              size += getEstimatedMemoryUsage(image);
          }
          return size;
      }
docs: Returns the estimated memory usage in bytes for all buffered images in the supplied
  iterator.