Nuke Documentation

Protocol Image​Encoding

public protocol ImageEncoding  

An image encoder.

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

Types Conforming to Image​Encoding

ImageEncoders.Default

A default adaptive encoder which uses best encoder available depending on the input image and its configuration.

ImageEncoders.ImageIO

An Image I/O based encoder.

Default Implementations

encode(_:​context:​)

func encode(_ container: ImageContainer, context: ImageEncodingContext) -> Data?  

Requirements

encode(_:​)

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

Encodes the given image.

encode(_:​context:​)

func encode(_ container: ImageContainer, context: ImageEncodingContext) -> Data? 

An optional method which encodes the given image container.