I need to draw a PNG series in a CGContext so that I can combine them:
CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetBlendMode(context, kCGBlendModeOverlay);
Currently I have an application based on the simple drawing of each image as a UIImageView and adding them as a subtask to the view file with: [self addSubview:someImageView] ... but this does not allow you to manipulate the blend mode, right?
Currently, UIImageView vars are assigned through:
someImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image-name.png"]];
So, I tried replacing them with any of them with no luck:
[[UIImage imageNamed:@"image-name.png"] drawInRect:rect blendMode:kCGBlendModeOverlay alpha:1.0];
and for this I need CGImage , which I'm not sure how to do using PNG:
CGContextDrawImage(context, rect, someCGImage);
So what am I missing? They are not triggered by any interaction, they just need to load / draw when the application loads.
Thanks for any conclusions. :)
iphone cocoa-touch core-graphics uiimage quartz-graphics
steganous
source share