iPhone - Corrupt JPEG data for image received over HTTP

后端 未结 5 1711
我寻月下人不归
我寻月下人不归 2020-12-10 16:04

I\'m getting an image over HTTP, using NSURLConnection, as follows -

NSMutableData *receivedData;

- (void)getImage {
    self.receivedData = [[NSMutableDat         


        
5条回答
  •  时光说笑
    2020-12-10 16:55

    Your HTTP code looks correct. You might want to log the size of the receivedData once it's done loading and compare it to the expected size of the image on the server. If it's the expected size, then maybe the image itself is corrupted on the server.

提交回复
热议问题