Как мне получить CGContextRef из UIImage?

    CGContextRef context = ??; // get from UIImage *oldImage

    CGContextSaveGState(context);   
    CGRect drawRect = CGRectMake(0, 0, 320, 480);
    CGContextConcatCTM(context, transform);
    UIImage *newImage = [[UIImage alloc] init];
    CGContextDrawImage(context, drawRect, newImage.CGImage);
    [newImage drawInRect:CGRectMake(0, 0, 320, 480)];

    CGContextRestoreGState(context);

Короче говоря, я хочу [UIImage -> преобразовать -> преобразовать UIImage].

Есть идеи? Большое спасибо !!

6
задан Costique 14 December 2010 в 09:42
поделиться