Nuke Documentation

Structure Image​Request.​Thumbnail​Options

public struct ThumbnailOptions: Hashable  

Thumbnail options.

For more info, see https://developer.apple.com/documentation/imageio/cgimagesource/image_source_option_dictionary_keys

ImageRequest.ThumbnailOptions ImageRequest.ThumbnailOptions Hashable Hashable ImageRequest.ThumbnailOptions->Hashable

Member Of

ImageRequest

Represents an image request.

Conforms To

Hashable

Initializers

init(max​Pixel​Size:​create​Thumbnail​From​Image​IfAbsent:​create​Thumbnail​From​Image​Always:​create​Thumbnail​With​Transform:​should​Cache​Immediately:​)

public init(maxPixelSize: CGFloat,
                    createThumbnailFromImageIfAbsent: Bool = true,
                    createThumbnailFromImageAlways: Bool = true,
                    createThumbnailWithTransform: Bool = true,
                    shouldCacheImmediately: Bool = true)  

Properties

max​Pixel​Size

public var maxPixelSize: CGFloat

The maximum width and height in pixels of a thumbnail. If this key is not specified, the width and height of a thumbnail is not limited and thumbnails may be as big as the image itself.

create​Thumbnail​From​Image​IfAbsent

public var createThumbnailFromImageIfAbsent = true

Whether a thumbnail should be automatically created for an image if a thumbnail isn't present in the image source file. The thumbnail is created from the full image, subject to the limit specified by maxPixelSize.

By default, true.

create​Thumbnail​From​Image​Always

public var createThumbnailFromImageAlways = true

Whether a thumbnail should be created from the full image even if a thumbnail is present in the image source file. The thumbnail is created from the full image, subject to the limit specified by maxPixelSize.

By default, true.

create​Thumbnail​With​Transform

public var createThumbnailWithTransform = true

Whether the thumbnail should be rotated and scaled according to the orientation and pixel aspect ratio of the full image.

By default, true.

should​Cache​Immediately

public var shouldCacheImmediately = true

Specifies whether image decoding and caching should happen at image creation time.

By default, true.