Questions tagged [ciimage]

CIImage is an image class from Apple's CoreImage framework. It is supplemented by other CoreImage classes -- such as CIFilter, CIContext, CIVector and CIColor. Although a CIImage holds image data, it is not an image. Core Image doesn’t actually render an image until it is told to do so. This “lazy evaluation” method allows Core Image to operate as efficiently as possible.

280 questions
95
votes
1 answer

Interpret XMP-Metadata in ALAssetRepresentation

When a user makes some changes (cropping, red-eye removal, ...) to photos in the built-in Photos.app on iOS, the changes are not applied to the fullResolutionImage returned by the corresponding ALAssetRepresentation. However, the changes are…
andreas
  • 935
  • 6
  • 7
26
votes
6 answers

Creating a blur effect in iOS7

I have been searching for an answer to this question in a few hours now, and I just can't figure it out. I want to add a gaussian blur effect to the image when i press the button "Button". The user is the one that is adding the image. I have…
user2891448
  • 353
  • 1
  • 4
  • 7
24
votes
11 answers

How to blur an existing image in a UIImageView with Swift?

The setup is simple. A ViewController with UIImageView that has an image assigned. A UIButton that when clicked blurs the image in the UIImageView. import UIKit class ViewController: UIViewController { @IBOutlet weak var bg:…
Mark Moeykens
  • 11,251
  • 4
  • 57
  • 56
23
votes
3 answers

Getting a CGImage from CIImage

I have a UIImage which is loaded from a CIImage with: tempImage = [UIImage imageWithCIImage:ciImage]; The problem is I need to crop tempImage to a specific CGRect and the only way I know how to do this is by using CGImage. The problem is that in…
tagyro
  • 1,510
  • 2
  • 17
  • 34
19
votes
12 answers

Apply Black and White Filter to UIImage

I need to apply a black-and-white filter on a UIImage. I have a view in which there's a photo taken by the user, but I don't have any ideas on transforming the colors of the image. - (void)viewDidLoad { [super viewDidLoad]; …
user3422862
  • 193
  • 1
  • 1
  • 5
17
votes
3 answers

Unable to convert CIImage to UIImage in Swift 3.0

I am making image form QR Code by using following code: func createQRFromString(str: String) -> CIImage? { let stringData = str.dataUsingEncoding(NSUTF8StringEncoding) let filter = CIFilter(name: "CIQRCodeGenerator") …
Dalvik
  • 4,119
  • 5
  • 28
  • 83
10
votes
0 answers

Applying MPSImageGaussianBlur with depth data

I am trying to create an imitation of the portrait mode in Apple's native camera. The problem is, that applying the blur effect using CIImage with respect to depth data, is too slow for the live preview I want to show to the user. My code for this…
Eyzuky
  • 1,524
  • 1
  • 17
  • 34
10
votes
2 answers

How to preserve original photo metadata when editing PHAssets?

I am editing photos via PhotoKit but I discovered this does not preserve the original photo's metadata. This occurs even with the SamplePhotosApp provided by Apple when they apply Sepia or Chrome filters. My question is, how do you ensure all the…
Jordan H
  • 45,794
  • 29
  • 162
  • 306
9
votes
4 answers

Drawing a CIImage is too slow

I'm creating an app that requires real-time application of filters to images. Converting the UIImage to a CIImage, and applying the filters are both extremely fast operations, yet it takes too long to convert the created CIImage back to a CGImageRef…
Jojodmo
  • 22,792
  • 13
  • 59
  • 99
9
votes
1 answer

How to output a CIFilter to a Camera view?

I'm just starting out in Objective-C and I'm trying to create a simple app where it shows the camera view with a blur effect on it. I got the Camera output working with the AVFoundation framework. Now, I'm trying to hook up the Core image framework…
Renz Tan
  • 235
  • 3
  • 10
8
votes
4 answers

SceneKit, flip direction of SCNMaterial

extremely new to SceneKit, so just looking for help here: I have an SCNSphere with a camera at the center of it I create an SCNMaterial, doubleSided, and assign it to the sphere Since the camera is at the center, the image looks flipped vertically,…
David Homes
  • 2,555
  • 7
  • 30
  • 50
8
votes
2 answers

CIDetector isn't releasing memory

I'm using CIDetector as follows multiple times: -(NSArray *)detect:(UIImage *)inimage { UIImage *inputimage = inimage; UIImageOrientation exifOrientation = inimage.imageOrientation; NSNumber *orientation = [NSNumber…
Avner Barr
  • 13,049
  • 14
  • 82
  • 152
7
votes
0 answers

Reshape Face Coordinate in Swift

I want to reshape the face coordinate like showing in the video: https://www.dropbox.com/s/vsttylwgt25szha/IMG_6590.TRIM.MOV?dl=0 (Sorry, unfortunetly the video is about 11 MB in size). I've just capture the face coordinate using iOS Vision API: //…
SandeepM
  • 2,526
  • 1
  • 19
  • 29
7
votes
1 answer

PNG/JPEG representation from CIImage always returns nil

I'm currently making a photo editing app. When a photo is selected by the user, it is automatically converted into black and white using this code: func blackWhiteImage(image: UIImage) -> Data { print("Starting black & white") let orgImg =…
7
votes
1 answer

Getting message in console: "CreateWrappedSurface() failed for a dataprovider-backed CGImageRef."

Updated to Xcode 7 and getting this (warning?) message while an image was being rendered in an operation: CreateWrappedSurface() failed for a dataprovider-backed CGImageRef. There was no message like this under Xcode 6.4. Got which code part threw…
Adam Szabo
  • 293
  • 2
  • 11
1
2 3
18 19