Refactored image creator code
This commit is contained in:
parent
2fde30572b
commit
fa889a5cd3
5 changed files with 482 additions and 585 deletions
|
|
@ -13,7 +13,7 @@ using Microsoft.Extensions.Logging;
|
|||
|
||||
namespace MaddoShared
|
||||
{
|
||||
public class ImageCreationStuff(ILogger<ImageCreationStuff> logger, PicSettings picSettings)
|
||||
public class ImageCreationStuff(ILogger<ImageCreationStuff> logger, PicSettings picSettings, ImageCreatorSharp imageCreatorService)
|
||||
{
|
||||
public class Options
|
||||
{
|
||||
|
|
@ -72,8 +72,16 @@ namespace MaddoShared
|
|||
using var logoCopy = logoBmp.Clone(new Rectangle(0, 0, logoBmp.Width, logoBmp.Height),
|
||||
logoBmp.PixelFormat);
|
||||
|
||||
using var imgCreator = new ImageCreatorSharp(fileData.File, fileData.Directory, picSettings);
|
||||
await imgCreator.CreaImmagineThread(fileData.File.Name, logoCopy);
|
||||
var imgState = new ImageState
|
||||
{
|
||||
WorkFile = fileData.File,
|
||||
DestDir = fileData.Directory,
|
||||
};
|
||||
|
||||
await imageCreatorService.CreaImmagineThread(imgState, logoCopy);
|
||||
|
||||
// using var imgCreator = new ImageCreatorSharp(fileData.File, fileData.Directory, picSettings);
|
||||
// await imgCreator.CreaImmagineThread(fileData.File.Name, logoCopy);
|
||||
|
||||
results.Add(fileData.File.Name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue