/// <summary>
/// Converts this instance to a <see cref="Bitmap"/> using the specified <see cref="ImageFormat"/>.
/// Supported formats are: Bmp, Gif, Icon, Jpeg, Png, Tiff.
/// </summary>
/// <param name="imageFormat">The image format.</param>
/// <returns>A <see cref="Bitmap"/> that has the specified <see cref="ImageFormat"/></returns>
public Bitmap ToBitmap(ImageFormat imageFormat)
{
Format = MagickFormatInfo.GetFormat(imageFormat);
MemoryStream memStream = new MemoryStream();
Write(memStream);
memStream.Position = 0;
/* Do not dispose the memStream, the bitmap owns it. */
return(new Bitmap(memStream));
}