---
title: "MTStyleImageOptions | Mobile sdk | Mobile sdk ios | Ios"
description: "Configuration that controls how an image is registered within the MapTiler style."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTStyleImageOptions

```
public struct MTStyleImageOptions : Codable, Equatable, Sendable
```

Configuration that controls how an image is registered within the MapTiler style.

-   `[pixelRatio](#/s:11MapTilerSDK19MTStyleImageOptionsV10pixelRatioSdSgvp)`
    
    Pixel ratio of the supplied image. Values below zero are ignored.
    
    #### Declaration
    
    Swift
    
    ```
    public var pixelRatio: Double?
    ```
    
-   `[sdf](#/s:11MapTilerSDK19MTStyleImageOptionsV3sdfSbSgvp)`
    
    Indicates whether the image should be interpreted as a signed distance field.
    
    #### Declaration
    
    Swift
    
    ```
    public var sdf: Bool?
    ```
    
-   `[stretchX](#/s:11MapTilerSDK19MTStyleImageOptionsV8stretchXSayAC7StretchVGSgvp)`
    
    Horizontal stretch ranges applied when rendering the image.
    
    #### Declaration
    
    Swift
    
    ```
    public var stretchX: [Stretch]?
    ```
    
-   `[stretchY](#/s:11MapTilerSDK19MTStyleImageOptionsV8stretchYSayAC7StretchVGSgvp)`
    
    Vertical stretch ranges applied when rendering the image.
    
    #### Declaration
    
    Swift
    
    ```
    public var stretchY: [Stretch]?
    ```
    
-   `[content](#/s:11MapTilerSDK19MTStyleImageOptionsV7contentAC7ContentVSgvp)`
    
    Content insets that describe the stretchable area of the image.
    
    #### Declaration
    
    Swift
    
    ```
    public var content: Content?
    ```
    
-   `[init(pixelRatio:sdf:stretchX:stretchY:content:)](#/s:11MapTilerSDK19MTStyleImageOptionsV10pixelRatio3sdf8stretchX0J1Y7contentACSdSg_SbSgSayAC7StretchVGSgAnC7ContentVSgtcfc)`
    
    Creates a new set of image options.
    
    #### Declaration
    
    Swift
    
    ```
    public init(
        pixelRatio: Double? = nil,
        sdf: Bool? = nil,
        stretchX: [Stretch]? = nil,
        stretchY: [Stretch]? = nil,
        content: Content? = nil
    )
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>pixelRatio</em></code></td><td><div><p>Pixel ratio of the supplied image.</p></div></td></tr><tr><td><code><em>sdf</em></code></td><td><div><p>Indicates whether the image should be interpreted as a signed distance field.</p></div></td></tr><tr><td><code><em>stretchX</em></code></td><td><div><p>Horizontal stretch ranges applied when rendering the image.</p></div></td></tr><tr><td><code><em>stretchY</em></code></td><td><div><p>Vertical stretch ranges applied when rendering the image.</p></div></td></tr><tr><td><code><em>content</em></code></td><td><div><p>Insets describing the stretchable area of the image.</p></div></td></tr></tbody></table>
    
-   `[Stretch](#/s:11MapTilerSDK19MTStyleImageOptionsV7StretchV)`
    
    Describes a stretchable segment on an axis.
    
    [See more](https://docs.maptiler.com/mobile-sdk/ios/api/Structs/MTStyleImageOptions/Stretch/)
    
    #### Declaration
    
    Swift
    
    ```
    struct Stretch : Codable, Equatable, Sendable
    ```
    
-   `[Content](#/s:11MapTilerSDK19MTStyleImageOptionsV7ContentV)`
    
    Insets that describe the stretchable area of the image.
    
    [See more](https://docs.maptiler.com/mobile-sdk/ios/api/Structs/MTStyleImageOptions/Content/)
    
    #### Declaration
    
    Swift
    
    ```
    struct Content : Codable, Equatable, Sendable
    ```
