Inheritance: IDisposable
		internal string CreateTemporaryPicture()
		{
			var fileName = Path.GetTempFileName();
			var bmp = RenderToBitmap();
			if (bmp != null)
			{
				var wrapper = new BitmapWrapper(bmp);
				wrapper.Save(fileName, "image/jpeg", 100);
				return fileName;
			}

			return null;
		}
		private void saveButton_Click(object sender, EventArgs e)
		{
			viewPort.RemoveSelection();

			saveFileDialog.ShowDialog();
			if (saveFileDialog.FileName == "") return;

			var extension = saveFileDialog.Filter.Split("|".ToCharArray())[(saveFileDialog.FilterIndex - 1)*2 + 1];
			var imageCodec = ImageCodecInfo.GetImageEncoders().Single(ici =>  ici.FilenameExtension.ToLower().Contains(extension.ToLower()));

			var bmp = viewPort.RenderToBitmap();
			if (bmp == null) return;

			var wrapper = new BitmapWrapper(bmp);
			var fs = (FileStream)saveFileDialog.OpenFile();
			wrapper.Save(fs, imageCodec, 100);
			wrapper.Dispose();
		}