CGImage represents a drawable image object in Core Graphics (the low-level procedural drawing API for iOS and Mac OS X).
Questions tagged [cgimage]
563 questions
0
votes
0 answers
CGImageCreate making noise towards bottom of the image Objective C
I'm using CGImageCreate to create an image from a byte buffer (of uint8_t). The image seems to get noise towards the bottom though. Is there an alternate way to do this or am I doing something wrong using CGImageCreate?

Ashutosh Nanda
- 1
- 1
- 4
0
votes
1 answer
Can't create Retina images with CGContextDrawImage
I'm creating an image by combining two other images, using CGContext. Even if I have the @2x images, I can't succeed to create an retina image.
Here's my code. Could you please help ?
-(UIImage*)makePinImageWithImage:(UIImage*)icon {
UIImage * pin =…

Martin
- 11,881
- 6
- 64
- 110
0
votes
1 answer
On iOS, is there a way to directly alter or draw to CGImage instead of drawing to Graphics Context and then convert the whole thing?
If we already have a Bitmap Graphics Context, and we converted this context to a CGImage. Now we want to add a single dot to the CGImage. Can we alter the CGImage directly, instead draw a single dot to the graphics context and covert the whole…

nonopolarity
- 146,324
- 131
- 460
- 740
0
votes
1 answer
Simple puzzle game iOS: Analyzing alpha pixel issues
I create simple puzzle game and use next for this:
I have an class named Piece. Piece class inherits from UIImageView and contain next field:
@property(nonatomic, strong) NSString *pieceName;
@property(nonatomic) CGFloat pos_x;
@property(nonatomic)…

Matrosov Oleksandr
- 25,505
- 44
- 151
- 277
0
votes
1 answer
CGImage APIs and ICO files
I'm experiencing something that seems like a bug: if I create ICO files using the CGImage APIs I get the first rep (256px) with a color profile, while all the other reps don't have a color profile (and in fact they look much brighter). I also tried…

user732274
- 1,069
- 1
- 12
- 28
0
votes
0 answers
How to store 100 iPad CGImages in NSDictonary iOS
I have 100 iPad image, want to store them in dictonary...if i stored them in my NSMutable dictionary app is crashing..
Example Code is:
NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] initWithCapacity:[_assets…

Steve Gear
- 757
- 2
- 16
- 44
0
votes
1 answer
Apply filter to MPMoviePlayer thumbnails without lag
I am able to generate a CGImage from a thumbnail in MPMoviePlayer. What I want to do is apply a filter on the image and show it on the device as fast as possible (probably in a UIImageView).
The caveat here is that I need to apply the filter to…

user1397332
- 1
- 2
0
votes
2 answers
CoreImage CICrop returning 0x0 pixel image
Apologies for so many questions today, Friday dead brain symptom setting in.
I have a CICrop filter:
[crop setValue:beginImage forKey:@"inputImage"]; //give the crop filter the beginImage
[crop setValue:[CIVector vectorWithX:0.0f Y:0.0f…

mrEmpty
- 841
- 4
- 19
- 36
0
votes
1 answer
Save CIImage, by converting to CGImage, throws an error
I have an image I'm grabbing from AVFoundation:
[stillImage captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) {
NSLog(@"image capture");
NSData *imageData…

mrEmpty
- 841
- 4
- 19
- 36
0
votes
1 answer
ARC not freeing original asset after CGCreateWithImageInRect?
High level summary:
I would like to replace the rather low resolution ALAsset Group images [group posterImage] with a higher quality version so that they can be shown larger on the screen. Normally I would load them as needed by the interface, but…

MobileVet
- 2,958
- 2
- 26
- 42
0
votes
1 answer
compressed CGImage with CGImageDestination truncated after getting bytes
I want to get the compressed data from a CGImageRef to send it over a network connection.
To do so, i use a CGImageDestinationRef (CGImageDestinationCreateWithData).
After pulling the Data out of the CFDataRef Object the image misses a couple of…

inx
- 3
- 2
0
votes
1 answer
Verify pixel with coord (iOS)
In my view I have few subviews. This is UIImageView.
Each UIImageView contain image with alpha chanel.
This is an image:
I use this method below for detecting my touch in location view:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent…

Matrosov Oleksandr
- 25,505
- 44
- 151
- 277
0
votes
1 answer
iOS CGImageRef Pixel Shader
I am working on an image processing app for the iOS, and one of the various stages of my application is a vector based image posterization/color detection.
Now, I've written the code that can, per-pixel, determine the posterized color, but going…

Georges Oates Larsen
- 6,812
- 12
- 51
- 67
-1
votes
1 answer
iOS: How to draw a wedge?
I need to draw a wedge, which is to say a part of a filled ellipse that goes from one angle up to another angle, e.g. 90 degrees to 110 degrees.
Either a filled wedge would be good, or an outline of a wedge.
Anybody here know how to draw such a…
user945620
-1
votes
1 answer
How to replace the color of a pixel in an image?
I have a function that can return the color of a pixel by points
extension CGImage {
func colors(at: CGPoint) -> UIColor {
let colorSpace = CGColorSpaceCreateDeviceRGB()
let bytesPerPixel = 4
let bytesPerRow = bytesPerPixel * width
…

Chepelev Evgeniy
- 3
- 1