2014-12-15 8 views
-1

에 잘못된 컨텍스트 :아이폰 OS - 나는 다음과 같은 오류 얻을 내 회전 방법을 실행하려고 CGContextRotateCTM

<Error>: CGContextRotateCTM: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

회전 방법 :

UIImage* rotate(UIImage* src, double degrees) { 
 
    UIGraphicsBeginImageContext(src.size); 
 
    CGContextRef context = UIGraphicsGetCurrentContext(); 
 
    CGContextRotateCTM (context, radians(degrees)); 
 
    [src drawAtPoint:CGPointMake(0, 0)]; 
 
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 
 
    UIGraphicsEndImageContext(); 
 
    return image; 
 
}

을 내가 뭘 잘못하고 있는지 알 겠어? 제로 크기이다

OR

전무

답변

0

어느 화상이다. => 비어있는 이미지

+0

고맙습니다. :) – NikMos

+1

다음에 그것을 수락하거나 질문을 삭제하십시오 plz –