Is it possible to convert .icns to .png etc... DYNAMICALLY?

Discussion in 'iOS Programming' started by GOA, Jun 30, 2014.

  1. GOA macrumors newbie

    Joined:
    Jun 30, 2014
    #1
    Hi everyone,

    Is it possible to convert .icns to .png or jpg or tiff dynamically from within xcode?

    I am new to iOS and xcode. I am hoping to develop an app for ipad to display icons and description of all apps, as a list. However, when I use .icns as image nothing is displayed, whereas .png or .jpg etc.. do show up.

    Any idea how I can do that? By the way, why .icns not showing? What is so special about this image?:confused:

    Thank you for your help.
     
  2. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    Novi, MI
    #2
    icns files are not really images, but image containers. See here


     
  3. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    The icns file contains a number of small bitmaps. You could draw them into a bitmap context and save them as jpegs or pngs. This shouldn't be hard.

    The below link provides some info on the format. Apparently versions since Mac OS X 10.7 are already in jpeg or png format. In that case you could move the data into an NSData object and UIImage imageWithData to display the images.

    http://en.wikipedia.org/wiki/Apple_Icon_Image
     
  4. artfun macrumors member

    Joined:
    Jun 4, 2014
    #4
    Are you trying to do the appstore alternative?
     

Share This Page