.Net核心图像处理(裁剪和调整大小)/文件处理 [英] .Net Core Image Manipulation (Crop & Resize) / File Handling

查看:110
本文介绍了.Net核心图像处理(裁剪和调整大小)/文件处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去5个小时,我一直在寻找一种可行的方法来完成对我来说似乎很容易的任务,如果它是我正在使用的.NET系列的早期版本:

I have spent the last 5 hours trying to find a feasible way to accomplish what seems to me quite an easy task if it was a previous version of the .NET family that I was working with:

  1. 上传图片
  2. 调整大小和裁剪图片
  3. 将新图片保存到目录中

我遇到了几个处于预发行阶段或未完成阶段的库.

I have come accross to couple of libraries that are either in pre-release stage or in a not-complete stage.

没有任何人完全完成上述任务而没有特别包括System.Drawing名称空间和/或没有为.NET框架的早期版本添加依赖项吗?

Has anyone at all accomplished the above tasks without specifically including the System.Drawing namespace and/or adding a dependency for an earlier version of the .NET framework?

我最终使用了System.Drawing,这是非常令人讨厌和令人失望的.我相信,如果您正在开发供成千上万的开发人员使用的软件,并且所有这些开发人员都依赖于该软件的组件,那么,您不能仅仅提出一个新版本,而是在会议上甜言蜜语"以展示该软件.放弃公开演讲的技巧,而不是浪费您的工作,一方面自豪地保持对工作的崇高敬意,另一方面,剥离工作中最常用和最需要的部分.

I ended up using System.Drawing something which is very annoying and disappointing. If you are developing a software used by thousands of developers, and if all these developers are relying on the components of this software, I believe, one cannot just come up with a new version, "sweet talk" about it during the conferences to show off your public speaking skills rather than giving a shit about your work and on one hand proudly hold in high esteem of it, and on the other, strip away the mostly used and demanded portions of it.

我非常兴奋地理解并欣赏-具有核心框架的.net新时代-自经典asp诞生以来一直是忠诚的asp开发人员-但是,对我而言,这只是一个不完整的产品,挫折和失望多于快乐.当当今在内容驱动的世界中有数百万个网站完全依赖于内容管理时,您不能只是说:嘿,我拥有这种精妙,技术,精简,快捷的方法等等",但是错了,您会在管理"您的内容时遇到一些问题.

I do understand and appreciate with great excitement myself - of the new era of .net with the core framework - being a loyal asp dev since the first days of classic asp - however, to me, it is just an uncomplete product causing more frustrations and dissappointment than pleasure. When there are millions of websites in today's content-driven world, completely relying on content management, you can't just come up and say, "Hey, I have this brilliant, techonology, leaner, faster blah blah" but errr, you will have some problems with "managing" your content..

不应忘记,尽管MS(和我们)对这个新的核心框架感到非常兴奋,现在已经成为开源等,但还有其他语言和框架正在做MS有望做的事情,现在已经非常非常长的时间了.

It should not be forgotten that, although, MS (and us) is very excited about this new core framework, with now being open source etc, there are other languages and frameworks out there that are doing what MS is promising to do, for a very very long time now.

推荐答案

ImageSharp

ImageSharp

ImageSharp旨在使图像处理民主化,它为您带来了功能强大而又精美的简单API.

Designed to democratize image processing, ImageSharp brings you an incredibly powerful yet beautifully simple API.

System.Drawing相比,我们能够开发出更灵活,更易于编写代码并且不那么容易发生内存泄漏的东西.全系统范围的流程锁已经一去不复返了. ImageSharp图像是线程安全的,并且在Web环境中完全受支持.

Compared to System.Drawing we have been able to develop something much more flexible, easier to code against, and much, much less prone to memory leaks. Gone are system-wide process-locks; ImageSharp images are thread-safe and fully supported in web environments.

基于.Net Standard 1.1构建.ImageSharp可用于设备,云和嵌入式/IoT场景.

Built against .Net Standard 1.1 ImageSharp can be used in device, cloud, and embedded/IoT scenarios.

这篇关于.Net核心图像处理(裁剪和调整大小)/文件处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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