Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3424722
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:30:29+00:00 2026-05-18T06:30:29+00:00

I am downloading and saving a radar image (in .gif format) from with web

  • 0

I am downloading and saving a radar image (in .gif format) from with web using an NSURLConnection. In the connectionDidFinishLoading: method, I create an image using [UIImage imageWithData:].

- (void)connectionDidFinishLoading:(NSURLConnection *)connection  
{  
    // Problem is here. mutableData declared earlier.
    UIImage *baseImage = [UIImage imageWithData:mutableData];  

    if (baseImage)  
    {
        // do stuff with image
    }

    [mutableData release];
}

The problem is that the images I am downloading are sometime blank and have clear background. This is NOT an error in the image (sometimes there is nothing on the radar to return). But when this happens, I am getting this error in the console. The error can also occur when the image has a very small number of pixels (1 or 2).

Error: ImageIO: malformed GIF frame#0 (600 x 550)

When the error occurs, the image that is created is nil. The 600×550 is the size in px of the image I am downloading. So the returned image in nil, which makes it seem as the download has failed.

It is worth noting that baseImage can fail in 2 cases, the one mentioned above or when I download an image that is listed on the server that is not actually there yet. In the second case, mutableData contains an error string. I still need the 2nd case to fail so I know that an image was not successfully downloaded.

What I need to do in this case is actually create the blank image and save it so the user will be able to see that the download performed correctly.

Any ideas?

Thanks,
Ross

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:30:29+00:00Added an answer on May 18, 2026 at 6:30 am

    Using this code :

        NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://files.me.com/ross.kimes/6cuagt"]];
    UIImage *image = [UIImage imageWithData:data];
    NSLog(@"%@", image);
    

    I’m afraid I get no errors in the console and a valid UIImage object 🙁


    I suppose that you could detect the presence of a string= – i.e. NSSTring stringWithData:encoding: – if it’s a valid string and the image is nil you could probably assume that it’s an error message?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET program where i am downloading a file from web using
I am downloading files from my server, saving them to device, and displaying them
I am currently downloading 471 thumbnails from a server,doubling the dimensions,saving it on the
I am downloading a file from an ftp server and saving it to the
In my app, me downloading different image and saving inside sdcard under a folder.
I am downloading images from server and saving them locally in my iphone,But sometimes
I am downloading files from aws s3 using the getObject api. Simple text files
I written a code for downloading and saving images from a site .It worked
I am downloading an Android app from a server and saving it to the
I am downloading a file from and ftp, saving it onto my local filesystem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.