UIImage to NSData


/ Published in: iPhone
Save to your folder(s)



Copy this code and paste it in your HTML
  1. PNG格式的图片:
  2. UIImage *image.....;
  3. NSData *imageData = UIImagePNGRepresentation(image,1.0);
  4.  
  5. JEPG格式的图片:
  6. UIImage *image.....;
  7. NSData *imageData = UIImageJEPGRepresentation(image);

URL: http://lovebirdegg.javaeye.com/blog/558830

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.