Does anyone know of some code (preferably C# although I will take C or C++) that can take a bunch of textures (which can have any width and height) and figure out the most efficient way to pack those textures into 1 or more larger textures? (which need to be a power of two in width/height). The textures (input and output) will be 32bpp RGBA data and I am flexible with what texture formats are being used.
Google hasn't found anything that is useful, NVIDIA has some stuff but it relies on the input textures being a power of 2 in width/height already.