Re: Layers and transparency Core Image
Re: Layers and transparency Core Image
- Subject: Re: Layers and transparency Core Image
- From: Scott Stevenson <email@hidden>
- Date: Sat, 23 Dec 2006 10:43:41 -0800
On Dec 23, 2006, at 8:12 AM, leenoori wrote:
What Core Image filters would I need to use to take a source image
and layer a semi-transparent version of another image on top?
I guess CISourceOverCompositing is part of the solution, but I
don't know how to make the overlaid image transparent. I suspect
that CIColorMatrix might help but I haven't yet been able to figure
out how to use it.
I'd basically like to be able to do this with an arbitrary number
of layers.
If I'm reading your question correctly, you don't need a filter for
this. Alpha transparency is basic Quartz.
CIImage *image1 = [self imageFromSomewhere];
CIImage *image2 = [self anotherImageFromSomewhere];
[image1 drawAtPoint:point fromRect:rect
operation:NSCompositeSourceOver fraction:1.0];
[image2 drawAtPoint:point fromRect:rect
operation:NSCompositeSourceOver fraction:0.8];
Or are you trying to make the image itself into a sort of filter? Are
you looking for something like CGLayer?
Any chance this is what you need? (the open panel won't open
accept .jpg files, btw)
http://developer.apple.com/samplecode/CIAnnotation/
- Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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