Questions tagged [cgimageref]

The CGImageRef opaque type represents bitmap images and bitmap image masks, based on sample data supplied. This is part of the Core Graphics framework.

The CGImageRef opaque type represents bitmap images and bitmap image masks, based on sample data supplied. A bitmap (or sampled) image is a rectangular array of pixels, with each pixel representing a single sample or data point in a source image. This is part of the Core Graphics framework.

See and as well.

151 questions
1
vote
1 answer

CGImageCreateWithImageInRect leaking memory in ARC

I'm calling CGImageRef tmp = CGImageCreateWithImageInRect([self.originalImage CGImage], newSize); a ton of times and the app is eventually crashing but I don't retain a reference to the image. Shouldn't tmp get garbage collected? The error is an…
pfrank
  • 2,090
  • 1
  • 19
  • 26
1
vote
1 answer

Create CGImage From CGBitmapContext and Add to UIImageView

I am trying to create a snapshot of a UICollectionViewCell by creating a CGBitMapContext. I am not entirely clear on how to do this or how to use the associated classes, but after a bit of research, I have written the following method which is…
1
vote
1 answer

CFRelease causing crash in iPad application

I am trying to merge four images to make it one uiimage. But when I am going to do CFRelease, it is crashing. If I don't do this, then it is giving a memory leak and crashing. How could this be resolved? See below for my code. …
gaurav
  • 357
  • 1
  • 4
  • 13
1
vote
0 answers

Converting png files into gif file using ios sdk?

I am creating iphone app that take images from library and covert into gif file. I am successfully created using the below link http://gist.github.com/mayoff/4969104 Using this code i am able to create gif file. but images quality are changing. some…
KAREEM MAHAMMED
  • 1,675
  • 14
  • 38
1
vote
2 answers

Displaying a screen shot generated UIImage is not displaying in UIImageView (for device only)

I am trying to save an OpenGL buffer (whats currently displayed in the view) to the device's photo library. The code snippet below works fine on the simulator. But for the actual device it is crashing. I believe there could be a problem with the way…
AlvinfromDiaspar
  • 6,611
  • 13
  • 75
  • 140
1
vote
2 answers

Can I store a decompressed image in Core Data

I'm working on a carrousel of large amount of big images and I am making some tests trying to improve the performance loading the images. Right now, even if I am already decompressing the jpg on a different queue, it's still taking a little bit,…
crisisGriega
  • 852
  • 7
  • 17
1
vote
0 answers

No visible @interface for "UIView" declares the selector 'imageRef'

I am writing a camera app (similar to the native camera app) so that when the snap button is touched, I want to quickly grab the picture (from the hidden imageView) before the view resets and is ready to take another picture. Below is a snippet of…
Paul A.
  • 577
  • 2
  • 11
  • 24
1
vote
1 answer

CGImageRef from NSData is null, but UIImage is not?

I'm trying to move some image loading into the background. Currently i'm loading UIImages in the background but from what I have read, this is not the suggested way to go about doing it, instead I should load the CGImageRef in the background, then…
Kyle
  • 17,317
  • 32
  • 140
  • 246
1
vote
0 answers

getting photoshop to read my multi-layer CGImageRef tiff

Photoshop is making me quite confused. I am able to create a multi-layer tif image from photoshop and read it into my program (cocoa build) I am able to create a multi-layer tif in my program and have it read by tiffutil. photoshop, however, will…
P-Rod
  • 471
  • 1
  • 5
  • 18
1
vote
0 answers

Objective-C: CGBitmapCreateContext with Indexed ColorSpace

I know the documentation says that CGBitMapContextCreate doesn't support indexed color spaces. That's troubling for me. I have a bunch of 256bit PNG files that I need to display, which are all indexed color spaces:
Adam
  • 913
  • 1
  • 9
  • 26
1
vote
0 answers

CgImageRef as part of object under arc

Using Arc, I have a CgImageRef as a property of an object (Shape). Ultimately I will assign the CgImageRef to the contents of 1 or more layers but initially I just keep it in the shape. Things work fine if I do this: CgImageRef cgImageRef =…
1
vote
2 answers

Objective C- Memory leak with CGDataProviderCopyData

Im new developer on ObjC and trying to make a fill color app. When I touch on a image, the color will be changed but I got the merory leak with this function need your help: -(void) updateImageWithColorSelected:(int) pos{ CGImageRef imageRef =…
davidphan
  • 11
  • 2
1
vote
1 answer

Memory leak. Instruments think all is fine

I am fairly experienced C programmer but IOS is new for me. I do have memory leak (I think this because I get MemoryWarning and soon my app gets killed with no mercy). But Instruments memory leak detector says all is fine. Yes, I have memory…
Tõnu Samuel
  • 2,877
  • 2
  • 20
  • 30
0
votes
0 answers

CGImageRef method

I copied this method from an example to apply filters to an image but I have a problem: CGImageRef createStandardImage(CGImageRef image) { const size_t width = CGImageGetWidth(image); const size_t height = CGImageGetHeight(image); …
Safari
  • 11,437
  • 24
  • 91
  • 191
0
votes
1 answer

GBitmapContextCreate: unsupported parameter combination

Having trouble with CGBitmapContextCreate and getting: Error: Unsupported pixel description - 1 components, 8 bits-per-component, 8 bits-per-pixel with this code: float *bitmap = (float*)malloc(sizeof(float) * width * height); // fill with…
richy
  • 2,716
  • 1
  • 33
  • 42