Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-06-2009, 04:05 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: India
Posts: 239
Default Saving the image in the device.

Hey friends ,
i am creating the application where I want to save the image in the device rather than the photo library so that it is directly accessible.
Plz help me to do it . I am nt getting how to do it.

Please help me as soon as possible.
milanjansari is offline   Reply With Quote
Old 07-06-2009, 03:57 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2009
Location: Northern CA
Posts: 152
Default

Use UIImageJPEGRepresentation, and write the resulting JPEG to a file in your sandbox.

NSData *imageData = UIImageJPEGRepresentation(image, compression_setting);
[imageData writeToFile:filePath atomically:NO];
paymaster is offline   Reply With Quote
Old 07-06-2009, 04:17 PM   #3 (permalink)
Humbled Student
 
Dutch's Avatar
 
Join Date: Apr 2009
Location: Long Island, NY
Age: 32
Posts: 883
Send a message via AIM to Dutch
Default

This is what I use:


Code:
UIImageWriteToSavedPhotosAlbum([self image], self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);
Code:
- (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {  
     if (!error) {  
         //Success
     } else {  
        //Error
     }     
}
Dutch is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone xcode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 244
18 members and 226 guests
ADY, Alsahir, beleg_1998, Dani77, diyora, iDifferent, iph_s, JamesCahall, JasonR, mer10, Monstertaco, prchn4christ, Robiwan, Rudy, smithdale87, Speed, spiderguy84, timle8n1
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,755
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:15 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0