Nuke Documentation

Structure Image​Encoders.​Image​IO

public struct ImageIO: ImageEncoding  

An Image I/O based encoder.

Image I/O is a system framework that allows applications to read and write most image file formats. This framework offers high efficiency, color management, and access to image metadata.

ImageEncoders.ImageIO ImageEncoders.ImageIO ImageEncoding ImageEncoding ImageEncoders.ImageIO->ImageEncoding

Member Of

ImageEncoders

A namespace with all available encoders.

Conforms To

ImageEncoding

An image encoder.

Initializers

init(type:​compression​Ratio:​)

public init(type: ImageType, compressionRatio: Float = 0.8)  
  • parameter format: The output format. Make sure that the format is supported on the current hardware.s
  • parameter compressionRatio: 0.8 by default.

Properties

type

public let type: ImageType

compression​Ratio

public let compressionRatio: Float

Methods

is​Supported(type:​)

public static func isSupported(type: ImageType) -> Bool  

Retuns true if the encoding is available for the given format on the current hardware. Some of the most recent formats might not be available so its best to check before using them.

encode(_:​)

public func encode(_ image: PlatformImage) -> Data?