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

The Archive Base Latest Questions

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

I am facing one problem. I have a directory named as Album under my

  • 0

I am facing one problem. I have a directory named as Album under my Supporting Files group. In this directory I have some images. In my image editing app I want to save my edited images in my album directory. I tried to save the image in my album directory by using the following code

NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSString *albumPath = [bundleRoot stringByAppendingString:@"/Album"];
NSString *savedImagePath = [bundleRoot stringByAppendingPathComponent: @"newImage11.jpeg" ]; UIGraphicsBeginImageContext(drawImage.image.size); 
CGContextRef ctx = UIGraphicsGetCurrentContext();
 [drawImage.layer renderInContext:ctx]; 
UIImage *editedImage = UIGraphicsGetImageFromCurrentImageContext();
NSData *editedImageData = UIImageJPEGRepresentation(editedImage, 1.0); UIGraphicsEndImageContext(); 
[editedImageData writeToFile:savedImagePath atomically:YES];

Here drawImage is the IBOutlet of UIImageView which holds the image.This code saved a file newImage11.jpeg in my album directory which has a size also. but when I retrieve the image from album directory it gives me a blank image. I used the following code to retrieve the image

NSString *img = [onlyJPGs objectAtIndex:currentIndex+numberToAdd]; 
UIImage *tempImage = [UIImage imageNamed:img]; 
imageButton.tag = img; 
[imageButton setImage:tempImage forState:UIControlStateNormal]; 
[imageButton addTarget:nil action:@selector(goToEdit:) forControlEvents:UIControlEventTouchUpInside]; 
currentIndex+=numberToAdd;

onlyJPGs is an array which holdes the name of all images contained in the Album directory. I am sure that my app is saving the image in Album directory because when I list the contents of Album directory in ImageEditing.app by using terminal it shows me the newImage11.jpeg file. Any kind of help would be appreciable.

  • 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-27T08:16:09+00:00Added an answer on May 27, 2026 at 8:16 am

    Issue is just simple you are trying to save edited image into bundle.Actually application bundle is “Read-Only”. For this kind of Read and Write access you can use either document directory or Library.
    You can get document directory path by following snippet of code.

    NSString *path=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am facing one problem.i have a class named ReportingService and it should be
i am facing one problem i have two xml files. Plugins.xml <SolutionProfile xmlns=http://schemas.microsoft.com/pag/cab-profile> <Modules>
I have a bean structure to parse JSon files. I am facing one problem,
I am facing a weird problem regarding bluetooth on android devices. I have one
I am facing one problem regarding threading scenario. I have three threads in my
I am facing one weired problem. I have defined my service action in string.xml
I currently working with PictureBox and facing one problem. First, I have drawn one
i am facing one problem in SCSF. I have two workspaces MdiWorkspace DeckWorkspace i
I am facing one problem. I have to create asp.net 4.0 web application which
I am facing one problem from last one week. I have one list having

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.