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

  • SEARCH
  • Home
  • 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 6858467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:09:46+00:00 2026-05-27T02:09:46+00:00

Interesting one this. I did do a bit Googling on the it but here

  • 0

Interesting one this. I did do a bit Googling on the it but here we go. I have this png file. What I want to do is have it on my iPhone and send it to a server application on Windows. I use something like this:

NSString *filePath = [[NSBundle mainBundle] pathForResource:IconFile ofType:@"png"]; 

NSData *icon = [[NSData alloc ] initWithContentsOfFile:filePath];             
NSLog(@"File path is %@",filePath);
NSLog(@" Bytes to send in Icon File %d",icon.length);

Now this works just fine when I am on the iPhone simulator. When I go to the device though the png format grows in size. For example I had one that was 2514 bytes and went up to 2652 bytes. When I transmit this file – its not able to be read by the Windows app.

So I assume that when a png file gets copied over in the resource bundle – it must get optimised or something. I can get round it by changing the extension to say .txt – then the file doesnt change.

Does anyone know why that is ? And can you prevent it being changed as I’d rather keep the correct extension. I have seen that png formats need to be converted when you get them from the iPhone but I dont know why this would happen when you upload one and it doesn’t work in the simulator mode. Happens with both iPhone and iPad at iOS 5.

  • 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-27T02:09:47+00:00Added an answer on May 27, 2026 at 2:09 am

    The modifying of the png images can be prevented in the build settings – under Packaging there is an option to compress PNG files:

    enter image description here

    Setting this to NO should solve your problem.

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

Sidebar

Related Questions

Alright, this one's interesting. I have a solution, but I don't like it. The
I'm generally not a fan of microbenchmarks. But this one has a very interesting
This is one of the more interesting things I've seen in iPhone development. The
Interesting one here. I have an ASP.NET 1.1 project that contains a web service
Disclaimer: I did check other questions that seemed related, but this one is much
I have one interesting problem. I must parse mail body (regular expression), get some
I'm making a ul-based horizontal navbar, but I want to have two levels heading
I have a bit of an SQL problem. Here are my tables: areas(id, name,
( This question about refactoring F# code got me one down vote, but also
I already did a lot of research on this topic and have implemented a

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.