/// <summary> /// Initializes a new instance of the <see cref="BitmapWorker"/> class. /// </summary> /// <param name="a">a.</param> BitmapWorker(System.Drawing.Bitmap a) { holder = new LockBitmap(a); if (!bitmaplock) { holder.LockBits(); bitmaplock = true; } }
/// <summary> /// Sets the pixel. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="color">The color.</param> public void SetPixel(int x, int y, Color color) { if (!bitmaplock) { holder.LockBits(); bitmaplock = true; } holder.SetPixel(x, y, color); }
/// <summary> /// Initializes a new instance of the <see cref="BitmapWorker"/> class. /// </summary> /// <param name="filename">The filename.</param> public BitmapWorker(String filename) { holder = new LockBitmap(new System.Drawing.Bitmap(filename)); if (!bitmaplock) { holder.LockBits(); bitmaplock = true; } }