init(data:)
Initializes a newly allocated bitmap image representation from the specified data.
Declaration
init?(data: Data)Parameters
- data:
A data object containing image data. The contents of
bitmapDatacan be any supported bitmap format. For TIFF data, the Nsbitmapimagerep is initialized from the first header and image data found inbitmapData.
Return Value
Returns an initialized NSBitmapImageRep if the initialization was successful or nil if it was unable to interpret the contents of bitmapData.
See Also
Creating Bitmap Representations of Images
imageReps(with:)colorize(byMappingGray:to:blackMapping:whiteMapping:)init(bitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)init(bitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)init(cgImage:)init(ciImage:)init(forIncrementalLoad:)init(focusedViewRect:)