Git Product home page Git Product logo

imageprocessor's Introduction

ImageProcessorCore

ImageProcessorCore is a new cross-platform 2D graphics API designed to allow the processing of images without the use of System.Drawing.

ImageProcessorCore 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.

For the older ImageFactory based API that uses System.Drawing please check out the Framework branch.

Build status ![Gitter](https://badges.gitter.im/Join Chat.svg)


ImageProcessor Needs Your Help

ImageProcessor is the work of a very, very, small number of developers who struggle balancing time to contribute to the project with family time and work commitments. If the project is to be successful we need more contribution from the community at large. There are several issues, most notably #264 and #347 that we cannot possibly solve on our own.

We, and we believe many others in the community at large want a first-class 2D imaging library with a simple API that is not simply a wrapper round an existing library. We want it to have a low contribution bar which we believe can only happen if the library is written in C#. We want it to be written to cover as many use cases as possible. We want to write the same code once and have it work on any platform supporting .NET Core.

With your help we can make all that a reality.

If you can donate any time to improve on the project, be it helping with documentation, tests or contributing code please do.

Thankyou for reading this

Installation

At present the code is pre-release but when ready it will be available on Nuget.

Pre-release downloads

We already have a MyGet package repository - for bleeding-edge / development NuGet releases.

Manual build

If you prefer, you can compile ImageProcessorCore yourself (please do and help!), you'll need:

To clone it locally click the "Clone in Windows" button above or run the following git commands.

git clone https://github.com/JimBobSquarePants/ImageProcessor

###What works so far/ What is planned?

  • Encoding/decoding of image formats (plugable).
  • Jpeg (Includes Subsampling. Progressive writing required)
  • Bmp (Read: 32bit, 24bit, 16 bit. Write: 32bit, 24bit just now)
  • Png (Read: TrueColor, Grayscale, Indexed. Write: True color, Indexed just now)
  • Gif (Includes animated)
  • Tiff
  • Quantizers (IQuantizer with alpha channel support + thresholding)
  • Octree
  • Xiaolin Wu
  • Palette
  • Basic color structs with implicit operators. Vector backed. #260
  • Color - Float based, premultiplied alpha, No limit to r, g, b, a values allowing for a fuller color range.
  • BGRA32
  • CIE Lab
  • CIE XYZ
  • CMYK
  • HSV
  • HSL
  • YCbCr
  • Basic shape primitives (Vector backed)
  • Rectangle (Doesn't contain all System.Drawing methods)
  • Size
  • Point
  • Ellipse
  • Resampling algorithms. (Optional gamma correction, resize modes, Performance improvements?)
  • Box
  • Bicubic
  • Lanczos2
  • Lanczos3
  • Lanczos5
  • Lanczos8
  • MitchelNetravali
  • Nearest Neighbour
  • Robidoux
  • Robidoux Sharp
  • Spline
  • Triangle
  • Welch
  • Padding
  • Pad
  • ResizeMode.Pad
  • ResizeMode.BoxPad
  • Cropping
  • Rectangular Crop
  • Elliptical Crop
  • Entropy Crop
  • ResizeMode.Crop
  • Rotation/Skew
  • Flip (90, 270, FlipType etc)
  • Rotate by angle and center point (Expandable canvas).
  • Skew by x/y angles and center point.
  • ColorMatrix operations (Uses Matrix4x4)
  • BlackWhite
  • Grayscale BT709
  • Grayscale BT601
  • Hue
  • Saturation
  • Lomograph
  • Polaroid
  • Kodachrome
  • Sepia
  • Achromatomaly
  • Achromatopsia
  • Deuteranomaly
  • Deuteranopia
  • Protanomaly
  • Protanopia
  • Tritanomaly
  • Tritanopia
  • Edge Detection
  • Kayyali
  • Kirsch
  • Laplacian3X3
  • Laplacian5X5
  • LaplacianOfGaussian
  • Prewitt
  • RobertsCross
  • Scharr
  • Sobel
  • Blurring/Sharpening
  • Gaussian blur
  • Gaussian sharpening
  • Box Blur
  • Filters
  • Alpha
  • Contrast
  • Invert
  • BackgroundColor
  • Brightness
  • Pixelate
  • Blend
  • Mask
  • Vignette
  • Glow
  • Threshold
  • Effects
  • Path brush (Need help) #264
  • Pattern brush (Need help) #264
  • Elliptical brush (Need help) #264
  • Gradient brush (vignette? Need help) #264
  • Metadata
  • EXIF (In progress but there's a lot of quirks in parsing EXIF. #78)
  • Other stuff I haven't thought of.

###What might never happen

  • Font support (Depends on new System.Text stuff) I don't know where to start coding this so if you have any pointers please chip in.

###API Changes

With this version the API will change dramatically. Without the constraints of System.Drawing I 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 proces locks with Images and processors thread safe usable in parallel processing utilizing all the availables cores.

Image methods are also fluent which allow chaining much like the ImageFactory class in the Framework version.

Here's an example of the code required to resize an image using the default Bicubic resampler then turn the colors into their grayscale equivalent using the BT709 standard matrix.

using (FileStream stream = File.OpenRead("foo.jpg"))
using (FileStream output = File.OpenWrite("bar.jpg"))
{
    Image image = new Image(stream);
    image.Resize(image.Width / 2, image.Height / 2)
         .Grayscale()
         .Save(output);
}

Individual processors can be initialised and apply processing against images. This allows nesting which brings the potential for powerful combinations of processing methods:

new Brightness(50).Apply(sourceImage, targetImage, sourceImage.Bounds);

For advanced usage the Image<T,TP> class is available allowing developers to implement their own color models in the same manner as Microsoft XNA Game Studio and MonoGame

All in all this should allow image processing to be much more accessible to developers which has always been my goal from the start.

###How can you help?

Please... Spread the word, contribute algorithms, submit performance improvements, unit tests. Help me set up CI for nightly releases.

Performance is a biggie, if you know anything about the new vector types and can apply some fancy new stuff with that it would be awesome.

There's a lot of developers out there who could write this stuff a lot better and faster than I and I would love to see what we collectively can come up with so please, if you can help in any way it would be most welcome and benificial for all.

###The ImageProcessor Team

Grand High Eternal Dictator

Core Team

imageprocessor's People

Contributors

jimbobsquarepants avatar cosmo0 avatar jeavon avatar tbroust-trepia avatar rekvin avatar mweber26 avatar rubensr avatar ullibe avatar yufeih avatar mortenbock avatar dampee avatar voidstar69 avatar dlemstra avatar adamsitnik avatar asapostolov avatar banane9 avatar laurentiumm avatar robbaman avatar digitalhurricane avatar nul800sebastiaan avatar shutdown256 avatar christopherbauer avatar michael-mason avatar pdelvo avatar mellinoe avatar quintinon avatar icanhasjonas avatar masoudrahmani avatar pinki avatar purekrome avatar

Watchers

James Cloos avatar jaenudin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.