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]); } }
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]); } }