public override void RequestInternalBuffer(ref ImgBufferRequestArgs buffRequest) { if (pixelFormat != CpuBlit.Imaging.PixelFormat.ARGB32) { throw new NotSupportedException(); } int[] newBuff = new int[this.pixelBuffer.Length]; Buffer.BlockCopy(this.pixelBuffer, 0, newBuff, 0, newBuff.Length); buffRequest.OutputBuffer32 = newBuff; }
public override void RequestInternalBuffer(ref ImgBufferRequestArgs buffRequest) { var bmpData = innerImage.LockBits(new System.Drawing.Rectangle(0, 0, width, height), System.Drawing.Imaging.ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); int size = bmpData.Width * bmpData.Height; int[] newBuff = new int[size]; System.Runtime.InteropServices.Marshal.Copy(bmpData.Scan0, newBuff, 0, size); innerImage.UnlockBits(bmpData); buffRequest.OutputBuffer32 = newBuff; }
public override void RequestInternalBuffer(ref ImgBufferRequestArgs buffRequest) { if (rawIntBuffer != null) { int[] newBuff = new int[rawIntBuffer.Length]; Buffer.BlockCopy(rawIntBuffer, 0, rawIntBuffer, 0, newBuff.Length); buffRequest.OutputBuffer32 = newBuff; } //else if (rawBuffer != null) //{ // byte[] newBuff = new byte[rawBuffer.Length]; // Buffer.BlockCopy(rawBuffer, 0, newBuff, 0, rawBuffer.Length); // buffRequest.OutputBuffer = newBuff; //} else { } }
public abstract void RequestInternalBuffer(ref ImgBufferRequestArgs buffRequest);
public override void RequestInternalBuffer(ref ImgBufferRequestArgs buffRequest) { throw new NotImplementedException(); }