如何在iphone sdk中显示UIImageJPEGRepresentation图像

Mad*_*han 2 iphone objective-c uiimagejpegrepresentation

我想用UIImageJPEGRepresentation在iphone中添加图片,在下面的代码中我遗漏了一些我不知道如何添加的东西

NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:gameObj.gameThumbnails]];   
UIImage *myImage=[UIImage imageWithData:data];

imageView.image=UIImageJPEGRepresentation(myImage, 90);// I am missing something here
[elementView addSubview:imageView];
[imageView release];  

 /*gameObj.gameThumbnails is an url like http://static.gamesradar.com/images/mb/GamesRadar/us/Games/X/X-Men%20Arcade/Bulk%20Viewer/360%20PS3/2010-10-11/192.168.30.167-image36_bmp_jpgcopy--game_thumbnail.jpg
*/
Run Code Online (Sandbox Code Playgroud)

请帮我解决这个问题

iOS*_*wan 13

你将比较质量设置为90.它应该在0.0到1.0之间