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
0
votes
1 answer

How to rotate and crop iOS CGImage from file

I'm having some trouble with image rotation in iOS. I'm performing some image manipulation in the background of an app... I would like to rotate and crop the images. Currently, the rotation seems to be working correctly, but no matter what I have…
0
votes
0 answers

ScreenCapture on OS X Retina

I am trying to do a screen capture on OS X. My solution works properly on macbook pro. But I am facing some problems on Retina displays. I try to get the current resolution using CGDisplayPixelsHigh/CGDisplayPixelsWide. It returns the correct…
Seema Kadavan
  • 2,538
  • 1
  • 16
  • 31
0
votes
1 answer

writeToFile: returning correct path, but no file?

I have this code to make a PNG out of NSData I have for an NSImage, but no file is created in the Downloads folder? - (IBAction)saveToDownloadsFolder:(id)sender { NSInteger selected = [tvContent selectedRow]; ImageCell *selectedRow =…
user2284295
0
votes
4 answers

Unable to display thumbnail in another view controller

- (void)displayThumbnail { AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:[self outputURL] options:nil]; AVAssetImageGenerator *gen = [[AVAssetImageGenerator alloc] initWithAsset:asset]; gen.appliesPreferredTrackTransform = YES; …
0
votes
0 answers

How to apply CIFilter to CGImageRef?

I tried to apply a CIFilter to a CGImageRef, but it seems not to work this way. CGImageRef image = _image; CIFilter *filter = [CIFilter filterWithName @"CISephiaTone" keysAndValues:kCIInputImageKey, image, @"inputItensity", @0.8, nil]; CGImageRef…
0
votes
1 answer

Bad access after releasing image reference

I got bad access error when trying to get the reference image back from UIImage: CGImageRef imageRef = mat2CGImageRef(mat); _documentUIImage = [[UIImage alloc] initWithCGImage:imageRef]; CGImageRelease(imageRef); After that if I want to get the…
Mohanad Kaleia
  • 793
  • 1
  • 9
  • 22
0
votes
2 answers

CGImageRef uses lot of memory even after release

I'm using CGImageRef and noticed that it uses a lot of memory that doesn't get deallocated. So I tried experimenting with the following code - (void)photofromAsset:(ALAsset *)asset completion:(void(^)(NSError *error))completionHandler …
halfblood17
  • 657
  • 1
  • 6
  • 21
0
votes
1 answer

CGImageRef rotation distorted image

Have following code for rotation: CGFloat angleInRadians = angle * M_PI/180.0; CGFloat width = CGImageGetWidth(imgRef); CGFloat height = CGImageGetHeight(imgRef); CGRect imgRect = CGRectMake(width, height, width, height); …
iiFreeman
  • 5,165
  • 2
  • 29
  • 42
0
votes
1 answer

App crash using CGImageRef

I'm going to filter the image using CGImageRef.The scenario is while i applied the "CIPhotoEffectChrome" and navigate to back screen, My app is going to crash...And the log displayed EXC_BAD_ACCESS. HERE is the code::: - (UIImage…
Sonu
  • 937
  • 1
  • 10
  • 39
0
votes
0 answers

Create new image using just some pixels data from the source image based on them color

I have original image and I can cycle all pixels using @patrick-rutkowski answer here. Also I have this answer seems to create image with pixel data. But I can't understand how to combine these two answers. So the first task is get pixel and second…
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
0
votes
3 answers

iOS 8.1 crash (EXC_BAD_ACCESS) : : ImageIO: CGImageReadGetBytesAtOffset : *** ERROR *** CGImageSource was created with data size:

Appreciate any help fixing a crash (EXC_BAD_ACCESS) in my iOS app. I am seeing this since updating my app to iOS 8, using latest available iOS 8.1.2. The same code worked fine in iOS 7.x. One of the views in my app is a UICollectionView. Every cell…
0
votes
1 answer

LeavesCache.m works on simulator but not on device

Its my first time posting so please bear with me. I have been searching sites after sites and I can't seem to find any which has resolved this issue. Would be happy if someone could answer me. LeavesCache.m was modified last year if not mistaken to…
Rach Ng
  • 123
  • 1
  • 1
  • 10
0
votes
0 answers

Swipe Image And Have Filter Overlay Along Swipe

For a few days now I've been diligently researching how to get swiping between images with filters working. There is a post that has my exact same issue: Swipe between filtered images Basically I need to swipe between filtered images just like it…
Aggressor
  • 13,323
  • 24
  • 103
  • 182
0
votes
3 answers

CGImage memory leak

The following code works the way I want it to, but every time I call it, Instruments tells me I have one CGImage memory leak. I've been having trouble understanding what to release and when. The following is from the @interface section of my…
Theme
  • 417
  • 6
  • 18
0
votes
1 answer

Why UIImage is Blurry after Cropping in Slider?

I am using this code for my slider for cropping image for UISlider when i am Dragging Slider then image is Blurring how can it without Blurring and Losing without its Clarity - (UIImage *) revealedTrackImageForCurrentValues { //Get left and…
Mayank Patel
  • 3,868
  • 10
  • 36
  • 59