Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there is a method to convert graphics in to an image?
Posted
Comments
Herman<T>.Instance 12-Aug-11 0:24am    
to which image type?

1 solution

yeah! there is process to draw Image from graphics but to accomplish this task you should already have an Image. if you don't have then you can create one and draw to that one.
C#
Image bmp = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(bmp)) {
    // draw in bmp using g
}
bmp.Save(filename);



Reference Link :- Convert Graphics in to Image[^]
and for getting better details have a look there MSDN-[Graphics.FromImage Method][^]
 
Share this answer
 
v2
Comments
Jeremy Shin Woo 12-Aug-11 0:40am    
thanks a lotz

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900