服务器端图形生成在.net中/ C# [英] server-side graphics generation in .net/c#

查看:346
本文介绍了服务器端图形生成在.net中/ C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有.NET一个正确的方式(MVC / C#等)动态生成的方式相似图片网站做:的 http://www.fodey.com/generators/newspaper/snippet.asp
和/或是否有第三方工具包,以帮助这样的事情?

Is there a "correct" way in .net (MVC/c#, etc) to dynamically generate images in a way like this site does: http://www.fodey.com/generators/newspaper/snippet.asp And/or, are there third party toolkits to help with such things?

我知道低层次图形API的,但会好奇如何处理诸如字体布局,分页等更先进的东西,不需要一吨的手工编码的方式。

I'm aware of the low level graphics api's, but would be curious how to handle more advanced things like font layout, pagination, etc. in a way that doesn't require a ton of manual coding.

推荐答案

有很多影像库在那里。 IMO没有最佳实践的方式(正确的,著名的库)。有标准的做法,你需要code一切由你自己(如你所说),采用不外乎了GDI +(System.Drawing中)库,或者你可以看一下:

There are a lot of imaging libraries out there. IMO there is no "best practice" way ("correct","famous" library). There is the "standard" approach where you need to code everything by your self (as you said), using nothing else but the GDI+ (System.Drawing) library or you can have a look at:

  • imagelibrary
  • imageresizing.net - through a web api, free and commercial
  • aForge - they have among other things an image processing library
  • lead tools - commercial

唉,有时候最好和最快的解决方案仍是写自己的code - 取决于你想要达到的结果,你将花费学习第三方库的API的时候,你可能会创建自己的解决方案使用框架内建库。

Alas, sometimes the best and the quickest solution is still writing your own code - depending on the result you want to achieve, the time you will spend learning the API of the third party library, you will probably create the solution by yourself using the framework build-in library.

这篇关于服务器端图形生成在.net中/ C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆