thanks for the fast replies and the advice.

Two small questions remains, though:

Out of curiosity: Which of format: QCPlugInPixelFormatRGBAf or QCPlugInPixelFormatBGRA8, is considered
better when dealing with photo data or is that not relevant?

And do you by any chance know of some examples for using the textureBuffer in image processing?



Am 23.02.2010 um 16:28 schrieb Bang Noise:

ps, and by the by...

[self.inputImage lockBufferRepresentationWithPixelFormat:QCPlugInPixelFormatRGBAf colorSpace:[self.inputImage imageColorSpace] forBounds: [self.inputImage imageBounds]];

You should lock to a known colorspace, as inputImage's colorspace may not be compatible with your requested pixel-format, in which circumstances an exception will be raised. Unless you have modified the colorspace in your plugin, you should then pass the same colorspace to your output provider.

On Tue, Feb 23, 2010 at 2:34 PM, Jens Uwe Michael Lange <[email protected] > wrote:
Hello,

currently I am writing a Custom QuartzComposer PlugIn that needs to read and write
image data as fast as possible.

Starting from an example, I 've started to get my image data as follows:

[self.inputImage lockBufferRepresentationWithPixelFormat:QCPlugInPixelFormatRGBAf colorSpace:[self.inputImage imageColorSpace] forBounds: [self.inputImage imageBounds]];

then I am operating on the buffer writing the data on a seperate output buffer from whom I generate a output provider
by              

provider = [[context outputImageProviderFromBufferWithPixelFormat:QCPlugInPixelFormatRGBAf pixelsWide:width
                                                                                
                                           pixelsHigh:height
                                                                                
                                          baseAddress:outputBuffer
                                                                                
                                          bytesPerRow:[self.inputImage 
bufferBytesPerRow]
                                                                                
                                  releaseCallback:_BufferReleaseCallback
                                                                                
                                   releaseContext:NULL
                                                                                
                                           colorSpace:[context colorSpace]
                                                                                
                                 shouldColorMatch:YES] retain];

Now I am wondering, if this a efficient way, or if there are better ways to do it.

Thanks for your help in advance,

JUM

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/bangnoise%40gmail.com

This email sent to [email protected]



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to