1
-(void)drawJPEG
{
NSArray* objects = [[NSBundle mainBundle] loadNibNamed:@"View" owner:nil options:nil];
UIView* mainView = [objects objectAtIndex:0];
for (UIView* view in [mainView subviews]) {
if([view isKindOfClass:[UIImageView class]])
{
UIImage* PassportSizePhoto = [UIImage imageNamed:@"1.jpeg"];
[self drawImage:PassportSizePhoto inRect:view.frame];
}
}
UIImage *image;
UIGraphicsBeginImageContext(mainView.bounds.size);
{
[mainView.layer renderInContext:UIGraphicsGetCurrentContext()];
image = UIGraphicsGetImageFromCurrentImageContext();
}
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
}
여기에 어떤 문제가 있습니까? – Mani
왜 jpeg 이미지를 사용하고 있습니까? 문제를 설명해 주실 수 있습니까? – Sierra