MVC3/Razor thumbnail/resize image ideas?

后端 未结 4 1088
我在风中等你
我在风中等你 2020-12-13 02:39

Is there an easy and dynamic way to create thumbnails and resize images in MVC3/Razor? A helper, libary, anything?

It would be nice, if I somehow could manage the si

4条回答
  •  醉话见心
    2020-12-13 03:32

    There's a library for it - it's MVC3 compatible, and it's implemented as an HttpModule, so it gets great performance.

    It's also free (although some plugins require a 1-time developer or business license).

    You can download it at http://imageresizing.net

    Although it's tempting to just write an action for it, there are a lot of GDI bugs that you'll have to deal with, one, by one, over the years. Using a library frees you from tracking and avoiding them. Google "Image resizing pitfalls", the first result is an article that will help if you write your own decoding/resizing/encoding system.

提交回复
热议问题