Exemplo n.º 1
0
        public static GPUImageRawDataInput FromBytes(byte[] bytesToUpload, CGSize imageSize, GPUPixelFormat pixelFormat, GPUPixelType pixelType)
        {
            var handle = GCHandle.Alloc(bytesToUpload, GCHandleType.Pinned);
            var ptr    = handle.AddrOfPinnedObject();

            var instance = new GPUImageRawDataInput(ptr, imageSize, pixelFormat, pixelType);

            instance.bytesHandle = handle;

            return(instance);
        }
Exemplo n.º 2
0
		public static GPUImageRawDataInput FromBytes (byte[] bytesToUpload, CGSize imageSize, GPUPixelFormat pixelFormat, GPUPixelType pixelType)
		{
			var handle = GCHandle.Alloc (bytesToUpload, GCHandleType.Pinned);
			var ptr = handle.AddrOfPinnedObject ();

			var instance = new GPUImageRawDataInput (ptr, imageSize, pixelFormat, pixelType);
			instance.bytesHandle = handle;

			return instance;
		}