Well, I did eventually get it working. As Jens suspected, something was wrong with the generated Bitmap
, which was causing the PictureBox
to freak out (silently) and not display it. The following code, for some unknown reason, works:
Function TileImage(Tile As SixteenColorBitmap) As Bitmap
Dim b As New Bitmap(16, 16)
For y = 1 To 16
For x = 1 To 16
Dim t = Tile.Color(x - 1, y - 1)
Dim c As Color = Drawing.Color.FromArgb(255, t.Item1, t.Item2, t.Item3)
b.SetPixel(x - 1, y - 1, c)
Next
Next
Return b
End Function
Instead of manually doing the scale, I have the 32x32 control display my 16x16 image.