コード例 #1
0
 protected override void ToBitmapInner(System.Drawing.Bitmap bmp, System.Drawing.Imaging.BitmapData bmd)
 {
     for (int i = 0; (i < Pixels.Count) && (i / Width < Height); i++)
     {
         bmd.SetPixel8bpp(i % Width, i / Width, Pixels[i]);
     }
 }
コード例 #2
0
        protected override void ToBitmapInner(System.Drawing.Bitmap bmp, System.Drawing.Imaging.BitmapData bmd)
        {
            // Above portrait
            for (int i = 0; (i < this.Pixels.Count) && (i / Width < topHeight); i++)
            {
                bmd.SetPixel8bpp(i % Width, i / Width, Pixels[i]);
            }

            // Compressed part
            for (int i = (topHeight + portraintHeight) * Width; (i < this.Pixels.Count) && (i / Width < Height); i++)
            {
                bmd.SetPixel8bpp(i % Width, i / Width - portraintHeight, Pixels[i]);
            }

            // Portrait part
            for (int i = topHeight * Width; (i < this.Pixels.Count) && (i / Width < (topHeight + portraintHeight)); i++)
            {
                bmd.SetPixel8bpp(i % Width, i / Width + compressedHeight, Pixels[i]);
            }
        }