I have a serious problem with Core Animation in combination with the AV Foundation.
I want to render the animation of several UIImages to a movie file. The animation of the images should only be the change from one image to the next, just like shown here http://appsamuck.com/day2.html. But I don't want to display this animation but render it to a common movie file.
I know it is possible to create movie files using the AV Foundation, but I don't get it. I don't know how to set up the animation so I can save the movie file.
Currently I am using the code shown here Need hints for using iPhone SDK's AVMutableVideoComposition, but the difference is that I don't want to render a shake animation but the image change.
Can somebody help me or give me a hint which Core Animation class I must use? I looks like the AV Foundation needs a Core Animation object, but the common way to implement the image change animation is using the UIImageView class.
C YA
Related
I’m trying to create an AR image to project on a wall from a Gigapixel image. Obviously Xcode crashes if I try to load the image as a material. Is there an efficient way to load only parts of the image that the user is looking at?
I'm using Swift 4.
This may not do exactly what you want, and you might need to roll-your-own way of parsing and passing data between Core Animation and SceneKit, but this is native, and is designed to handle large images and texture data sources, and feed them out asynchronously, and/or on a demand based basis:
https://developer.apple.com/documentation/quartzcore/catiledlayer
I would like to know how can I customize the 'iris' or 'shutter' animation of the iPhone's camera. An awesome example of what I am trying to achieve can be found in SocialCam app.
When you launch the camera, there's a custom iris effect as shown below:
Thanks ahead.
I think that you do not customize the shutter, but simply create a new animation. You can do that using Core Animation.
Using core animation makes it simple to move views around using minimal programming.
Please read: http://developer.apple.com/library/ios/#DOCUMENTATION/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html for more information.
Try these link , it consist of Project files too.iPhone Camera Shutter Animation
I am working on an Iphone application.
I need to do the following: when the user clicks on the "Camera Tab" the camera open inside the view with circle overlays.
I want to apply a filtering algorithm on the camera.
I am looking for the best way to do this. Is there a library that can help?
What I am doing currently:
I am using the OpenCV Library.
I define a timer.
For each timer tick I call cvCaptureFromCam() method from the OpenCV
framework (This will capture the picture with a camera and return
it).
I apply the algorithm on the image captured.
i display the image in a UIImageView
The idea is that on each timer tick I get the image, filter it and put it in the UIImageView. If the timer tick is fast enough it will appear as continuous.
However the cvCaptureFromCam is a little slow and this whole process is taking too much memory.
Any suggestions of a better way is greatly appreciated. Thanks
Anything that's based on CPU-bound processing, such as OpenCV, is probably going to be too slow for live video filtering on current iOS devices. As I state in this answer, I highly recommend looking to OpenGL ES for this.
As mentioned by CSmith, I've written an open source framework called GPUImage for doing this style of GPU-based filtering without having to worry about the underlying OpenGL ES involved. Most of the filters in this framework can be applied to live video at 640x480 at well over the 30 FPS framerate of the iOS camera. I've been gradually adding filters with the goal of replacing all of those present in Core Image, as well as most of the image processing functions of OpenCV. If there's something I'm missing from OpenCV that you need, let me know on the issues page for the project.
Build and run the FilterShowcase example application to see a full listing of the available filters and how they perform on live video sources, and look at the SimplePhotoFilter example to see how you can apply those filters to preview video and photos taken by the camera.
I'm trying to make an app that's displaying my photos from camera roll like app icons in iphone (matrix view) . The pictures will have the "wobble" effect and the pictures need to be rearrangeable(the posibility to swap pictures).
I found out how to implement the wobble efect.
What`s the best way to implement the displaying and swapping functionality?
I suggest you to show your photos using CALayer.
Add those layer in Matrix like pattern in your UIView using frame property of layer.
To move or rearrange photos find particular CALayer in touchesBegin method of View using touch points and Move it with movement in touched(in touchesMoved). Settle it in a proper location in touchesEnded method.
I have assumed that you have basic knowledge of usage of classes that I mentioned in above description.
Post here if you need more help.
How would you impelement the following?
1. Image is loaded from a file
2. On Touch the picture burns in flame.
3. Next picture loads from another file.
How would you make the flame transition?
Hands down I'd use some OpenGL ES code I wrote for doing non-standard transitions (about 300 lines of code) as a base, and build a flame transition this way -- because I already have the code existing of course.
Basically how it works is like this:
Subclass UIView, set up a few properties including a EAGLContext, some GLuints representing textures of the views, etc.
Tell the view that its backing layer is an EAGLContext by overriding +layerClass
During initialization, pass another view in (your start view), and in this initialization phase, set up the GL context, take a texture of the view by capturing how it looks on the screen, save it for later.
Define a transition method which takes another view (the one to transition to), and does similar actions to #3 above, but also calls your custom transition code -- i.e., your flame effect.
That said, even if I didn't, OpenGL ES would still be the way I'd look at doing this first, since it will give me desirable effects in terms of realism, safe timing, and fast performance.
Alternatively you can look at CoreAnimation, which may be simple enough for your needs.