Re: Preparation for doing a bug report for CIPageCurlTransition
Re: Preparation for doing a bug report for CIPageCurlTransition
- Subject: Re: Preparation for doing a bug report for CIPageCurlTransition
- From: Kevin Meaney <email@hidden>
- Date: Mon, 31 Mar 2014 10:34:45 +0100
Thanks for your input again.
On 31 Mar 2014, at 05:38, Graham Cox <email@hidden> wrote:
> OK, I dug out the source code - it's a very old piece of work from when Core Image filters were first available. I'm definitely using Curl without a shadow.
>
> But, digging into the code,here's the thing - the image I set for the 'backside' is something called 'blank', which is a dark gray (almost black) solid colour, and that's what I see, with the original image mirrored on top of it. So my assumption has always been that that was working fine, but in an attempt to replicate your issue, I changed the backside image to something more obvious. And I see it - once. After the first transition, I reuse the filter for subsequent ones, just changing the input images. On subsequent transitions, I don't see my backside test image - in fact it looks exactly the same as the 'blank' case, which is now suggesting to me that my code in fact has never worked correctly, it just wasn't obvious because my backside image was the same as what you get when there's no image. Duh.
> So... I tried setting the inputBacksideImage parameter each time I use the filter again, and this time it works every time. So it looks as if once the transition has run it discards some of its parameters. In this case it's the only image parameter that wasn't being set afresh, because of course the source and destination images change. The other params - inputAngle and radius, I'm not touching again, but they seem OK.
In my main project I've used the transition filters starting with the input time set to 0, and incrementing it up to 1. So the display of the backside image would never happen as the first image is the front side not turned over at all. Subsequent increments of time where the target image is revealed would have the backside image scrubbed from the way you describe it so I could perhaps understand that this might be the problem. However the code I used in my bug report to Apple and I linked to in a previous message to cocoa-dev as a gist https://gist.github.com/SheffieldKevin/9873485 only grabs one image and uses an input time of 0.5. There is no display of the backside image.
I've only been trying out the CIPageCurlTransition filter with still images, the source and destination images remain unchanged from one time increment to the next. The only property that I update the filter with from one increment to the next is inputTime.
> This is all a bit of a quick test without really examining the code thoroughly, but a quick scan indicates that I'm using the transitions pretty much exactly as per the example code in the Core Image Programming Guide. I create the filter using +filterWithName:keysAndValues:, and then I retain the filters in a list that the user can select from to pick a transition effect. Each time I make a transition, I create a timer and allow it to run, the code is what you see in the guide. All I've changed is forcing inputBacksideImage before I start the timer.
hmmm, I wonder if it is how I'm setting the filter up. My main project follows the same approach as the code on the gist.
1. Create the filter using filterWithName
2. Set the filter defaults.
3. Apply each property one at a time using setValue:forKey.
CIFilter *filter = [CIFilter filterWithName:@"CIPageCurlTransition"];
[filter setDefaults];
[filter setValue:image forKey:@"inputImage"];
etc.
I'm wondering if the CIPageCurlTransition requires that it is set up using filterWithName:keysAndValues?
I've not had problems like this with any other filter.
Kevin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden