Change a bitmap

From: Lachlan (anonymous_at_discussions.microsoft.com)
Date: 10/28/04


Date: Thu, 28 Oct 2004 08:32:50 -0700

Hi,

Does anyone know how I can draw some images onto a
background image and then save the image to a file? I
thought an easy way would be to draw the images onto a
graphics object using the DrawImageMethod() then save it
but I can't figure out how to save the graphics object to
a file.

Bitmap myImg = new Bitmap(@"porche.jpg");
Graphics g = Graphics.FromImage(curBitmap);
g.DrawImage(myImg, 0, 0, myImg.Width, myImg.Height);

How can I save this Graphics object to a file?

Thanks,
Lachlan



Relevant Pages

  • Re: Writing Text on an Image.
    ... Create a new System.Drawing.Bitmap class and load it with the image ... Get a graphics object from the Bitmap using Graphics.FromImage ... > images and use it for there own purpose. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Writing Text on an Image.
    ... "James Westgate" wrote: ... Get a graphics object from the Bitmap using Graphics.FromImage ... >> but the design is still visible. ... >> images and use it for there own purpose. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: resize gif image
    ... It means resize them to 100x100. ... System.Drawing.Image oThumbNail = new Bitmap(FileWidth, FileHeight, ... //make rectangle from Graphics object (resize) ... It works well for jpeg images, but I get error when work with gif ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: problem with resizing 32bppArgb images
    ... resolution difference - when drawing to the screen the graphics object ... are making images smaller than the original screen image, ... scaled images now look "perfect" on the screen. ... send that to the graphics service or whatever is feeding the printer. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Transparent bitmaps
    ... because code to draw images is there already (e.g. ... the .NET Compact Framework itself. ... > color based on index, if any, is to be transparent in the the image when ...
    (microsoft.public.dotnet.framework.compactframework)