寻找一个托管的图像解析库(JPEG,BMP,PNG,GIF) [英] Looking for a managed image parser library (JPEG, BMP, PNG, GIF)

查看:201
本文介绍了寻找一个托管的图像解析库(JPEG,BMP,PNG,GIF)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个讨论板软件,将有阿凡达图像的用户。我想调整的被上传到一个合理的规模的任何图片。我可以很容易地做到这一点与System.Drawing中但那是靠着GDI +这之前,有帽子的安全问题。的问题是,图像是不可信。所以我想用一个完全托管的lib来解决这个问题,因为管理code无法逃避的沙箱(当然是可以的,但前提是code为用户提供的,它是不是在我的情况)。 因此,没有任何人知道的JPEG,BMP,PNG和GIF托管的图像解析库?如果某种格式丢失比我将不得不忍受这一点。

I am writing a discussion board software that will have "avatar" images for the users. I want to resize any picture that gets uploaded to a reasonable size. I could easily do that with System.Drawing but that is relying on GDI+ which has hat security problems before. The problem is that the images are untrusted. So I thought of using a fully managed lib to solve that problem because managed code cannot escape the sandbox (of course it can, but only if the code is user-supplied which it is not in my case). So does anybody know of a managed image parser library for JPEG, BMP, PNG and GIF? If some format is missing than I will have to live with that.

编辑:Paint.NET还依赖于GDI +

Paint.NET also relies on GDI+.

您可能会感兴趣下面的讨论了。

You might be interested in the discussion below, too.

推荐答案

怎么样 VintaSoftImaging。 NET ?这是一个完全托管的.NET库,可以调整大小/重新取样各种图像格式(等等)。

What about VintaSoftImaging.NET? It's a fully-managed .NET library that can resize/resample various image formats (and much more).

这当然不是说这样的所有的图片库有非托管code - 图像去codeRS都写在任何一种语言,笔者感觉就像写他们,而有些则感觉。就像写他们在托管语言;例如,另外还有LibTiff.NET和LibJpeg.NET,均为100%,管理code。这些都是严格的,虽然codeC库,并不会做任何调整大小。

It's certainly not the case that all image libraries have unmanaged code--image decoders are written in whatever language the author feels like writing them in. And some do feel like writing them in a managed language; for example, there's also LibTiff.NET and LibJpeg.NET, both 100% managed code. Those are strictly codec libraries though, and won't do any resizing.

这篇关于寻找一个托管的图像解析库(JPEG,BMP,PNG,GIF)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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