| Inherits from | |
| Conforms to | |
| Framework | Library/Frameworks/QuartzCore.framework |
| Availability | Mac OS X v10.4 and later
|
| Companion guide | |
| Declared in | CISampler.h |
The CISampler class retrieves samples of images for processing by a CIKernel object. A CISampler object defines a coordinate transform, and modes for interpolation and wrapping. You use CISampler objects in conjunction with other Core Image classes, such as CIFilter, CIKernel, and CIFilterShape, to create custom filters.
Creates and returns a sampler that references an image.
+ (CISampler *)samplerWithImage:(CIImage *)im
The image that you want the sampler to reference.
A sampler object that references the image specified by the im argument.
CISampler.h
Creates and returns a sampler that references an image using options specified as key-value pairs.
+ (CISampler *)samplerWithImage:(CIImage *)im keysAndValues:key0, ...
The image that you want the sampler to reference.
A list of key-value pairs that represent options. Each key needs to be followed by that appropriate value. You can supply one or more key-value pairs. Use nil to specify the end of the key-value options. See “Sampler Option Keys”.
A sampler that references the image specified by the im argument and uses the specified options.
CISampler.h
Creates and returns a sampler that references an image using options specified in a dictionary.
+ (CISampler *)samplerWithImage:(CIImage *)im options:(NSDictionary *)dict
The image that you want the sampler to reference.
A dictionary that contains options specified as key-value pairs. See “Sampler Option Keys”.
A sampler that references the image specified by the im argument and uses the options specified in the dictionary.
CISampler.hGets the domain of definition (DOD) of the sampler.
- (CIFilterShape *)definition
The filter shape object that contains the DOD.
The DOD contains all nontransparent pixels produced by referencing the sampler.
CISampler.hGets the rectangle that specifies the extent of the sampler.
- (CGRect)extent
The rectangle that specifies the area outside which the wrap mode set for the sampler is invoked.
CISampler.hInitializes a sampler with an image object.
- (id)initWithImage:(CIImage *)im
The image object to initialize the sampler with.
CISampler.hInitializes the sampler with an image object using options specified as key-value pairs.
- (id)initWithImage:(CIImage *)im keysAndValues:key0, ...
The image object to initialize the sampler with.
A list of key-value pairs that represent options. Each key needs to be followed by that appropriate value. You can supply one or more key-value pairs. Use nil to specify the end of the key-value options. See “Sampler Option Keys”.
CISampler.hInitializes the sampler with an image object using options specified in a dictionary.
- (id)initWithImage:(CIImage *)im options:(NSDictionary *)dict
The image to initialize the sampler with.
A dictionary that contains options specified as key-value pairs. See “Sampler Option Keys”.
CISampler.h
Keys for creating a sampler.
extern NSString *kCISamplerAffineMatrix; extern NSString *kCISamplerWrapMode; extern NSString *kCISamplerFilterMode
kCISamplerAffineMatrixThe key for an affine matrix. The associated value is an NSArray object ([a b c d tx ty]) that defines the transformation to apply to the sampler.
kCISamplerWrapModeThe key for the sampler wrap mode. The wrap mode specifies how Core Image produces pixels that are outside the extent of the sample. Possible values are kCISamplerWrapBlack and kCISamplerWrapClamp.
kCISamplerFilterModeThe key for the filtering to use when sampling the image. Possible values are kCISamplerFilterNearest and kCISamplerFilterLinear.
CISampler.hValues for sampler option keys.
extern NSString *kCISamplerWrapBlack; extern NSString *kCISamplerWrapClamp; extern NSString *kCISamplerFilterNearest; extern NSString *kCISamplerFilterLinear;
kCISamplerWrapBlackPixels are transparent black.
kCISamplerWrapClampCoordinates are clamped to the extent.
kCISamplerFilterNearestNearest neighbor sampling.
kCISamplerFilterLinearBilinear interpolation.
CISampler.h
Last updated: 2006-12-07