protected void checkComponents(SofSegment sof, List<Exception> problems, boolean thumbnail) {
		String prefix = "JFIF " + (thumbnail ? "thumbnail" : "images");
		if (sof.getComponentCount() != 1 && sof.getComponentCount() != 3) {
			problems.add(new InvalidJpegFormat(prefix + " must have 1 or 3 components"));
		}
		if (sof.getComponent(0).getComponentId() != 1) {
			problems.add(new InvalidJpegFormat(prefix + " must have component #1 being 1"));
		}
		if (sof.getComponentCount() >= 2) {
			if (sof.getComponent(1).getComponentId() != 2) {
				problems.add(new InvalidJpegFormat(prefix + " must have component #2 being 2"));
			}
		}
		if (sof.getComponentCount() >= 3) {
			if (sof.getComponent(2).getComponentId() != 3) {
				problems.add(new InvalidJpegFormat(prefix + " must have component #3 being 3"));
			}
		}
	}