The 8-bit-per-component variants are more common and consume fewer resources. 
If you are receiving BGRAf/RGBAf inputs though, locking with BGRA8/RGBA8 will 
obviously discard some detail. You can see what other patches are passing 
around if you enable QCShowExtensiveTooltips in the Quartz Composer app (hold 
down alt while opening the Preferences, the setting is in the (System) panel).

For examples, the docs have an example GL consumer patch as part of a tutorial. 
This guide is well worth getting to know.

file:///Developer/Documentation/DocSets/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset/Contents/Resources/Documents/documentation/GraphicsImaging/Conceptual/QuartzComposer_Patch_PlugIn_ProgGuide/WritingConsumerPatches/WritingConsumerPatches.html

Most of vade's QC plugins include source, and they mostly use OpenGL.

http://002.vade.info/

If you give an idea of what it is you want your plugin to do, perhaps someone 
will have more tips...

Cheers and good luck, T



On 23 Feb 2010, at 16:33, Jens Uwe Michael Lange wrote:

> 
> 
> 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]
>>> 
>> 
> 
> _______________________________________________
> 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]

 _______________________________________________
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