コード例 #1
0
ファイル: ImageProcessor.cs プロジェクト: loose-wardrobe/Emby
        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();
            }
        }
コード例 #2
0
ファイル: NullImageEncoder.cs プロジェクト: NickBolles/Emby
 public void CreateImageCollage(ImageCollageOptions options)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
ファイル: ImageMagickEncoder.cs プロジェクト: dgz/Emby
        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();
        }
コード例 #4
0
ファイル: GDIImageEncoder.cs プロジェクト: rezafouladian/Emby
        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);
            }
        }