---
title: edgePreserveUpsample()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/edgepreserveupsample()
---

# edgePreserveUpsample()

Creates a high-quality upscaled image.

## Declaration

```swift
class func edgePreserveUpsample() -> any CIFilter & CIEdgePreserveUpsample
```

## Return Value

Return Value The adjusted image.

## Discussion

Discussion This method applies the edge preserve upsample filter to an image. The effect upsamples a small input image to be the size of the scale image using the luminance of the input image to preserve detail. The edge preserve upsample filter uses the following properties: The following code creates a filter that upscales the smaller image to the size of the scale image: func edgePerserveUp(inputImage: CIImage, smallImage: CIImage) -> CIImage {     let edgePerserveUpFilter = CIFilter.edgePreserveUpsample()     edgePerserveUpFilter.inputImage = inputImage     edgePerserveUpFilter.smallImage = smallImage     edgePerserveUpFilter.spatialSigma = 5     edgePerserveUpFilter.lumaSigma = 0.15     return edgePerserveUpFilter.outputImage! }

## See Also

### Filters

- [bicubicScaleTransform()](coreimage/cifilter-swift.class/bicubicscaletransform().md)
- [keystoneCorrectionCombined()](coreimage/cifilter-swift.class/keystonecorrectioncombined().md)
- [keystoneCorrectionHorizontal()](coreimage/cifilter-swift.class/keystonecorrectionhorizontal().md)
- [keystoneCorrectionVertical()](coreimage/cifilter-swift.class/keystonecorrectionvertical().md)
- [lanczosScaleTransform()](coreimage/cifilter-swift.class/lanczosscaletransform().md)
- [perspectiveCorrection()](coreimage/cifilter-swift.class/perspectivecorrection().md)
- [perspectiveRotate()](coreimage/cifilter-swift.class/perspectiverotate().md)
- [perspectiveTransform()](coreimage/cifilter-swift.class/perspectivetransform().md)
- [perspectiveTransformWithExtent()](coreimage/cifilter-swift.class/perspectivetransformwithextent().md)
- [straighten()](coreimage/cifilter-swift.class/straighten().md)
