Contents

canBeCompressed(using:)

Tests whether the bitmap image representation can be compressed by the specified compression scheme.

Declaration

func canBeCompressed(using compression: NSBitmapImageRep.TIFFCompression) -> Bool

Parameters

  • compression:

    A TIFF compression type. For more information, see the constants in Tiffcompression.

Return Value

true if the receiver’s data matches compression with this type, false if the data doesn’t match compression or if compression is unsupported.

Discussion

This method returns true if the receiver’s data matches compression; for example, if compression is NSBitmapImageRep.TIFFCompression.ccittfax3, then the data must be 1 bit per sample and 1 sample per pixel.

See Also

Managing Compression Types