{
Graphics graphics = Graphics.FromImage(bitmap);graphics.SmoothingMode =
SmoothingMode.AntiAlias;graphics.ScaleTransform(scale, scale);
graphics.Clear(
Color.White);page.Draw(graphics);
bitmap.Save(
"C:\\Image.tiff", ImageFormat.Tiff);}
As you can see in the code above, I am generating a Bitmap and saving it as image.tiff. I want to beable to re-run this piece of code over and over, but the bitmap.save does not allow you to re-write over the same file, how to I achieve this

How to overwrite an existing Bitmap file
RadioDon
public class BitmapSaver
{
private BitmapSaver()
{
// Hide ctor.
}
public void Save( Bitmap bitmap, string filename )
{
Graphics graphics = Graphics.FromImage(bitmap);
graphics.SmoothingMode = SmoothingMode.AntiAlias;
graphics.ScaleTransform(scale, scale);
graphics.Clear(Color.White);
page.Draw(graphics);
bitmap.Save("filename", ImageFormat.Tiff);
}
}
CYBURT
Hey PJ,
Unfortunately that doesn't work because I still can't save over the save tiff file over and over!
JEsraelo
public class BitmapSaver
{
private BitmapSaver()
{
// Hide ctor.
}
public void Save( Bitmap bitmap )
{
Graphics graphics = Graphics.FromImage(bitmap);
graphics.SmoothingMode = SmoothingMode.AntiAlias;
graphics.ScaleTransform(scale, scale);
graphics.Clear(Color.White);
page.Draw(graphics);
bitmap.Save("C:\\Image.tiff", ImageFormat.Tiff);
}
}