Instance Method

TIFFRepresentationUsingCompression:factor:

Returns a TIFF representation of the image using the specified compression.

Declaration

- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp factor:(float)factor;

Parameters

compression

An enum constant that represents a TIFF data-compression scheme. Legal values for compression can be found in NSBitmapImageRep.h and are described in NSTIFFCompression.

factor

A float value that provides a hint for those compression types that implement variable compression ratios.

Currently only JPEG compression uses a compression factor. JPEG compression in TIFF files is not supported, and factor is ignored.

Discussion

If the compression type isn’t supported for writing TIFF data (for example, NSTIFFCompressionNEXT), the stored compression is changed to NSTIFFCompressionNone before the TIFF representation is generated.

If a problem is encountered during generation of the TIFF, TIFFRepresentationUsingCompression:factor: raises an NSTIFFException or an NSBadBitmapParametersException.

See Also

Producing Representations of the Image

+ TIFFRepresentationOfImageRepsInArray:

Returns a TIFF representation of the given images

+ TIFFRepresentationOfImageRepsInArray:usingCompression:factor:

Returns a TIFF representation of the given images using a specified compression scheme and factor.

TIFFRepresentation

A TIFF representation of the bitmap image data.

+ representationOfImageRepsInArray:usingType:properties:

Formats the specified bitmap images using the specified storage type and properties and returns them in a data object.

- representationUsingType:properties:

Formats the receiver’s image data using the specified storage type and properties and returns it in a data object.

NSDrawBitmap

Draws a bitmap image.