Example #1
0
        public override void DoCommand(IImageRender imageRender)
        {
            var imagePath = Path.Combine(_directory, _args["@main_argument"]);
            var image     = Image.FromFile(imagePath);

            imageRender.CreateFromImage(image);
        }
 public GroupCoverRenderer(IServiceProvider serviceProvider)
 {
     _serviceProvider = serviceProvider;
     _imageRender     = serviceProvider.GetService <IImageRender>();
     using (var background = Image.FromFile(GetBackgroundImagePath()))
     {
         _imageRender.CreateFromImage(background);
     }
     _fontProvider = serviceProvider.GetService <IFontProvider>();
 }