private void calculateImageSizes() {
		int oldMaxImageWidth = maxImageWidth;
		maxImageWidth = 1;
		for (Map.Entry<String, ImageRecord> entry : images.entrySet()) {
			if (entry.getValue() != null) {
				int val = entry.getValue().image.getAsBufferedImage().getWidth(null);
				if (val > maxImageWidth) {
					maxImageWidth = val;
				}
			}
		}
		int oldMaxImageHeight = maxImageHeight;
		maxImageHeight = 1;
		for (Map.Entry<String, ImageRecord> entry : images.entrySet()) {
			if (entry.getValue() != null) {
				int val = entry.getValue().image.getAsBufferedImage().getHeight(null);
				if (val > maxImageHeight) {
					maxImageHeight = val;
				}
			}
		}
		if (oldMaxImageWidth != maxImageWidth || oldMaxImageHeight != maxImageHeight) {
			for (ImageStoreMaxSizeChangedListener listener : listeners) {
				listener.maxSizeChanged(maxImageWidth, maxImageHeight);
			}
		}
	}