DrawBitmap() public static method

Computes height and draws bitmap.
public static DrawBitmap ( byte data, int width, byte palette ) : Bitmap
data byte /// Image pixel data. ///
width int /// Output image width. ///
palette byte /// Used palette index. ///
return System.Drawing.Bitmap
コード例 #1
0
 /// <summary>
 /// Draws the thumbnail to bitmap.
 /// </summary>
 /// <returns>
 /// Drawn image.
 /// </returns>
 public Image RenderTiny(RenderOptions options)
 {
     return(Drawing.DrawBitmap(Tiny.ImageData, Tiny.Width, Tiny.Height, new RenderOptions(options)
     {
         Palette = options.Palette ?? Palette
     }));
 }
コード例 #2
0
        public override Image Render(RenderOptions options)
        {
            if (FramesCount == 0)
            {
                return(null);
            }
            var frame = Frames[options.Frame % FramesCount];

            return(Drawing.DrawBitmap(frame.ImageData, frame.Width, frame.Height, options));
        }
コード例 #3
0
 /// <summary>
 /// Draws the image to bitmap using rendering options.
 /// </summary>
 /// <param name="options">
 /// Rendering options.
 /// </param>
 /// <returns>
 /// Drawn image.
 /// </returns>
 public override Image Render(RenderOptions options)
 {
     if (options == null)
     {
         return(this.Render());
     }
     return(Drawing.DrawBitmap(ImageData, Width, Height, new RenderOptions(options)
     {
         Palette = options.Palette ?? Palette
     }));
 }
コード例 #4
0
 /// <summary>
 /// Draws the thumbnail to bitmap.
 /// </summary>
 /// <returns>
 /// Drawn image.
 /// </returns>
 public Image RenderTiny()
 {
     return(Drawing.DrawBitmap(Tiny.ImageData, Tiny.Width, Tiny.Height, Palette));
 }
コード例 #5
0
 /// <summary>
 /// Draws the image to bitmap using its own palette.
 /// </summary>
 /// <returns>
 /// Drawn image.
 /// </returns>
 public Image Render()
 {
     return(Drawing.DrawBitmap(ImageData, Width, Height, Palette));
 }
コード例 #6
0
 /// <summary>
 /// Draws plane to bitmap.
 /// </summary>
 public Image Render()
 {
     byte[] baked = GetBaked();
     return(Drawing.DrawBitmap(baked, Background.GetWidth(), Background.GetHeight(), Palette));
 }
コード例 #7
0
 /// <summary>
 /// Draws plane to bitmap using other palette.
 /// </summary>
 public Image Render(RenderOptions options)
 {
     byte[] baked = GetBaked();
     return(Drawing.DrawBitmap(baked, Background.GetWidth(), Background.GetHeight(), options));
 }
コード例 #8
0
ファイル: ImageBase.cs プロジェクト: cvogt/AlbLib
 public virtual Image Render(RenderOptions options)
 {
     return(Drawing.DrawBitmap(ImageData, GetWidth(), GetHeight(), options));
 }