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 6010971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:11:33+00:00 2026-05-23T02:11:33+00:00

Basically this is what I want to be able to do: I have a

  • 0

Basically this is what I want to be able to do: I have a picture on my computer which is called image.png. If I change the file name by pushing F2 and change the name of it to image.txt, it changes the file extension and the image becomes a text document. When you open it you see all the image data which you can change (if you change it the picture doesn’t come back however). You could edit, such as add a line after the image code that won’t affect the image. After doing this, you can rename image.txt back to image.png and the picture will come back.

How do I get this to work coding wise? What I’m doing so far is saving my image using UIImagePNGRepresentation with the path being the documents directory with a .txt at the end of it. I then do NSString withcontentsoffile which is depreceated and it shows some code but it isn’t the same as when I do it on my PC changing the extensions. If I do NSString with conentsoffile withencoding, the encoding makes nothing appear. I tried NSUTF8String….I’m not near the mac so I’m now exactly sure.

Basically I want to add text to an image (which if added at the bottom of the .txt will not mess up the image) and then change it back to an image and I can’t seem to get this to work.

Need anymore info ask. I’ll be checking back very often.

  • 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-23T02:11:34+00:00Added an answer on May 23, 2026 at 2:11 am

    How about this?

    NSData * imageData = UIImagePNGRepresentation(image);
    NSMutableData * newData = [imageData mutableCopy];
    
    NSString * string = @"Data to be appended";
    
    [newData appendData:[string dataUsingEncoding:NSUTF8StringEncoding]];
    
    UIImage * newImage = [[UIImage alloc] initWithData:newData];
    [newData release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im have a subclass of UIView, called PinView, which contains an image. Basically PinView
Basically I want to be able to do this: session.ExecuteSql(...); I don't need it
Basically what I want to do it this: a pdb file contains a location
I have this form. Basically what I want is to send a auto-response with
I want to be able to open/view a image (.jpg) without locking the file.
I am in a situation where I basically want to be able to have
I have this crystal report, and I want to be able to use it
Basically I want to be able to have a custom control: public class MyControl
So basically I have an ordered binary tree, and I want to be able
Basically I want to re-style UITableView(Controller). Each cell will have a picture as 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.