Hello there,

I'm trying to write an ImageUnit which depends on the size of the image.
At first I tried around with the QuartzComposer Kernel Filter to write the core function. There everything works fine. I was using "samplerSize( scrImage );" to get the correct dimensions for the filter.

Then I wrapped an ImageUnit around that and tested it against Core Image Fun House.
There the results highly depend on the image size.
If the image is small enough to fit into the screen then it looks as expected. If not then the filter uses somehow wrong parameters. It looks like the samplerSize returns the dimensions of the window of the scaled down image but applies the filter to the full sized image. The result is that the center of my filter moves into the lower left corner and does no longer result in a centric distortion.

How can I pass the dimensions to the CIKernel ?
I Tried an extent.size.width but it does not work. The ImageUnitAnalyzer fails and Core Image Fun House does not show any effect but the Console.log shows :

17.02.08 15:53:41 Core Image Fun House[2203] CoreImageUnitsFilter: CoreImageUnitsFilter: nil value for argument #2 (Width)

piece of code:

- (CIImage *)outputImage
{
    float radius = 0.0f;
    CISampler *src;

    src = [CISampler samplerWithImage:inputImage];
    return [self apply:_kwasiImageUnitsFilterKernel, src,
        [NSNumber numberWithFloat: [inputAmount floatValue]],
                [inputImage extent].size.width, [inputImage 
extent].size.height, nil];
}

Thanks in advance,

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