<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/comicEffect()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)comicEffectFilter"
  },
  "title" : "comicEffect()"
}
-->

# comicEffect()

Creates an image with a comic book effect.

```
class func comicEffect() -> any CIFilter & CIComicEffect
```

## Return Value

The modified image.

## Discussion

This method applies the comic effect filter to an image. The effect simulates a comic book drawing by outlining edges and applying a color halftone effect.

The comic effect filter uses the following property:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).

The following code creates a filter that results in the image appearing image in comic book style.

```swift
func comicEffect(inputImage: CIImage) -> CIImage {
    let comicEffectFilter = CIFilter.comicEffect()
    comicEffectFilter.inputImage = inputImage
    return comicEffectFilter.outputImage!
}
```

![Two photographs of a beach at sunset with multiple palm trees. The photo on the left is clear and crisp. In the photo on the right, a comic effect filter is applied, and the image is brighter with a series of colorful dots creating the detail of the image.](images/com.apple.coreimage/media-3601088@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)