public ImageData createOne(OutputStream os, int index, boolean isWithMetadata) throws IOException {
		final UGraphic ug = createImage((int) fullDimension.getWidth(), pages.get(index), index);

		ug.writeImage(os, isWithMetadata ? diagram.getMetadata() : null, diagram.getDpi(fileFormatOption));
		final Dimension2D info = new Dimension2DDouble(fullDimension.getWidth(), fullDimension.getHeight());

		if (fileFormatOption.getFileFormat() == FileFormat.PNG && ug instanceof UGraphicG2d) {
			final Set<Url> urls = ((UGraphicG2d) ug).getAllUrlsEncountered();
			if (urls.size() > 0) {
				if (scale == 0) {
					throw new IllegalStateException();
				}
				final CMapData cmap = CMapData.cmapString(urls, scale);
				return new ImageDataComplex(info, cmap, null);
			}
		}
		return new ImageDataSimple(info);
	}