Click here to Skip to main content
Click here to Skip to main content

Fast Optimizing Rectangle Packing Algorithm for Building CSS Sprites

By , 14 Jun 2011
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mapper
{
    /// <summary>
    /// Describes an image. Note that this only defines those properties that are relevant when
    /// it comes to mapping an image onto a sprite - its width and height. So for example image file
    /// name is not needed here.
    /// 
    /// This is called IImageInfo rather than IImage, because System.Drawing already defines an Image class.
    /// </summary>
    public interface IImageInfo
    {
        int Width { get; }
        int Height { get; }
    }
}

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Matt Perdeck
Web Developer
Australia Australia
Matt has over 6 years .NET and SQL Server development experience. Before getting into .Net, he worked on a number of systems, ranging from the largest ATM network in The Netherlands to embedded software in advanced Wide Area Networks and the largest ticketing web site in Australia. He has lived and worked in Australia, The Netherlands, Slovakia and Thailand.
 
He recently wrote a book, ASP.NET Performance Secrets (www.packtpub.com/asp-net-site-performance-secrets/book) in which he shows in clear and practical terms how to quickly find the biggest bottlenecks holding back the performance of your web site, and how to then remove those bottlenecks. The book deals with all environments affecting a web site - the web server, the database server and the browser.
 
Matt's blog is mattperdeck.com
 
Matt currently lives in Sydney, Australia, where he works at Readify, a high profile software consultancy.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130619.1 | Last Updated 14 Jun 2011
Article Copyright 2011 by Matt Perdeck
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid