core-image

CoreImage for Win32

For those not familiar with Core Image, here's a good description of it: http://developer.apple.com/macosx/coreimage.html Is there something equivalent to Apple's CoreImage/CoreVideo for Windows? I looked around and found the DirectX/Direct3D stuff, which has all the underlying pieces, but there doesn't appear to be any high level API t...

CIFilter available in the iPhone SDK?

This might be a dumb question, but I want to know for sure before I start implementing my own filters (probably using opengl ES) but are the CIFilters available on the iphone? Anything similar? Thanks ...

CIImage: How to use CIAffineTransform?

How can I make my CIImage finite after an CIAffineTransform, so i can pass it to NSBitmapImageRep:initWithCIImage? Overall I want to overlay two images via CIAdditionCompositing. Because one image is smaller then the other, it want to position it first. I thought transforming the smaller image is the right way to do this. ...

Getting a CGImageRef from IKImageBrowserView

I feed the image browser view with image filenames and it manages loading them. Is there a way to retrieve the CGImageRef of those images from the browser after it loads them? I'd like to do some Core Animation with them when the user clicks on an image. ...

How can I use CIFilter in iPhone OS?

Apple says that CIFilter is available in iPhone OS. However, on my mac I couldn't find an CoreImage framework to link against. filter An optional Core Image filter object that provides the transition. @property(retain) CIFilter *filter i.e. when I try to do something like this, it crashes because CIFilter is unknown: [trans...

[CIImage drawAtPoint:…] vs [CIContext drawImage:…]

What is the difference between the last two lines? CIImage *outputImage = [compositingFilter valueForKey:@"outputImage"]; [[[NSGraphicsContext currentContext] CIContext] drawImage:outputImage atPoint:point fromRect:fromRect]; [outputImage drawAtPoint:point fromRect:fromRect operation:op fraction:delta]; The last one produces a d...

Tinting a grayscale NSImage (or CIImage)

I have a grayscale image which I want to use for drawing Cocoa controls. The image has various levels of gray. Where it is darkest, I want it to draw a specified tint color darkest. I want it to be transparent where the source image is white. Basically, I want to reproduce the behavior of tintColor seen in UINavigationBar on the iPhone....

CoreImage patches problems in 10.6

Hi All, In 10.6 with some systems CoreImage CIPerspectiveTransform (And other api's too) results in colored patches in output image. (It seems like hardware related issue And it occurs only with images with resolution above 4000X2500) Is there ay way to come out of this bug? At-last is it possible to use NSAffineTransform instead? If...

Strange artifacts after CILanczosScaleTransform

Hello, I'm trying to do image scaling using Core Image, using Lanczos Scale Transform filter. It is fine when I'm doing scaleup. But on scaledown and saving to JPEG I found a class of images which produces strange noise artifacts and behavior. For inputScale multiples to 0.5: 0.5, 0.25, 0.125 etc it is always fine. For others input...

use core-image in 3d

hello, i have a working Core Video setup (a frame captured from a USB camera via QTKit) and the current frame is rendered as a texture on an arbitary plane in 3d space in a subclassed NSOpenGLView. so far so good but i would like to use some Core Image filter on this frame. i now have the basic code setup and it renders my unprocessed v...

Is there a way to force CoreImage to use the GPU?

We are having the following problem: a series of Core Image filters runs constantly in our program. When evaluating on my Macbook Pro, Core Image decides to schedule all graphics computation on the GPU, as expected. When using a MacPro, however, CI uses the CPUs! This is a problem, as we need them for other processing. [1] The question ...

Hidden [CIImage initWithImage:] method?

Is Apple declaring method [CIImage initWithImage:(CIImage*)] that I'm not aware of? The only method with that signature that I'm aware of is [CISampler initWithImage:]. But when I tried to provide my own method, the compiler warns me saying that the method already exists. Background: I'm trying to create a convenience method that conv...

Invalid context when rendering with CIContext

I have a NSView that renders some CoreImage stuff in drawRect: method. Everything works fine while I'm rendering on hw-accelerated context, but if I switch to software mode, I have error messages in console for each render: <Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x1084740 This isn't a bitmap context. Forcing destin...

How to auto-crop a CIImage?

I've got a CIImage with an alpha channel. Big portions of it are fully transparent. I'd like to find the minimal axis-aligned bounding box containing the full nonzero-alpha region, and crop the image to this bounding box. Similar to the "auto-crop" feature in GIMP. How should I proceed? ...

CAAnimationGroup with different interface elements

Hi, I want to crossfade two NSViews and resize their NSWindow. I know how to do them separately but so far not how to do it simultaneously. I think I need a CAAnimationGroup for it. But because I'm dealing with two different objects, I don't know how to add the two animations in the group and I don't know how to start the animation beca...

Converting NSImage to CIImage without degraded quality

Hello, I am trying to convert an NSImage to a CIImage. When I do this, there seems to be a huge loss in image quality. I think it is because of the "TIFFRepresentation". Does anyone have a better method? Thanks a lot. NSImage *image = [[NSImage alloc] initWithData:[someSource dataRepresentation]]; NSData * tiffData = [image TIFFRepres...

maximum image size in CIFilter / CIKernel?

Does anyone know what the limitations are on image size with custom CIFilters? I've created a filter that performs as expected when the images are up to 2 mega pixels but then produce very strange results when the images are larger. I've tested this both in my cocoa app as well as in quartz composer. The filter I've developed is a geomet...

How to process CIFilter using CPU instead of GPU?

Does anyone know how to tell core image to process a CIImage through a CIFilter using the CPU instead of the GPU? I need to process some very large images and I get strange results using the GPU. I don't care how long it takes to CPU will be fine. ...