public async Task CreateImageCollage(ImageCollageOptions options) { await _imageProcessingSemaphore.WaitAsync().ConfigureAwait(false); try { _logger.Info("Creating image collage and saving to {0}", options.OutputPath); _imageEncoder.CreateImageCollage(options); _logger.Info("Completed creation of image collage and saved to {0}", options.OutputPath); } finally { _imageProcessingSemaphore.Release(); } }
public void CreateImageCollage(ImageCollageOptions options) { throw new NotImplementedException(); }
public void CreateImageCollage(ImageCollageOptions options) { double ratio = options.Width; ratio /= options.Height; if (ratio >= 1.4) { new StripCollageBuilder(_appPaths, _fileSystem).BuildThumbCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height, options.Text); } else if (ratio >= .9) { new StripCollageBuilder(_appPaths, _fileSystem).BuildSquareCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height, options.Text); } else { new StripCollageBuilder(_appPaths, _fileSystem).BuildPosterCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height, options.Text); } SaveDelay(); }
public void CreateImageCollage(ImageCollageOptions options) { double ratio = options.Width; ratio /= options.Height; if (ratio >= 1.4) { DynamicImageHelpers.CreateThumbCollage(options.InputPaths.ToList(), _fileSystem, options.OutputPath, options.Width, options.Height); } else if (ratio >= .9) { DynamicImageHelpers.CreateSquareCollage(options.InputPaths.ToList(), _fileSystem, options.OutputPath, options.Width, options.Height); } else { DynamicImageHelpers.CreateSquareCollage(options.InputPaths.ToList(), _fileSystem, options.OutputPath, options.Width, options.Width); } }