First fill the color for complete rect. The rect will be of size image width and image height. Now draw the image on same rect.
CGContextSetFillColorWithColor( context, [UIColor redColor].CGColor );
CGContextFillRect( context, rect );
CGContextDrawImage(context, rect, [UIImage imageNamed:@"myImage"].CGImage);