Mongoose
January 31st, 2003, 12:48 PM
Could someone tell me how, using the Bitmap or Image classes, I can take a bitmap and append on to the end of another bitmap. Also, the bitmap's will have the same width. I just need to append another image to the end of the previous one in memory. I noticed there is an Image.FromStream function but I'm still lost as to how to append it onto another image...
Thanks,
- J
pareshgh
January 31st, 2003, 02:40 PM
[FONT=arial][SIZE=3]
2 Ways
[SIZE=1]
Method 1:
Create a new bitmap and copy from 2 bitmap pixel wise pixel.
(make sure you check for processing speed)
Method 2 :
render the two bitmap halves onto another bitmap
for example,
Bitmap dstBitmap = new Bitmap(width, height);
using(Graphics g = Graphics.FromImage(dstBitmap))
{
g.DrawImage(srcBitmap1,dstX1,dstY1,scrRect1,GraphicsUnit.Pixel);
g.DrawImage(srcBitmap2,dstX2,dstY2,scrRect2,GraphicsUnit.Pixel);
}
IMO this should work more elegant
:o
let me know if this works for you
;)
Paresh