public static SaveBitmap ( |
||
bitmap | ||
fileName | string | |
imageFormat | ||
return | void |
// For bitmap or PDF background, write the bitmap to the given file with the given format. public void WriteBitmapMap(string fileName, ImageFormat format, out float dpi) { dpi = this.bitmapDpi; Bitmap bmp = ((GDIPlus_Bitmap)bitmap).Bitmap; BitmapUtil.SaveBitmap(bmp, fileName, format); }
// Write all the image bitmaps. Also updates the file names in the templates to the full path names. private void WriteImageBitmaps(Map map) { using (map.Write()) { List <TemplateInfo> templates = new List <TemplateInfo>(map.Templates); foreach (BitmapToWrite bitmapToWrite in BitmapsToWrite()) { BitmapUtil.SaveBitmap(bitmapToWrite.Bitmap, bitmapToWrite.FullPath, bitmapToWrite.Format); for (int i = 0; i < templates.Count; ++i) { if (templates[i].absoluteFileName == bitmapToWrite.Name) { templates[i] = templates[i].UpdateFileName(bitmapToWrite.FullPath); } } } map.Templates = templates; } }