예제 #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);
        }
예제 #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;
		}