我想将某些代码从iOS更改为Mac OS X,谁能给我一些提示

UIGraphicsBeginImageContext(CGSizeMake( width , height ));
[image drawInRect:CGRectMake(0, 0,width, height)];
image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();


UIGraphicsGetImageFromCurrentImageContext();


UIImageJPEGRepresentation(newImage, 0.75);

谢谢。

最佳答案

参见NSGraphicsContext Class Reference

10-07 21:24