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

This commit is contained in:
chrisf
2007-06-22 09:19:39 +00:00
parent 0710d99265
commit 73c4ee6817
6 changed files with 39 additions and 2 deletions

View File

@@ -23,10 +23,12 @@ namespace ShpViewer
{
byte[] imageBytes = h.Image;
Bitmap bitmap = new System.Drawing.Bitmap( shpReader.Width, shpReader.Height );
Palette pal = new Palette(File.OpenRead("../../../temperat.pal"));
Bitmap bitmap = new Bitmap( shpReader.Width, shpReader.Height );
for( int x = 0 ; x < shpReader.Width ; x++ )
for( int y = 0 ; y < shpReader.Height ; y++ )
bitmap.SetPixel( x, y, Color.FromArgb( imageBytes[ x + shpReader.Width * y ], 0, 0 ) );
bitmap.SetPixel( x, y, pal.GetColor(imageBytes[ x + shpReader.Width * y ]) );
bitmaps.Add( bitmap );
}