---
title: QCPlugInInputImageSource
framework: quartz
role: symbol
role_heading: Protocol
path: quartz/qcplugininputimagesource
---

# QCPlugInInputImageSource

The QCPlugInInputImageSource protocol eliminates the need to use explicit image types for the image input ports on your custom patch. Not only does using the protocol avoid restrictions of a specific image type, but it avoids impedance mismatches, and provides better performance by deferring pixel computation until it is needed. When you need to access the pixels in an image, you simply convert the image to a representation (texture or buffer) using one of the methods defined by the QCPlugInInputImageSource protocol. Use a texture representation when you want to use input images on the GPU. Use a buffer representation when you want to use input images on the CPU.

## Declaration

```swift
protocol QCPlugInInputImageSource
```

## Overview

Overview Input images are opaque source objects that comply to this protocol. To create an image input port as an Objective-C 2.0 property, declare it as follows: @property(dynamic) id<QCPlugInInputImageSource> inputImage; To create an image input port dynamically. use the type QCPortTypeImage: [self addInputPortWithType:QCPortTypeImage                     forKey:@"inputImage"             withAttributes:nil];

## Topics

### Converting an Image to a Representation

- [lockTextureRepresentation(with:forBounds:)](quartz/qcplugininputimagesource/locktexturerepresentation(with:forbounds:).md)
- [unlockTextureRepresentation()](quartz/qcplugininputimagesource/unlocktexturerepresentation().md)
- [lockBufferRepresentation(withPixelFormat:colorSpace:forBounds:)](quartz/qcplugininputimagesource/lockbufferrepresentation(withpixelformat:colorspace:forbounds:).md)
- [bindTextureRepresentation(toCGLContext:textureUnit:normalizeCoordinates:)](quartz/qcplugininputimagesource/bindtexturerepresentation(tocglcontext:textureunit:normalizecoordinates:).md)
- [unbindTextureRepresentation(fromCGLContext:textureUnit:)](quartz/qcplugininputimagesource/unbindtexturerepresentation(fromcglcontext:textureunit:).md)
- [unlockBufferRepresentation()](quartz/qcplugininputimagesource/unlockbufferrepresentation().md)

### Getting Color Space Information

- [imageColorSpace()](quartz/qcplugininputimagesource/imagecolorspace().md)
- [shouldColorMatch()](quartz/qcplugininputimagesource/shouldcolormatch().md)

### Getting Texture Information

- [texturePixelsWide()](quartz/qcplugininputimagesource/texturepixelswide().md)
- [texturePixelsHigh()](quartz/qcplugininputimagesource/texturepixelshigh().md)
- [textureTarget()](quartz/qcplugininputimagesource/texturetarget().md)
- [textureName()](quartz/qcplugininputimagesource/texturename().md)
- [textureColorSpace()](quartz/qcplugininputimagesource/texturecolorspace().md)
- [textureFlipped()](quartz/qcplugininputimagesource/textureflipped().md)
- [textureMatrix()](quartz/qcplugininputimagesource/texturematrix().md)

### Getting Image Buffer Information

- [imageBounds()](quartz/qcplugininputimagesource/imagebounds().md)
- [bufferPixelsWide()](quartz/qcplugininputimagesource/bufferpixelswide().md)
- [bufferPixelsHigh()](quartz/qcplugininputimagesource/bufferpixelshigh().md)
- [bufferPixelFormat()](quartz/qcplugininputimagesource/bufferpixelformat().md)
- [bufferColorSpace()](quartz/qcplugininputimagesource/buffercolorspace().md)
- [bufferBaseAddress()](quartz/qcplugininputimagesource/bufferbaseaddress().md)
- [bufferBytesPerRow()](quartz/qcplugininputimagesource/bufferbytesperrow().md)

## See Also

### Protocols

- [QCCompositionParameterViewDelegate](quartz/qccompositionparameterviewdelegate.md)
- [QCCompositionPickerViewDelegate](quartz/qccompositionpickerviewdelegate.md)
- [QCCompositionRenderer](quartz/qccompositionrenderer.md)
- [QCPlugInContext](quartz/qcplugincontext.md)
- [QCPlugInOutputImageProvider](quartz/qcpluginoutputimageprovider.md)
