Instance Method

imageTransformForOrientation:

Returns the transformation needed to reorient the image to the specified orientation.

Declaration

- (CGAffineTransform)imageTransformForOrientation:(int)orientation;

Parameters

orientation

An integer specifying an image orientation according to the EXIF specification. For details, see kCGImagePropertyOrientation.

Return Value

An affine transform that will rotate or mirror the image to match the specified orientation when applied.

Discussion

This method determines the transformation needed to match the specified orientation, but does not apply that transformation to the image. To apply the transformation (possibly after concatenating it with other transformations), use the imageByApplyingTransform: method or the CIAffineTransform filter. To determine and apply the transformation in a single step, use the imageByApplyingOrientation: method.

See Also

Getting Image Information

definition

Returns a filter shape object that represents the domain of definition of the image.

extent

A rectangle that specifies the extent of the image.

properties

A dictionary containing metadata about the image.

url

The URL from which the image was loaded.

colorSpace

The color space of the image.