Je veux utiliser UIImageJPEGRepresentation pour ajouter l'image dans l'iPhone, dans le code ci-dessous je suis manque quelque chose, je ne sais pas comment ajouterComment afficher l'image UIImageJPEGRepresentation dans iphone sdk
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
*/
S'il vous plaît aidez-moi de ce
Pouvez-vous s'il vous plaît expliquer avec le code comment afficher .jpeg image url iphone –
NSData * data = [NSData dataWithContentsOfURL: [NSURL URLWithString: gameObj.gameThumbnails]]; UIImage * myImage = [UIImage imageWithData: données]; imageView.image = myImage; – iOSPawan
J'ai fait la même chose mais l'image est de type .jpg. Support UIIMage type .jpg. alors pourquoi ça ne marche pas. –