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

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