• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CopyPNGFile apparently garbles PNGs in iPhone build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CopyPNGFile apparently garbles PNGs in iPhone build


  • Subject: CopyPNGFile apparently garbles PNGs in iPhone build
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 11 Aug 2009 20:49:42 -0500

I have a number of PNG files in my iPhone application project, including the application icon. Most of these PNGs are garbled in the .app bundle when I build for Device.

Here is an example of a PNG that works in the project directory, but is garbled when I inspect it in the Finder, in the .app bundle.

== In the project directory:

$ ls -l@ myIcon.png
-rw-r--r--@ 1 fritza  fritza  8019 Aug 11 20:16 myIcon.png
	com.apple.FinderInfo	  32
	com.apple.ResourceFork	58825

$ file myIcon.png
xAPXi.png: PNG image data, 57 x 57, 8-bit/color RGB, non-interlaced

Photoshop left a big resource fork, but the icon is readable (and displays as intended in Preview). When I build for the Simulator, the icon shows up as expected.

== In the .app directory, built for Device/Debug:

$ ls -l@ myIcon.png
-rw-r--r--  1 fritza  fritza  8953 Aug 11 20:20 myIcon.png

$ file myIcon.png
APXi.png: PNG image data, 805314566 x 396263525, 0-bit grayscale,

The PNG, you see, is totally garbled, and does not display in Preview.

(Why don't you see whether it displays on the device, you ask. I'm working on a provisioning issue with a long-distance client, and I don't want to do a development installation on this device till I'm sure ad-hoc distribution is squared away.)

Some PNGs make it into the .app bundle just fine. "file" gives sensible results, and they display correctly in the Finder and Preview. But most of them are garbled.



Here is a bad-CopyPNGFile step of the build (newlines inserted in hopes of making sense of the line wrapping):
===
cd "/Users/fritza/Projects/MyApp"


setenv COPY_COMMAND /Developer/Library/PrivateFrameworks/ DevToolsCore.framework/Resources/pbxcp

setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

"/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug- ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" "/Users/fritza/Projects/MyApp/myIcon.png" /Users/fritza/ Projects/BuildProducts/Debug-iphoneos/MyApp.app/myIcon.png
===


And here is a good-CopyPNGFile step:
===
cd "/Users/fritza/Projects/Projects/MyApp"

setenv COPY_COMMAND /Developer/Library/PrivateFrameworks/ DevToolsCore.framework/Resources/pbxcp

setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

"/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug- ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" "/Users/fritza/Projects/Projects/MyApp/GoodButton.png" / Users/fritza/Projects/BuildProducts/Debug-iphoneos/MyApp.app/ GoodButton.png
===




Is this an Xcode problem, or is there some chicken-waving I haven't done in Photoshop? Any ideas on how to work around it?

	— F

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CopyPNGFile apparently garbles PNGs in iPhone build
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: [Q] Editing CFBundleDisplayName & CFBundleName & Kicking the finder
  • Next by Date: Re: CopyPNGFile apparently garbles PNGs in iPhone build
  • Previous by thread: Re: [Q] Editing CFBundleDisplayName & CFBundleName & Kicking the finder
  • Next by thread: Re: CopyPNGFile apparently garbles PNGs in iPhone build
  • Index(es):
    • Date
    • Thread