3using System.Threading.Tasks;
47 using (StreamReader rd =
new StreamReader(State.
From))
57 s = s.Substring(0, i);
60 SKEncodedImageFormat Format;
66 Format = SKEncodedImageFormat.Png;
71 Format = SKEncodedImageFormat.Bmp;
76 Format = SKEncodedImageFormat.Gif;
81 Format = SKEncodedImageFormat.Jpeg;
87 Format = SKEncodedImageFormat.Webp;
92 Format = SKEncodedImageFormat.Ico;
102 Extension =
XmlLayout.DefaultFileExtension;
103 State.ToContentType =
XmlLayout.DefaultContentType;
108 GraphInfo Graph = await
XmlLayout.GetFileName(
"layout", Xml,
Variables, Format, Quality, Extension);
112 await State.
To.WriteAsync(Graph.DynamicContent, 0, Graph.DynamicContent.Length);
119 await State.
To.WriteAsync(Data, 0, Data.Length);
Contains the state of a content conversion process.
string ToContentType
Content type of the content to convert to. This value might be changed, in case the converter finds a...
Stream To
Stream pointing to where binary representation of content is to be sent.
Stream From
Stream pointing to binary representation of content.
const string FileExtensionJpg
jpg
const string ContentTypeJpg
image/jpeg
const string ContentTypeIcon
image/x-icon
const string ContentTypeWebP
image/webp
const string ContentTypeEmf
image/x-emf
const string ContentTypeGif
image/gif
const string FileExtensionPng
png
const string FileExtensionWebP
webp
const string FileExtensionIcon
ico
const string ContentTypePng
image/png
const string ContentTypeBmp
image/bmp
const string ContentTypeTiff
image/tiff
const string ContentTypeWmf
image/x-wmf
const string ContentTypeSvg
image/svg+xml
const string FileExtensionGif
gif
const string FileExtensionBmp
bmp
static readonly string[] ImageContentTypes
Image content types.
Converts GraphViz documents to images.
async Task< bool > ConvertAsync(ConversionState State)
Performs the actual conversion.
Layout2DXmlToImageConverter()
Converts GraphViz documents to images.
string[] FromContentTypes
Converts content from these content types.
virtual Grade ConversionGrade
How well the content is converted.
virtual string[] ToContentTypes
Converts content to these content types.
Class managing 2D XML Layout integration into Markdown documents.
Static class managing loading of resources stored as embedded resources or in content files.
static async Task< byte[]> ReadAllBytesAsync(string FileName)
Reads a binary file asynchronously.
static readonly string[] XmlContentTypes
XML content types.
Basic interface for Internet Content encoders. A class implementing this interface and having a defau...