Type Method

canInitWithData:

Returns a Boolean value indicating whether the receiver can initialize itself from the specified data.

Declaration

+ (BOOL)canInitWithData:(NSData *)data;

Parameters

data

The image data.

Return Value

YES if the receiver understands the format of the specified data and can use it to initialize itself; otherwise, NO.

Discussion

This method should be overridden by subclasses. Note that this method does not need to do a comprehensive check of the image data; it should return NO only if it knows it cannot initialize itself from the data.

See Also

Determining the Supported Image Types

+ canInitWithPasteboard:

Returns a Boolean value indicating whether the receiver can initialize itself from the data on the specified pasteboard.

imageTypes

Returns an array of UTI strings identifying the image types supported by the receiver, either directly or through a user-installed filter service.

imageUnfilteredTypes

Returns an array of UTI strings identifying the image types supported directly by the receiver.

+ imageFileTypes

Returns the file types supported by NSImageRep or one of its subclasses.

Deprecated
+ imagePasteboardTypes

Returns the pasteboard types supported by NSImageRep or one of its subclasses.

Deprecated
+ imageUnfilteredFileTypes

Returns the list of file types supported directly by the receiver.

Deprecated
+ imageUnfilteredPasteboardTypes

Returns the list of pasteboard types supported directly by the receiver.

Deprecated