---
title: "apply(withTiledExtent:inputs:arguments:)"
framework: coreimage
role: symbol
role_heading: Type Method
path: "coreimage/ciimageprocessorkernel/apply(withtiledextent:inputs:arguments:)"
---

# apply(withTiledExtent:inputs:arguments:)

Call this method on your Core Image Processor Kernel subclass to create a new image based on an array of tile extents that together cover the output.

## Declaration

```swift
class func apply(withTiledExtent tileExtents: [CIVector], inputs: [CIImage]?, arguments args: [String : Any]?) throws -> CIImage
```

## Parameters

- `tileExtents`: The array of bounding rectangles that the CIImageProcessorKernel can produce. Each rectangle in the array is an object created using /CIVector/vectorWithCGRect: This method will return CIImage.emptyImage if the rectangles in the array have gaps or overlaps.
- `inputs`: An array of doc://com.apple.coreimage/documentation/CoreImage/CIImage objects to use as input.

## Return Value

Return Value  An autoreleased CIImage

## Discussion

Discussion Each tile is a CGRect encoded as a CIVector using +[CIVector vectorWithCGRect:]. The overall output extent is computed as the union of all tile extents. This method will return nil and an error if: calling outputFormat on your subclass returns an unsupported format. calling formatForInput(at:) on your subclass returns an unsupported format. your subclass does not implement process(with:arguments:output:)
