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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 05-19-2010, 04:07 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 11
superstec is on a distinguished road
Question Save entire image in UIScrollView when zoomed

I have been working on a simple app that uses the ScrollView Suite AutoScroll from the Apple sample code which displays some photos in a UIScrollView.

I have a button that saves the current UIScrollView context.
Code:
UIGraphicsBeginImageContext(imageScrollView.bounds.size); 
		
[imageScrollView.layer renderInContext:UIGraphicsGetCurrentContext()]; 
	
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
	
UIGraphicsEndImageContext();
	
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
This works perfectly for photos which I have BUT only if the user has NOT zoomed in at any point. If they have I am left with a blank or cropped photo.

I wish to only save the image in its entirety. For example my images are named image1, image2 etc and i wish to save only that selected image, not a cropped image of the current zoomed in area.

I have been struggling to see where i can get a direct string name to try and save the image directly.

Is there anyone familiar with ScrollView Suite that could tell me which string to use when the image is selected.

Should i be looking at trying to solve this problem by setting the bounds of the frame to capture the entire photo. e.g. all my photos are 800x1200??
If so how would i go about this?

Anyone who can help it would be greatly appreciated as i am at a bit of a dead end with it.
superstec is offline   Reply With Quote
Old 05-29-2010, 07:31 AM   #2 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 25
Doggy is on a distinguished road
Default

Quote:
Originally Posted by superstec View Post
I have been working on a simple app that uses the ScrollView Suite AutoScroll from the Apple sample code which displays some photos in a UIScrollView.

I have a button that saves the current UIScrollView context.
Code:
UIGraphicsBeginImageContext(imageScrollView.bounds.size); 
		
[imageScrollView.layer renderInContext:UIGraphicsGetCurrentContext()]; 
	
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
	
UIGraphicsEndImageContext();
	
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
This works perfectly for photos which I have BUT only if the user has NOT zoomed in at any point. If they have I am left with a blank or cropped photo.

I wish to only save the image in its entirety. For example my images are named image1, image2 etc and i wish to save only that selected image, not a cropped image of the current zoomed in area.

I have been struggling to see where i can get a direct string name to try and save the image directly.

Is there anyone familiar with ScrollView Suite that could tell me which string to use when the image is selected.

Should i be looking at trying to solve this problem by setting the bounds of the frame to capture the entire photo. e.g. all my photos are 800x1200??
If so how would i go about this?

Anyone who can help it would be greatly appreciated as i am at a bit of a dead end with it.
im stock @ almost the same problem, have you solved it?
im trying to load more then one image, basically the same images of the thumbscroll view,but in the imagescrollview, so you can swipe through the images
Doggy is offline   Reply With Quote
Old 06-27-2010, 09:33 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 3
exile78 is on a distinguished road
Default hwlp

Quote:
Originally Posted by Doggy View Post
im stock @ almost the same problem, have you solved it?
im trying to load more then one image, basically the same images of the thumbscroll view,but in the imagescrollview, so you can swipe through the images
Hi
i to am having trouble with this, im trying to make an app that has pictures that transition in a uiscrollview controller and that part works fine, i can slide between 4 test images i have full screen,all good, but i would also like to be able to save those images with a button, and i cant get any of the code to save image to work when using a uiscrollview but on a uiimageview i can, i'd like the user to be able to slide between images rather than press a button to go to next image

any assistance would be great
thanks
exile78 is offline   Reply With Quote
Reply

Bookmarks

Tags
capture image, save, uiscrollview

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: 311
9 members and 302 guests
Abidullah, ajay123123, Fstuff, guusleijsten, HemiMG, newDev, pkIDSF, Sami Gh, Steven.C
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,877
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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