//class method picture converted to binary+ (NSData *) Image_transform_data: (UIImage *) image{NSData*imagedata = uiimagejpegrepresentation (image,0.5);
//almost 0.5 of the image size to the original half of it, like here 24KB to 11KB returnImageData;}//examples of calling methods-(void) Viewwillappear: (BOOL) animated{[self read_imagedata];}- (void) viewdidload{Nav_view=[[Navview alloc]init]; [Self.view addsubview: [Nav_view navview_title:@"Announcements"]]; [Super Viewdidload]; [Self read_imagedata];}//The following method is to compress a picture into binary and then converted to a picture to do a good job-(void) read_imagedata{Uiimageview*imageview1=[[uiimageview Alloc]initwithframe:cgrectmake (0, the, $, $)]; Imageview1.image=[uiimage imagenamed:@"Cat_food.png"]; [Self.view Addsubview:imageview1]; Uiimageview*imageview3=[[uiimageview Alloc]initwithframe:cgrectmake (0,280, $, $)]; Imageview3.image=[UIImage imagewithdata:[function Image_TransForm_Data:imageView1.image]; [Self.view ADDSUBVIEW:IMAGEVIEW3]; NSData*data =[NSData datawithdata:[function Image_TransForm_Data:imageView1.image]; [Data writetofile:[function Createthefolder_from:library_cache fileholdername:myfolder FileName:@"Pp111111.png"] atomically:yes];}
: as follows
Can see a little compressed quality details is not okay haha