cgimage « image « iPhone iPad Media Q&A

Home
iPhone iPad Media Q&A
1.animation
2.audio
3.AVAudioPlayer
4.box2d
5.cocos2d
6.CoreGraphics
7.CorePlot
8.Flash
9.graphics
10.icon
11.image
12.photo
13.plot
14.sound
15.video
iPhone iPad Media Q&A » image » cgimage 

1. Convert image to grayscale    stackoverflow.com

I am trying to convert an image into grayscale in the following way:

#define bytesPerPixel 4
#define bitsPerComponent 8

-(unsigned char*) getBytesForImage: (UIImage*)pImage
{
    CGImageRef image = [pImage CGImage];
    ...

2. iPhone: How to change the color of an image    stackoverflow.com

I have a small image from a database and the image's average color need to be altered slightly. It's a CGImageRef and I thought of creating a CGContext, drawing the image to ...

3. iPhone: CGBitmapContextCreateImage() only works in Simulator    stackoverflow.com

I created an app which creates an image by using CoreGraphics. The images appears on the screen when using the iPhone Simulator (OS 3.1 beta3) but not when I run the ...

4. How can I modify this code, which rotates a CGImage, not to crop the image on rotate?    stackoverflow.com

This function rotates a CGImage by an arbitrary number of degrees, but it clips the image a bit. How can I avoid the clipping? Making the rectangle a bit larger seems ...

5. Convert bitmap image information into CGImage in iPhone OS 3    stackoverflow.com

I want to create a CGImage with the color information I already have Here is the code for converting the CGImage to CML, CML_color is a matrix structure

- (void)CGImageReftoCML:(CGImageRef)image destination:(CML_color &)dest{
CML_RGBA p;
NSUInteger ...

6. Length of data returned from CGImageGetDataProvider is larger than expected    stackoverflow.com

I'm loading a grayscale png image and I want to access the underlying pixel data. However after I load get the pixel data via CGImageGetDataProvider, the length of the data returned ...

7. how to save an image with text on another image?    stackoverflow.com

I any one have idea about taking snapshot from iphone application through coding. means. I am developing an iphone application where there will be two images dynamically comes. There will be a text ...

8. show image in a CGContextRef    stackoverflow.com

What i am doing, i downloded a code for calender now i want to show images on its tiles(for date). What i am trying shows in code

- (void)drawTextInContext:(CGContextRef)ctx
{
    CGContextSaveGState(ctx);
 ...

9. Segment a CGImage    stackoverflow.com

In iOS 4.0 and later is there a way to segment a CGImage without loading the entire image into memory? What I am attempting to do is * programmatically* segment an ...

10. how to handle tiling of images on the fly    stackoverflow.com

I am writing an app which would tile the images 256 * 256 and write those tile files back in the directory. I am updating my URL each time if there ...

11. Image is rotated 90 degrees when using clipToMask    stackoverflow.com

I am trying to clip a portion of an image I take with a camera. Here's my clipping code:

- (UIImage*) maskImage:(UIImage *)image {

CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

UIImage *maskImage = [UIImage imageNamed:@"mask3.png"];
CGImageRef maskImageRef ...

12. changing alpha of a color range in a rectangle of an image ios    stackoverflow.com

I am making an ios app that finds a persons eyes to make them glow. What I have so far is an app that will put rectangles around a persons eyes ...

13. How can I rotate an image and then add brightness to image?    stackoverflow.com

I am trying to rotate Image by following code:-

 - (CGImageRef)CGImageRotatedByAngle:(CGImageRef)imgRef angle:(CGFloat)angle
 {

CGFloat angleInRadians = angle * (M_PI / 180);
CGFloat width = CGImageGetWidth(imgRef);
CGFloat height = CGImageGetHeight(imgRef);

CGRect imgRect = CGRectMake(0, 0, width, ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.