J
Jeremy
I am defining a bitmap pixel by pixel, and I searched through the documentation,
but could not find an obvious fast way to do what I want. My first attempt used
the underlying graphics object to draw 1 by 1 rectangles. This was SLOOOOOOW.
It took about 1800 milliseconds for a bitmap that was pretty small. Using the
following code, I got it down to 500 milliseconds, but that is still pretty slow.
For y As Integer = 0 To bmp.Height - 1
For x As Integer = 0 To bmp.Width - 1
bmp.SetPixel(x, y, SomeColor)
Next
Next
I'm looking for something like Java's MemoryImageSource class where I can just
create an array of values, then create an Image from that. Any ideas?
but could not find an obvious fast way to do what I want. My first attempt used
the underlying graphics object to draw 1 by 1 rectangles. This was SLOOOOOOW.
It took about 1800 milliseconds for a bitmap that was pretty small. Using the
following code, I got it down to 500 milliseconds, but that is still pretty slow.
For y As Integer = 0 To bmp.Height - 1
For x As Integer = 0 To bmp.Width - 1
bmp.SetPixel(x, y, SomeColor)
Next
Next
I'm looking for something like Java's MemoryImageSource class where I can just
create an array of values, then create an Image from that. Any ideas?