/// <summary> /// Writes a single byte to an unmanaged stream. /// </summary> protected unsafe int WriteByte(FreeImageIO io, fi_handle handle, byte value) { return (int)io.writeProc(new IntPtr(&value), 1, 1, handle); }
/// <summary> /// Writes to an unmanaged stream. /// </summary> protected unsafe int Write(FreeImageIO io, fi_handle handle, uint size, uint count, ref byte[] buffer) { fixed (byte* ptr = buffer) { return (int)io.writeProc(new IntPtr(ptr), size, count, handle); } }