12

Is there a libary for image manipulation (mainly resizing and cropping) that works with .NET Core?

I'm aware of ImageResizer and ImageProcessor, but - as far as I can say - those require the full .NET Framework (dnx451) and won't work with .NET Core (dnxcore50) and therefore would only run on Windows.

Is image manipulation already possible with .NET Core?

Hannes Sachsenhofer
  • 1,835
  • 1
  • 23
  • 38

1 Answers1

20

Huge disclaimer before I answer that I am the author of ImageProcessor.

I've been working for the last 6-7 months on a fully managed version of ImageProcessor for .NET Core called I̶m̶a̶g̶e̶P̶r̶o̶c̶e̶s̶s̶o̶r̶C̶o̶r̶e̶. ImageSharp

It's a work in progress but already contains resizing, cropping algorithms as well as filters, edge detection etc.

You can find it on my Github repo

https://github.com/JimBobSquarePants/ImageProcessor

Update: The library has moved to a new home. https://github.com/JimBobSquarePants/ImageSharp

James South
  • 10,147
  • 4
  • 59
  • 115
  • I installed the package from Nuget but it didn´t work. Any class is found when I try to use it. https://www.nuget.org/packages/ImageSharp/ Thanks. – Gabriel Castillo Prada Nov 18 '16 at 23:25
  • You should probably read the [readme](https://github.com/JimBobSquarePants/ImageSharp#-imagesharp) on the repo and the summary of the [Nuget package page](https://www.nuget.org/packages/ImageSharp). "ImageSharp is still in early stages (alpha) but progress has been pretty quick. As such, please do not use on production environments until the library reaches release candidate status. Pre-release downloads are available from the MyGet package repository." – James South Nov 20 '16 at 23:16
  • 3
    @StefanSteiger Um what?...... It shouldn't take anywhere near that long. You must be running in debug mode or in an environment which doesn't support SIMD. If you have an issue don't slag the library off here, that's useless. Raise a constructive issue on the appropriate tracker. – James South Apr 13 '17 at 04:55
  • @James South: Yes, performance benchmarking on IIS Express on my laptop, in debug mode from Visual Studio. Why would I see such a grossly different result in debug-mode ? I mean sure, debug mode is a little slower, but that much ? ... Also, when I step-trough debug code that resizes a lot of images into a PDF (amongst other things), I don't like to wait 13 seconds for each image, either.Yes, supports SSE 1,2,3,4.1, 4.2 but not 4a. Also supports FPU, MMX, but not MMXEXT and not 3DNOW and not 3DNOWEXT. – Stefan Steiger Apr 13 '17 at 09:38
  • Is your IIS environment running in the default 32bit mode? That will likely explain most of the slowdown. 32bit SIMD support is coming with NetStandard 2.0. We depend heavily on SIMD for our transforms and support is growing. It's a good investment for us tech wise. – James South Apr 14 '17 at 01:23
  • 1
    @StefanSteiger If you reference ImageSharp from [it's MyGet package](https://www.myget.org/gallery/imagesharp), it should be faster. The problem is that you are including ImageSharp source code into your project, running the whole stuff in DEBUG. Try including another fully managed data processing library you like and consider to be fast at source level, and ... it will be slow! Also: if you compile the native C/C++ core of other image processing libraries from source in debug mode, you will experience a similar slowdown. Your comparison method is incorrect! – antonfrv Apr 20 '17 at 19:29