search

Home  >  Q&A  >  body text

objective-c - ios 图片如何转化成二进制流

ios 图片如何转化成二进制流

ringa_leeringa_lee2771 days ago586

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-18 09:42:31

    UIKIT_EXTERN  NSData * __nullable UIImagePNGRepresentation(UIImage * __nonnull image);                               // return image as PNG. May return nil if image has no CGImageRef or invalid bitmap format
    UIKIT_EXTERN  NSData * __nullable UIImageJPEGRepresentation(UIImage * __nonnull image, CGFloat compressionQuality);  // return image as JPEG. May return nil if image has no CGImageRef or invalid bitmap format. compression is 0(most)..1(least)

    reply
    0
  • Cancelreply