Example #1
0
        public void WriteImage(SDK.ExportContext stream, IMAGE32 image, IMAGEENCODER encoder)
        {
            if (image == null)
            {
                return;
            }

            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }
            if (encoder == null)
            {
                throw new ArgumentNullException(nameof(encoder));
            }

            if (PostProcessing != null)
            {
                foreach (var xform in PostProcessing)
                {
                    image.Mutate(dc => xform(dc));
                }
            }

            encoder?.Invoke(stream, image);
        }
Example #2
0
        public void WriteText(SDK.ExportContext stream, String value)
        {
            value = PostFormatting.Process(value);

            value = value ?? string.Empty;

            stream.WriteAllText(value);
        }
Example #3
0
        protected override void WriteFile(SDK.ExportContext stream)
        {
            if (Image == null)
            {
                return;
            }

            var g = this.GetSharedSettings <GlobalSettings>();

            Encoder.WriteImage(Image, stream);

            Image.Dispose();
        }
Example #4
0
        protected override void WriteFile(SDK.ExportContext stream, IMAGE32 image)
        {
            var encoder = this.Encoder;

            if (encoder == null)
            {
                throw new ArgumentNullException();
            }

            // write image
            encoder.WriteImage(image, stream);

            // dispose image
            image.Dispose();
        }
Example #5
0
 public void WriteImage(IMAGE32 image, SDK.ExportContext ctx)
 {
     ctx.WriteStream(s => WriteImage(image, s));
 }
 protected override void WriteFile(SDK.ExportContext stream)
 {
     GetSharedSettings <TextFormattingSettings>()?.WriteText(stream, Value);
 }
Example #7
0
 protected override void WriteFile(SDK.ExportContext stream)
 {
     stream.WriteAllText(Source.ToString());
 }