/// <summary> /// Creates a new <see cref="PDFiumBitmap"/>. Unmanaged memory is allocated which must /// be freed by calling <see cref="Dispose"/>. /// </summary> /// <param name="width">The width of the new bitmap.</param> /// <param name="height">The height of the new bitmap.</param> /// <param name="hasAlpha">A value indicating wheter the new bitmap has an alpha channel.</param> /// <remarks> /// A bitmap created with this overload always uses 4 bytes per pixel. /// Depending on <paramref name="hasAlpha"/> the <see cref="Format"/> is then either /// <see cref="BitmapFormats.FPDFBitmap_BGRA"/> or <see cref="BitmapFormats.FPDFBitmap_BGRx"/>. /// </remarks> public PDFiumBitmap(int width, int height, bool hasAlpha) : this(PDFium.FPDFBitmap_Create(width, height, hasAlpha), hasAlpha ? BitmapFormats.FPDFBitmap_BGRA : BitmapFormats.FPDFBitmap_BGRx) { }