Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

CIImageProvider Protocol Reference

(informal protocol)

Adopted by
Framework
Library/Frameworks/QuartzCore.framework
Declared in
QuartzCore/CIImageProvider.h
Availability
Available in Mac OS X v10.4 and later
Companion guide

Overview

The CIImageProvider informal protocol defines methods for supplying bitmap data to create or initialize a CIImage object.

Tasks

Providing Image Data

Instance Methods

provideImageData:bytesPerRow:origin::size::userInfo:

Supplies data to a CIImage object.

- (void)provideImageData:(void *)data bytesPerRow:(size_t)rowbytes origin:(size_t) x:(size_t)y size:(size_t)width:(size_t)height userInfo:(id)info

Parameters
data

A pointer to image data. Note that data[0] refers to the first byte of the requested subimage, not the larger image buffer.

rowbytes

The number of bytes per row.

x

The x origin of the image data.

y

The y origin of the image data.

width

The width of the image data.

height

The height of the image data.

info

User supplied data, which is optional.

Discussion

You can supply the image provider to these methods of the CIImage class:

You initialize the given bitmap with the subregion specified by the arguments x, y, width, and height. The subregion uses the local coordinate space of the image, with the origin at the upper-left corner of the image. If you change the virtual memory mapping of the buffer specified by the data argument (such as by using vm_copy to modify it), the behavior is undefined.

That this callback always requests the full image data regardless of what is actually visible. All of the image is loaded or none of it is. The exception is when you create a tiled image by specifying the kCIImageProviderTileSize option. In this case, only the needed tiles are requested.

Availability

Constants

Image Provider Options

Keys for the options dictionary of an image provider.

extern NSString *kCIImageProviderTileSize;
extern NSString *kCIImageProviderUserInfo;

Constants
kCIImageProviderTileSize

A key for the image tiles size. The associated value is an NSArray that containsNSNumber objects for the dimensions of the image tiles requested from the image provider.

kCIImageProviderUserInfo

A key for data needed by the image provider. The associated value is an object that contains the needed data.

Discussion

You can use these options when you create or initialize an image provider with such methods as imageWithImageProvider:size::format:colorSpace:options: or initWithImageProvider:size::format:colorSpace:options:.

Declared In
CIImageProvider.h

Next Page > Hide TOC


Last updated: 2006-12-05




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice