private async Task <string> CreateCollage(IHasImages primaryItem, List <BaseItem> items, string outputPath, int width, int height) { FileSystem.CreateDirectory(Path.GetDirectoryName(outputPath)); var options = new ImageCollageOptions { Height = height, Width = width, OutputPath = outputPath, InputPaths = GetStripCollageImagePaths(primaryItem, items).ToArray() }; if (options.InputPaths.Length == 0) { return(null); } if (!ImageProcessor.SupportsImageCollageCreation) { return(null); } await ImageProcessor.CreateImageCollage(options).ConfigureAwait(false); return(outputPath); }
private string CreateCollage(BaseItem primaryItem, List <BaseItem> items, string outputPath, int width, int height) { FileSystem.CreateDirectory(FileSystem.GetDirectoryName(outputPath)); var options = new ImageCollageOptions { Height = height, Width = width, OutputPath = outputPath, InputPaths = GetStripCollageImagePaths(primaryItem, items).ToArray() }; if (options.InputPaths.Length == 0) { return(null); } if (!ImageProcessor.SupportsImageCollageCreation) { return(null); } ImageProcessor.CreateImageCollage(options); return(outputPath); }
private void CreateCollage(IHasImages primaryItem, List <BaseItem> items, string outputPath, int width, int height, bool drawText, string text) { Directory.CreateDirectory(Path.GetDirectoryName(outputPath)); var options = new ImageCollageOptions { Height = height, Width = width, OutputPath = outputPath, Text = drawText ? text : null, InputPaths = GetStripCollageImagePaths(primaryItem, items).ToArray() }; ImageProcessor.CreateImageCollage(options); }
private Task <bool> CreateCollage(IHasImages primaryItem, List <BaseItem> items, string outputPath, int width, int height) { Directory.CreateDirectory(Path.GetDirectoryName(outputPath)); var options = new ImageCollageOptions { Height = height, Width = width, OutputPath = outputPath, InputPaths = GetStripCollageImagePaths(primaryItem, items).ToArray() }; if (options.InputPaths.Length == 0) { return(Task.FromResult(false)); } ImageProcessor.CreateImageCollage(options); return(Task.FromResult(true)); }