riceman0
asked on
Create a bitmap from raw RGB data?
Hey, I have three arrays, R(10,10) as byte, G(10,10) as byte, and B(10, 10) as byte, with data in them.
What's the easiest way to create a bitmap object populated with this pixel color data?
Thanks.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Dim i as Integer
Dim j as Integer
bmp = new Bitmap(10, 10, PixelFormat.Format24bppRgb
for i = 0 to 10
for j = 0 to 10
bmp.SetPixel(i, j, Color.FromARGB(R(i, j), G(i, j), B(i, j)
next
next