Class: CIImage
Overview
The CIImage class represents an image. Core Image images are immutable. You use CIImage objects in conjunction with other Core Image classes, such as CIFilter, CIContext, CIVector, and CIColor, to take advantage of the built-in Core Image filters when processing images. You can create CIImage objects with data supplied from a variety of sources, including Quartz 2D images, Core Video image buffers (CVImageBufferRef), URL-based objects, and NSData objects.
Class Method Summary (collapse)
-
+ emptyImage
Creates and returns an empty image object.
-
+ imageWithBitmapData:bytesPerRow:size:format:colorSpace:
Creates and returns an image object from bitmap data.
-
+ imageWithCGImage:
Creates and returns an image object from a Quartz 2D image.
-
+ imageWithCGImage:options:
Creates and returns an image object from a Quartz 2D image using the specified color space.
-
+ imageWithColor:
Creates and returns an image of infinite extent that is initialized the specified color.
-
+ imageWithContentsOfURL:
Creates and returns an image object from the contents of a file.
-
+ imageWithContentsOfURL:options:
Creates and returns an image object from the contents of a file, using the specified options.
-
+ imageWithCVPixelBuffer:
Creates and returns an image object from the contents of CVPixelBuffer object.
-
+ imageWithCVPixelBuffer:options:
Creates and returns an image object from the contents of CVPixelBuffer object, using the specified options.
-
+ imageWithData:
Creates and returns an image object initialized with the supplied image data.
-
+ imageWithData:options:
Creates and returns an image object initialized with the supplied image data, using the specified options.
-
+ imageWithImageProvider:size::colorSpace:options:
Creates and returns an image object initialized with data provided by an image provider.
-
+ imageWithTexture:size:flipped:colorSpace:
Creates and returns an image object initialized with data supplied by an OpenGL texture.
Instance Method Summary (collapse)
-
- extent
Returns a rectangle that specifies the extent of the image.
-
- imageByApplyingTransform:
Returns a new image that represents the original image after applying an affine transform.
-
- imageByCroppingToRect:
Returns a new image that represents the original image after cropping to a rectangle.
-
- initWithBitmapData:bytesPerRow:size:format:colorSpace:
Initializes an image object with bitmap data.
-
- initWithCGImage:
Initializes an image object with a Quartz 2D image.
-
- initWithCGImage:options:
Initializes an image object with a Quartz 2D image, using the specified options.
-
- initWithColor:
Initializes an image with the specified color.
-
- initWithContentsOfURL:
Initializes an image object by reading an image from a URL.
-
- initWithContentsOfURL:options:
Initializes an image object by reading an image from a URL, using the specified options.
-
- initWithCVPixelBuffer:
Initializes an image object from the contents of CVPixelBuffer object.
-
- initWithCVPixelBuffer:options:
Initializes an image object from the contents of CVPixelBuffer object using the specified options.
-
- initWithData:
Initializes an image object with the supplied image data.
-
- initWithData:options:
Initializes an image object with the supplied image data, using the specified options.
-
- initWithImageProvider:size:format:colorSpace:options:
Initializes an image object with data provided by an image provider, using the specified options.
-
- initWithTexture:size:flipped:colorSpace:
Initializes an image object with data supplied by an OpenGL texture.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Class Method Details
+ (CIImage) emptyImage
Creates and returns an empty image object.
+ (CIImage) imageWithBitmapData(d, bytesPerRow:bpr, size:size, format:f, colorSpace:cs)
Creates and returns an image object from bitmap data.
+ (CIImage) imageWithCGImage(image)
Creates and returns an image object from a Quartz 2D image.
+ (CIImage) imageWithCGImage(image, options:d)
Creates and returns an image object from a Quartz 2D image using the specified color space.
+ (CIImage) imageWithColor(color)
Creates and returns an image of infinite extent that is initialized the specified color.
+ (CIImage) imageWithContentsOfURL(url)
Creates and returns an image object from the contents of a file.
+ (CIImage) imageWithContentsOfURL(url, options:d)
Creates and returns an image object from the contents of a file, using the specified options.
+ (CIImage) imageWithCVPixelBuffer(buffer)
Creates and returns an image object from the contents of CVPixelBuffer object.
+ (CIImage) imageWithCVPixelBuffer(buffer, options:dict)
Creates and returns an image object from the contents of CVPixelBuffer object, using the specified options.
+ (CIImage) imageWithData(data)
Creates and returns an image object initialized with the supplied image data.
+ (CIImage) imageWithData(data, options:d)
Creates and returns an image object initialized with the supplied image data, using the specified options.
+ (CIImage) imageWithImageProvider(p, size:width, :height, formatf, colorSpace:cs, options:dict)
Creates and returns an image object initialized with data provided by an image provider.
+ (CIImage) imageWithTexture(name, size:size, flipped:flag, colorSpace:cs)
Creates and returns an image object initialized with data supplied by an OpenGL texture. When using a texture to create a CIImage object, the texture must be valid in the Core Image context (CIContext) that you draw the CIImage object into. This means that one of the following must be true:The texture must be created using the CGLContext object that the CIContext is based on.The context that the texture was created in must be shared with the CGLContext that the CIContext is based on.Note that textures do not have a retain and release mechanism. This means that your application must make sure that the texture exists for the life cycle of the image. When you no longer need the image, you can delete the texture.Core Image ignores the texture filtering and wrap modes (GL_TEXTURE_FILTER and GL_TEXTURE_WRAP) that you set through OpenGL. The filter and wrap modes are overridden by what the CISampler object specifies when you apply a filter to the CIImage object.
Instance Method Details
- (CGRect) extent
Returns a rectangle that specifies the extent of the image.
- (CIImage) imageByApplyingTransform(matrix)
Returns a new image that represents the original image after applying an affine transform.
- (CIImage) imageByCroppingToRect(r)
Returns a new image that represents the original image after cropping to a rectangle.
- (Object) initWithBitmapData(d, bytesPerRow:bpr, size:size, format:f, colorSpace:c)
Initializes an image object with bitmap data.
- (Object) initWithCGImage(image)
Initializes an image object with a Quartz 2D image.
- (Object) initWithCGImage(image, options:d)
Initializes an image object with a Quartz 2D image, using the specified options.
- (Object) initWithColor(color)
Initializes an image with the specified color.
- (Object) initWithContentsOfURL(url)
Initializes an image object by reading an image from a URL.
- (Object) initWithContentsOfURL(url, options:d)
Initializes an image object by reading an image from a URL, using the specified options.
- (Object) initWithCVPixelBuffer(buffer)
Initializes an image object from the contents of CVPixelBuffer object.
- (Object) initWithCVPixelBuffer(buffer, options:dict)
Initializes an image object from the contents of CVPixelBuffer object using the specified options.
- (Object) initWithData(data)
Initializes an image object with the supplied image data.
- (Object) initWithData(data, options:d)
Initializes an image object with the supplied image data, using the specified options.
- (Object) initWithImageProvider(p, size:width, format:f, colorSpace:cs, options:dict)
Initializes an image object with data provided by an image provider, using the specified options. Core Image does not populate the image until it actually needs the data.
- (Object) initWithTexture(name, size:size, flipped:flag, colorSpace:cs)
Initializes an image object with data supplied by an OpenGL texture. When using a texture to create a CIImage object, the texture must be valid in the Core Image context (CIContext) that you draw the CIImage object into. This means that one of the following must be true:The texture must be created using the CGLContext object that the CIContext is based on.The context that the texture was created in must be shared with the CGLContext that the CIContextis based on.Note that textures do not have a retain and release mechanism. This means that your application must make sure that the texture exists for the life cycle of the image. When you no longer need the image, you can delete the texture.Core Image ignores the texture filtering and wrap modes (GL_TEXTURE_FILTER and GL_TEXTURE_WRAP) that you set through OpenGL. The filter and wrap modes are overridden by what the CISampler object specifies when you apply a filter to the CIImage object.