I'm currently developing an collage application for iPhone and I've now at the point of saving the image and I therefore need the correct path so that the images shows in your image library.
Does anyone know the address to the path?
BR,
drisse
You can't write to that directly, you have to have an in-memory UIImage and then call the method to send it to the library using UIImageWriteToSavedPhotosAlbum() (a normal function defined in UIKit).
You can pass arguments to be notified when the save completes (which you might want to put up an indicator for) but you don't have to use them (pass in nil).
Related
I am using an imagewell to accept jpg images being pasted or dragged into my OSX app. The problme is that I am struggling to get the original jpg images as OSX seems to requires me to get the Tiff version of the NSImage if I want to uplod via Alamo Fire.
Does AlamoFireImage have a fancy way of getting the original url / original raw data without converting to Tiff first?
Actually, with an NSImageWell, you don't have much possibilities regarding the dropped image. It's a convenient class for showing dropped images but as soon as you need to do more, it's not up to the task.
I suggest you use an NSImageView instead, and add drag and drop capabilities to it like in my example here: https://stackoverflow.com/a/29233824/2227743
This way you can easily get the dropped image's URL (and filename), and the image data itself of course.
I am trying to implement code in order to retrieve group information from my Parse cloud.
The issue comes in displaying the user images. as sometimes (I think) the image is not found yet, but the simulator tries to download it.
The code is running as following:
in viewDidLoad I use findObjectsInBackgroundWithBlock
in order to find the groupMember in class "Group" by their ids.
in viewDidAppear (which I figure is a bit behind in the timeline) findObjectsInBackgroundWithBlock to find their profile Pictures. Storing them in an Array and downloading the images in my cellForRowAtIndexPath method.
Is there a way to guarantee an outcome? Or even a better method to reach my goal?
I have a feeling the irregularity of the problem is because of the calls running in the background and not being complete before you are working on the cell.
But.... are you using a Parse PFQueryTableViewController or a UITableView?
Reason for asking is that the Parse PFQueryTableViewController provides a PFTableViewCell - and both these classes are very happy running in the background and working well together.
Now the important thing about PFTableViewCell is that if you wish to display an image in your table, then you can give it a standard image that is initially displayed to users and then in the background it can check to see if a real image exists and if it does, download and switch out the initial image.
http://blog.bizzi-body.com/2015/02/13/how-to-display-parse-com-images-in-a-table-view/
I want to generate screen shots of a EAGLView using Everyplay SDK but unable to do it. In Everyplay's github page, change log say we can call [[[Everyplay sharedInstance] capture] takeThumbnail]; as many times we want but I don't find any way to obtain image from that.
Also, EveryplayCapture class provides a property "thumbnailTextureId" (I guess it refers to the opengl texture) but is always 0 or nil.
I don't want to use EAGLView's -snapshot method because the resultant image is not good enough (contains rough white border around sprites) for use.
Is there any way to obtain a screenshot image from everyplay?
You are close.
In your class (then one you pass to Everyplay init method) implement this callback methods:
- (void)everyplayThumbnailReadyAtFilePath:(NSString *)thumbnailFilePath;
Now if you call
[[[Everyplay sharedInstance] capture] takeThumbnail];
Everyplay will call the method above to inform you that it's ready - from there you can read it as file.
I was wondering whether the following scenario is possible; let's say a user draws his own drawing (including text and lines) over another, could the result be saved and then uploaded?
Thanks in advance!
Yes, this is perfectly possible. You will want to look into creating your own UIView subclass for drawing and you can save the resulting image using core graphics. To upload the image to a server of your choice you could use the NSMutableURLRequest and NSURLConnection classes. If you are a novice developer the first part of this might prove challenging, but it can be done.
It seems like the built in UIImagePickerController cannot accept sources other than its device camera Roll.
I would like to get the functionality of picking and enlarging pictures within my own app. Also I would like to allow the user to select the pictures and save it into their camera roll (so they can later use it as wall paper)
1) what is the recommended way of building a custom UIImagePickerController that supports what I need ? Is there another built in controller I am missing?
3) Is there a way to take a UIImage and save it to the desktop background of the device directly? Or is it a two step (first save to camera roll), then have the user load the picture from there to save as wallpaper
Thanks in advance!!
At this point, it seems that the only way to build a custom UIImagePickerController functionality is to subclass, and then muck with the view hierarchy directly. This allows you to move, hide, and replace UI elements and access the non-public classes that control the operation of the camera, but as you probably gather, this technique is both unsupported (in that it may, and probably will, break with future updates) and not recommended (in that it may, and probably will, get your app rejected from the App Store if detected).
As far as your second point (somehow numbered 3), John is right: there is no call in the public SDK to accomplish this. You could probably hack something together if you're clever, but remember the warnings in my first paragraph...
Regarding #3) there is no public call in the SDK to save an UIImage to the desktop.
I don't know about the rest of your questions though.
Just today I started a open source UIImagePickerController clone, it is not perfect but it works quite ok. Feel free to fork http://github.com/jeena/JPImagePickerController