On 31 Mar 2014, at 11:59 am, Kevin Meaney <k...@yvs.eu.com> wrote:

> Hi Graham,
> 
> Thanks for replying. I've just tried setting the backside image to be the 
> same as the front image but it still doesn't work.
> 
> Are you sure you are not using CIPageCurlWidthShadowTransition in your 
> project because that works for me without a problem?


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.

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.

--Graham





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to