We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
我推荐 ImageResizer:
主要功能包括:
使用 Nuget 安装:
有关更多信息,请检查:
http://imageresizing.net/docs/install/nuget
I recommend ImageResizer:
Key features are:
For installing with Nuget:
For more information please check:
http://imageresizing.net/docs/install/nuget
有很多文章展示了这方面的基础知识。 我使用了 Atalasoft 的组件,发现它们的质量非常好。 调整 JPEG 图像大小和使用 JPEG 图像存在细微差别。
您似乎非常关心性能,但您并没有真正提供足够的信息来帮助我们为您提出良好的优化建议。 无论您在做什么,都需要进行全面的性能分析并了解运行缓慢的原因。 在某些情况下,如果其他方面得到优化,速度会很慢,但可维护的图像处理代码可能没问题。
获得良好性能的一种解决方案是将需要转换的传入文件排队。 添加更多机器来处理队列中更多消息,或者优化服务代码以获得更好的吞吐量。 如果设计正确的话,处理大量用户实际上并不困难。
There are a lot of articles out there showing the basics of this. I've used the components from Atalasoft and found them to be of pretty good quality. There are nuances to resizing and working with JPEG images.
You seem to be really concerned with performance but you don't really give enough information to help us suggest good optimizations for you. Whatever you are doing, you need to do a full performance analysis and understand what is running slow. In some cases slowish, but maintainable image processing code may be OK if other things are optimized.
One solution for good performance is to queue incoming files that need to be converted. Add more machines to handle more messages in the queue, or optimize the service code to get better throughput. It's really not that difficult to handle a large number of users if you get the design right.
这是 winforms 方式
,这是 WPF 方式 TransformedBitmap 类
Here is winforms way
and here is WPF way TransformedBitmap Class
如果钱不是问题,LeadTools 就是传统的图像处理“首选”库。 话虽这么说,我的第一个倾向是使用现有的 .NET GDI+ 调用对其进行编码,然后进行一些测试。 该解决方案可能具有足够的性能,但如果性能不够,您将拥有一个可以比较其他库和解决方案的基准。 任何涉及生成命令行工具的事情都需要为每个图像创建一个单独的进程,这可能会抵消使用非托管代码的好处。
If money is no object, LeadTools is the traditional "go to" library for image processing. That being said, my first inclination would be to code it up using stock .NET GDI+ calls and then do some testing. It is likely this solution would be performant enough, but if not, you'll have a baseline from which you can compare other libraries and solutions. Anything involving spawning a command line tool will entail creating a separate process for each image, which could negate the benefit of going to unmanaged code.
我不确定性能,但开源 OpenCV 是一个选择。
void cvResize( const CvArr* I, CvArr* J, int 插值=CV_INTER_LINEAR );
函数 cvResize 调整图像 I 的大小,使其完全适合 J。如果设置了 ROI,该函数会像往常一样认为 ROI 受支持。 使用指定的结构元素 B 确定源图像,该结构元素确定采用最小值的像素邻域的形状:
I'm not sure about performance, but the open source OpenCV is an option.
void cvResize( const CvArr* I, CvArr* J, int interpolation=CV_INTER_LINEAR );
The function cvResize resizes image I so that it fits exactly to J. If ROI is set, the function consideres the ROI as supported as usual. the source image using the specified structuring element B that determines the shape of a pixel neighborhood over which the minimum is taken: