Add PdfRendererImageFormat

This commit is contained in:
BobLd 2020-11-23 12:44:23 +00:00
parent 68e487d5ff
commit 3c510c62f2
2 changed files with 35 additions and 1 deletions

View File

@ -13,7 +13,8 @@ namespace UglyToad.PdfPig.Rendering
/// </summary>
/// <param name="page">The pdf page.</param>
/// <param name="scale">The scale to apply to the page (i.e. zoom level).</param>
/// <param name="imageFormat">The output image format, if supported.</param>
/// <returns>The image as a memory stream.</returns>
MemoryStream Render(Page page, double scale);
MemoryStream Render(Page page, double scale, PdfRendererImageFormat imageFormat);
}
}

View File

@ -0,0 +1,33 @@
namespace UglyToad.PdfPig.Rendering
{
/// <summary>
/// The output image format of the <see cref="IPageImageRenderer"/>.
/// </summary>
public enum PdfRendererImageFormat : byte
{
/// <summary>
/// Bitmap image format.
/// </summary>
Bmp,
/// <summary>
/// Jpeg/Jpg image format.
/// </summary>
Jpeg,
/// <summary>
/// Png image format.
/// </summary>
Png,
/// <summary>
/// Tiff image format.
/// </summary>
Tiff,
/// <summary>
/// Gif image format.
/// </summary>
Gif
}
}