public static async Task<Look> Save(PortableImage image, string name, ImageDimension dimension, string projectPath)
{
using (var storage = StorageSystem.GetStorage())
{
var imagePath = Path.Combine(projectPath, StorageConstants.ProgramLooksPath);
if (!await storage.DirectoryExistsAsync(imagePath))
await storage.CreateDirectoryAsync(imagePath);
}
var resizedImage = await ServiceLocator.ImageResizeService.ResizeImage(image, dimension.Width, dimension.Height);
var look = new Look(name);
var absoluteFileName = Path.Combine(projectPath, StorageConstants.ProgramLooksPath, look.FileName);
await resizedImage.WriteAsPng(absoluteFileName);
//look.Image = resizedImage;
return look;
}