Пример #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseBrowserLink();
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
            }

            app.UseStaticFiles();

            //Gallery - folder containing images
            //.thumbs - name of thumbnail cahce folder.
            ImageThumbnailOptions options = new ImageThumbnailOptions("Gallery", ".thumbs");

            options.ImageQuality = 20L;

            app.UseImageThumbnail(options);

            app.UseMvc();
        }
Пример #2
0
 public ImageController()
 {
     _options = new ImageThumbnailOptions();
 }