Coder Social home page Coder Social logo

sthapa123 / dynamic-image Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tgjones/dynamic-image

0.0 1.0 0.0 69.46 MB

DynamicImage is a high-performance image manipulation library for ASP.NET

Home Page: http://dynamicimage.apphb.com/

License: Other

Pascal 0.08% C# 85.31% CSS 3.18% ASP 0.03% JavaScript 0.58% HLSL 2.65% PowerShell 8.08% Batchfile 0.10%

dynamic-image's Introduction

DynamicImage

Build status

This is the source code repository for DynamicImage, an open source image manipulation library for ASP.NET. DynamicImage helps you simplify the way you deal with images in your ASP.NET websites.

Links

API

DynamicImage allows images to be created in two ways:

  1. Programmatically, using the object model:

     Composition composition = new Composition();
     composition.Layers.Add(new ImageLayer
     {
     	SourceFileName = "~/Assets/Images/AutumnLeaves.jpg",
     	Filters =
     	{
     		new ResizeFilter { Width = Unit.Pixel(800), Mode = ResizeMode.UseWidth }
     	}
     });
     composition.Layers.Add(new TextLayer
     {
     	Text = "Hello World",
     	Filters =
     	{
     		new OuterGlowFilter()
     	}
     });
     string url = ImageUrlGenerator.GetImageUrl(composition);
    
  2. Programmatically, using a fluent interface:

     string imageUrl = new CompositionBuilder()
     	.WithLayer(LayerBuilder.Image.SourceFile("myimage.png")
     		.WithFilter(FilterBuilder.Resize.ToWidth(800))
     	)
     	.WithLayer(LayerBuilder.Text.Text("Hello World")
     		.WithFilter(FilterBuilder.OuterGlow)
     	).Url;
    

Layers

Images in DynamicImage are composed of one or more layers, and each layer can have zero or more filters applied. DynamicImage includes several built-in layer types, and it is straightforward to create your own.

  • Image Layer
  • Fractal Layer (Julia and Mandelbrot)
  • Polygon Shape Layer
  • Rectangle Shape Layer
  • Text Layer

Image Sources

Image Layers accept input from a variety of sources, and it is also straightforward to write your own ImageSource. The image sources included with DynamicImage let you load images from:

  • Raw bytes
  • Binary database field
  • File
  • Remote URL
  • System.Windows.Media.Imaging.BitmapSource object

Filters

Filters are applied to layers to modify them in some way. DynamicImage provides more than 15 filters you can apply to your images, including:

  • Brightness Adjustment
  • Clipping Mask
  • Colour Key
  • Colour Tint
  • Contrast Adjustment
  • Crop
  • Distort Corners
  • Drop Shadow
  • Emboss
  • Feather
  • Gaussian Blur
  • Grayscale
  • Inversion
  • Opacity Adjustment
  • Outer Glow
  • Resize
  • Rotation
  • Sepia
  • Shiny Floor

Caching

Output images can be cached, based on settings in web.config. You can write your own cache provider, and the built-in cache providers are:

  • In-memory
  • XML file

Underpinnings

DynamicImage uses Windows Presentation Foundation (WPF) internally for bitmap manipulation. Most of the filters are written as WPF shader effects, which are compiled into fast SSE instructions, and run with good performance in a server environment.

More information

The DynamicImage website includes a getting started guide, as well as examples of every layer and filter.

If you get stuck, you can try:

Preferably in that order, please :)

Acknowledgements

DynamicImage was created by Sound in Theory Ltd, a web design company based in Exeter, United Kingdom.
Sound in Theory Ltd

dynamic-image's People

Contributors

mikhail-fedosenko avatar jaytwo avatar dieron avatar mzywitza avatar

Watchers

James Cloos 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.