-(void)cutOutImage:(UIImage *)cutedImage{
//设置要保存图片的大小
CGSize subImageSize=cutLocation.textureRect.size;
//初始化一个矩形
CGRect subImageRect=CGRectMake(KcutStartX, KcutStartY, KcutWidth, KcutHeight);
CGImageRef imageRef=cutedImage.CGImage;
CGImageRef subImageRef=CGImageCreateWithImageInRect(imageRef, subImageRect);
UIGraphicsBeginImageContext(subImageSize);
CGContextRef context=UIGraphicsGetCurrentContext();
CGContextDrawImage(context, subImageRect, subImageRef);
UIImage *subImage=[UIImage imageWithCGImage:subImageRef];
UIGraphicsEndImageContext();
[centerBg removeChild:selectedImage cleanup:YES];
[selectedImage release];
selectedImage=[[CCSprite alloc] initWithCGImage:subImage.CGImage];
selectedImage.position=ccp(160,240);
[centerBg addChild:selectedImage];
}