<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLStyleTransfer/DataSource/processImages(textelDensity:styleImageDestination:contentImagesDestination:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML15MLStyleTransferV10DataSourceO13processImages13textelDensity21styleImageDestination07contenthM010Foundation3URLV014processedStyleL0_AL0q7ContentH0tSi_ALSgAOtKF"
  },
  "title" : "processImages(textelDensity:styleImageDestination:contentImagesDestination:)"
}
-->

# processImages(textelDensity:styleImageDestination:contentImagesDestination:)

Converts the content images to square images and saves them to a destination directory.

```
func processImages(textelDensity: Int, styleImageDestination: URL? = nil, contentImagesDestination: URL? = nil) throws -> (processedStyleImage: URL, processedContentImages: URL)
```

## Parameters

`textelDensity`

The length of a side, in pixels, of the destination image. The value must be a multiple
of `4` in the range `[64, 1024]`.

`styleImageDestination`

A location in the file system to save the converted style image to. If `nil`,
Create ML saves the image to a temporary file location.

`contentImagesDestination`

A location in the file system to save the converted content image to. If
`nil`, Create ML saves the image to a temporary file location.

## Return Value

A tuple of two URLs:

- `processedStyleImage`: The URL to the converted style image.
- `processedContentImages`: The URL to the converted content image.

---

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)