コード例 #1
0
        public ThumbnailGenerator()
        {
            string temporaryImagesFilePath = @"f:\data\launchpad\images\temp";

            MagickNET.SetTempDirectory(temporaryImagesFilePath);
            string policyMap = @"
                <policymap>
                   <policy domain=""resource"" name=""memory"" value=""3GiB""/> 
                   <policy domain=""resource"" name=""map"" value=""4GiB""/> 
                   <policy domain=""resource"" name=""time"" value=""unlimited""/> 
                </policymap>
            ";

            Configuration = new ImageMagickConfiguration(policyMap, temporaryImagesFilePath);
        }
コード例 #2
0
        public ImageManager()
        {
            // Create the default ImageMagick configuration, which also initializes the underlying ImageMagick utility
            string temporaryImagesFilePath = @"f:\data\launchpad\images\temp";
            string policyMap = @"
                <policymap>
                   <policy domain=""resource"" name=""memory"" value=""3GiB""/> 
                   <policy domain=""resource"" name=""map"" value=""4GiB""/> 
                   <policy domain=""resource"" name=""time"" value=""unlimited""/> 
                </policymap>
            ";
            ImageMagickConfiguration config = new ImageMagickConfiguration(policyMap, temporaryImagesFilePath);

            _comparer          = new ImageComparer(config);
            ThumbnailGenerator = new ThumbnailGenerator(config);
            Logger             = NullLogger.Instance; // logger should be loaded by ABP property injection, but if not don't raise errors
        }
コード例 #3
0
 public ThumbnailGenerator(ImageMagickConfiguration config)
 {
     Configuration = config;
 }
コード例 #4
0
 public ImageComparer(ImageMagickConfiguration config)
 {
     _config = config;
 }