Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Funny, you look bigger in real life... Server side image resizing with the free and open source ImageResizer

It's not often I see a full and complete ASP.Net HTTP module made source available or open source, so when I saw this forum post, The best image processing HttpModule is now free and open-source!, I thought it would make a good project to check out.

ImageResizer

Work less, do more

Resize, crop, rotate, watermark, and modify images without ever leaving your code editor or browser, with a simple API.

  • Query string API (all languages)
    image.jpg?width=300
  • Managed API (.NET and COM languages)
    ImageBuilder.Current.Build(source,destination,parameters)

Stop managing multiple image versions. Stop the endless photoshop-upload-test cycle, and let images become the easiest part of your job.

Free

The most popular features are free and open-source:

  • Resizing, cropping, rotating, flipping
  • Borders, drop-shadows, padding, background colors
  • Adjustable Jpeg compression. Multi-page tiff viewing.
  • Animated GIF frame selection. Comprehensive, real-time diagnostics.
  • Basic GIF and PNG encoding

And — no time limits on plugin trials!

One of the first things I look at on open source projects is the license. ImageResizer's is about as open and friendly as can be. Here's a snip;

The ImageResizer Core project (the /Core/ folder and its subdirectories) are licensed under the Resize Freedom license.

This includes all plugins in the ImageResizer.Plugins.Basic namespace. (NoCache,DefaultEncoder,ClientCache,Caption,DropShadow,SizeLimiting, etc.)

Visit http://imageresizingin.net/licenses/freedom for the latest version of the license.

#Image Resizer Freedom license

##License summary:

No restrictions, except you can't use my own code to compete with my own products.

Permitted actions
* Usage
* Modification
* Redistribution
* Sub-licensing (but the original license must be included with the source and binaries)
* Hosting providers may install as a shared library (in the GAC) on their servers.

An exact copy of the [MIT license](http://www.opensource.org/licenses/mit-license.php), but with one extra condition (in bold).

...

Here's a snap of the V3 Alpha 2 Visual Studio Solution

image

Running the solution gives you...

image

Then you an start playing around with it, via its query string API

image

image

image

Nathanael has a the command reference here and here's a snip of all you can do.

SNAGHTMLfe81641

BTW, the web project has a binary reference to the ImageResizer DLL. Which means if you put a break point in the code and run it, you'll never hit it (funny that). Easy enough to fix, just change the binary reference to a project reference and you'll be break pointing away just fine...

image

image

If you're doing any server side image manipulation, would like to see how a HTTP module works, or are interested in image store locations beyond the file system (like Amazon's S3, SQL Server, etc) then ImageResizer's code is calling your name...

Follow the Discussion

  • all http://imageresizingin.net/ are not opening, is it just my problem?

    Update:

    Now it is working fine.

  • Greg Duncangduncan411 It's amazing what a professional photographer can do...

    @amrelgarhy: Actually I'm seeing the problem too (i.e. I can't connect to it now either)... Sad

    Update: It's available for me now. Got to love the inter-tubes... :/

  • ChristianChristian

    Looks like it's down again...anyone get a copy of the source?

  • Stefan BergfeldtStefan Bergfeldt

    Great!
    I've done one myself, but only for resizing and disk cache. That's all i've needed so far, but I'm definately is going to try this one.

  • Using a single resource in multiple variations is also referred to as "single source publishing" in CMS terms. It's a technique that truly eliminates a lot of tedious and error prone work from editors and lets them focus on content authoring.

    However, while this library is a step in the right direction, the use of query strings to parameterize the image processing is a feature that's begging to be exploited. Given enough query string variations, the disk runs out of storage and potentially brings down the service.

    I'm using another technique to achieve comparable features without potentially having the server run out of disk space because of malicious requests. I'm stacking "stream providers" on top of each other as profiles configured in e.g. an XML document. The profiles contains the configuration details of each "stream provider" and makes itself available as single query string parameter (i.e. "image.jpeg?profile=smallProfile").

    While I acknowledge this requires a bit more configuration, it's usually not much of an issue. Once the layout has been approved, all required image translations are basically reproduced as profiles and referenced from the generated markup.

  • Nathanael JonesNathanael Jones

    The disk cache can be size-limited. The querystring approach is used by over 25+ CMSes (just the ones I know), in ASP.NET, php, Ruby, Python, and is quite well proven. So far I haven't heard of anyone bothering to use it as an attack vector.

    Frankly, there are a lot easier ways to bring an ASP.NET site down.

    But I am still working on a set of plugins for 'locking-down' the system even further.

    1) Request Limiting plugin. Preventing too many requests per minute per IP address is the only practical way to limit DOS attacks.

    2) Profiles can be implemented in less than 10 loc with the system, and I will probably provide a plugin for 'limiting' options into preconfigured sets for the truly paranoid.

  • Nathanael JonesNathanael Jones

    Apologies to everyone for the 12 hours of downtime.

    NameCheap support (who handles my registration) changed my host records without permission, in a uninformed and useless attempt to fix their broken e-mail forwarding.

    I fixed the issue immediately once I discovered it, and I've also fixed the e-mail forwarding issue by switching the MX records to a google apps account.

    Both http://imageresizing.net/ and support@imageresizing.net are working properly now.

    And thanks to Greg Duncan for a fantastic article!

  • Nathanael JonesNathanael Jones

    FYI, the correct link to the license is http://imageresizing.net/licenses/freedom

  • David LindeDavid Linde

    We use one of the older versions of the image resizer in our production systems. We will be upgrading soon.

    The image resizer is is awesome, it just works! and its rock solid.

  • Adam SeraiahAdam Seraiah

    From a business perspecitive, this tool is an excellent means to handle image resizing on web sites built for small business owners. I do a lot of online product catalogs with many types of pics of varying size and quality. Trying to teach a client how to resize or crop their product images to make them look professional is difficult at best. With an image resizer like this one, I can standardize the look of the catalog pictures without expecting much effort or knowledge from the client. Large images with high resolution can be handled easily. Probably the most useful feature of this tool is its ability to remove the requirement for two image sizes for the same image. Think of all the web sites that require both thumbnails and a large close up pic for customer review and scrutiny. With this image resizer, you can get both on a single image. Now that is worth a ton of money.

  • Greg Duncangduncan411 It's amazing what a professional photographer can do...

    @Nathanael Jones:License link fixed... Thanks  Smiley

  • nathanaeljonesnathanaeljo​nes Nathanael Jones

    I just posted an article on how to use jCrop and 11 lines of javascript to build a AJAX cropping and resizing solution.

     

    Follow the link to download the sample project. You can view the live demo here.

    It's pretty neat, check it out Smiley

  • KombiServisiKombiServisi

    awesome!
    I've played a little. Looks great. and i already used on my last project's backend. <a href"http://www.mavikombi.com">Mavi Kombi Servisi</a>

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.