---
title: "stylize(image:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mlstyletransfer/stylize(image:)"
---

# stylize(image:)

Applies the style the model learned to an image.

## Declaration

```swift
func stylize(image: CGImage) throws -> CGImage?
```

## Parameters

- `image`: An input image the model applies its style to.

## Return Value

Return Value An image of type CGImage stylized using style of the model.

## Discussion

Discussion note: MLCreateError.generic if stylization fails.
