コード例 #1
0
ファイル: TestAll.cs プロジェクト: eakova/resizer
        public Config GetConfig()
        {
            Config c = new Config();
            //c.Pipeline.s
            WatermarkPlugin w = new ImageResizer.Plugins.Watermark.WatermarkPlugin();
            w.align = System.Drawing.ContentAlignment.BottomLeft;
            w.hideIfTooSmall = false;
            w.keepAspectRatio = true;
            w.valuesPercentages = true;
            w.watermarkDir = "~/"; //Where the watermark plugin looks for the image specifed in the querystring ?watermark=file.png
            w.bottomRightPadding = new System.Drawing.SizeF(0, 0);
            w.topLeftPadding = new System.Drawing.SizeF(0, 0);
            w.watermarkSize = new System.Drawing.SizeF(1, 1); //The desired size of the watermark, maximum dimensions (aspect ratio maintained if keepAspectRatio = true)
            //Install the plugin
            w.Install(c);

            new Gradient().Install(c);
            new PrettyGifs().Install(c);
            new AnimatedGifs().Install(c);
            new AdvancedFilters().Install(c);
            RemoteReaderPlugin rrp = new RemoteReaderPlugin(); rrp.Install(c);
            rrp.AllowRemoteRequest += delegate(object sender, RemoteRequestEventArgs args) {
                args.DenyRequest = false;
            }; //Doesn't support non-ASP.NET usage yet.

            new SeamCarvingPlugin().Install(c);
            new SimpleFilters().Install(c);
            new DropShadow().Install(c);
            new WhitespaceTrimmerPlugin().Install(c);
            //s3reader
            //sqlreader

            return c;
        }