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
Ejemplo n.º 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
     }));
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 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
     }));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Draws plane to bitmap.
 /// </summary>
 public Image Render()
 {
     byte[] baked = GetBaked();
     return(Drawing.DrawBitmap(baked, Background.GetWidth(), Background.GetHeight(), Palette));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 8
0
 public virtual Image Render(RenderOptions options)
 {
     return(Drawing.DrawBitmap(ImageData, GetWidth(), GetHeight(), options));
 }