git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1070 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
bob
2007-06-24 14:46:57 +00:00
parent 0b773950a9
commit b83b17385d
11 changed files with 146 additions and 30 deletions

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace OpenRa.FileFormats
{
public static class BitmapBuilder
{
public static Bitmap FromBytes( byte[] imageBytes, int width, int height, Palette pal )
{
Bitmap bitmap = new Bitmap( width, height );
for( int x = 0 ; x < width ; x++ )
for( int y = 0 ; y < height ; y++ )
bitmap.SetPixel( x, y, pal.GetColor( imageBytes[ x + width * y ] ) );
return bitmap;
}
}
}