IM not entirely sure what the issue is, but, two things

a) it appears that you are leaking a CGColorpaceRef every time you output a new 
image. Its small but, over time, may be an issue.

speaking of color spaces, I have had in the past, very weird issues with 
colorspaces that are not the contexts colorspace, or marked as wanting color 
correction.

perhaps your issue is resolvable by marking shouldColorMatch: as YES . 

I know it seems trite, but it has solved some issues with Queues in the past 
for me (on earlier OS X versions at least).

Some more code / context would help however
On Mar 19, 2013, at 2:18 PM, Flo Loferer <[email protected]> wrote:

> Hey there guys,
> 
> I was hoping that you could help me with a little problem I can't figure out 
> a solution for.
> I had some code for image processing that's returning a monochrome image.
> 
> The next patch however is expecting an RGB input image so I'm blowing up the 
> monochrome image to RGBA in a simple for loop.
> When I then export the image by doing: 
> 
> self.outputImage = [context 
> outputImageProviderFromBufferWithPixelFormat:QCPlugInPixelFormatRGBAf
>                                                                   
> pixelsWide:width
>                                                                   
> pixelsHigh:height
>                                                                  
> baseAddress:tempFloatArray
>                                                                  
> bytesPerRow:width * sizeof(float) *4 //RGBA
>                                                              
> releaseCallback:_BufferReleaseCallback
>                                                               
> releaseContext:self
>                                                                   
> colorSpace:CGColorSpaceCreateWithName(kCGColorSpaceGenericRGBLinear)
>                                                             
> shouldColorMatch:YES];
> 
> It works just fine.
> To reduce both the processing time and also the memory footprint I wanted to 
> pass on the monochrome image as is without the unnecessary RGB blowup.
> 
> However, I keep getting weird exceptions when I try to use this:
> 
> self.outputImage = [context 
> outputImageProviderFromBufferWithPixelFormat:QCPlugInPixelFormatIf
>                                                                   
> pixelsWide:width
>                                                                   
> pixelsHigh:height
>                                                                  
> baseAddress:tempFloatArray
>                                                                  
> bytesPerRow:width * sizeof(float)
>                                                              
> releaseCallback:_BufferReleaseCallback
>                                                               
> releaseContext:self
>                                                                   
> colorSpace:CGColorSpaceCreateWithName(kCGColorSpaceGenericGray)
>                                                             
> shouldColorMatch:NO];
> 
> 
>   
> QC terminates with an exception saying:
> 
> -[_NSWindowTransformAnimation retain]: message sent to deallocated instance 
> 0x18bf7c0
> 
> I checked in Instruments and tried to hunt down the zombie but I couldn't 
> find out where it is coming from.
> It must be related to the output image because if I set it to nil, the 
> exception isn't thrown although the processing path is the same until there.
> 
> Is it possible that having an output image with a different pixel format than 
> the context is problematic?
> I remember having had problems with textures with different pixel formats. 
> 
> All tips are very welcome!
> Thanks very much in advance!
> 
> Best regards,
> 
> Flo
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/quartzcomposer-dev/anton%40noiseindustries.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:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to