AS3 determine differnce between animated and not-animated gif? - image-manipulation

Is there a way in AS3 to determine the difference between animated and not-animated gif?

The native Flash Player does NOT support animated GIFs. However someone has written a library that does, so you could use that library to read in the file, and count the number of frames. 1 frame = non animated. More than 1 frame = animated.
AS3 GIF Player Class

Related

iOS combining videos using AVFoundation

What is the method of cropping and combining video using AVFoundation? I need to crop away x number of pixels from the top (of a video) and fill that potion of the video with a different video. Is this possible?
Yes, it's possible, but tricky. You need to:
create an AVMutableVideoComposition and add two tracks with the two videos you want to combine.
shift the video on top up by the amount you want. You do this by figuring out the appropriate affine transform and build the AVMutableVideoCompositionInstructions with that affine transform applied.
It's all very messy. These slides will help you through it:
http://www.slideshare.net/invalidname/advanced-av-foundation-cocoaconf-aug-11
Unfortunately, no. There's no way to crop or mask video on the fly in AVFoundation. You could translate the video down the render area (effectively 'cropping' the bottom) using AVMutableVideoComposition and AVMutableVideoCompositionLayerInstructions setTransform:atTime:

GWT and animated gif: how to display individual frames?

Using GWT, is it possible to use an animated gif and display only a specific frame from it? For example, to display frame 4 and then later on display frame 5. Do we have control over the individual frames of an animated gif in GWT?
No, it's not possible in GWT, and it's not possible in JavaScript either.
As Cory suggested, you can split a GIF into individual frames on a server side, and then serve individual images based on browser events.

How to display photos like iphone homescreen?

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.

Rendering animation to movie

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

iPhone UIImagePickerController: show camera preview on top of openGl viewport

i've a question about UIImagePickerController class reference, in photo-camera mode.
I'm developing an OpenGl game. I should add to game photo-camera features: game should open a window (say for example 200x200 pixels, in the middle of screen), that display in real time a preview of photo-camera IN FRONT OF GL VIEWPORT. So photo-camera preview must be in a window of 200x200 in front of our Gl viewport that display game.
I've some questions:
- main problem is that i've difficult to open UIImagePickerController window in front of our Gl viewport (normally UIImagePickerController window covers all iPhone screen);
which is the better way to capture an image buffer periodically to perform some operations, like face detection (we have library to perform this on a bitmap image) ?
iPhone can reject such approach? It's possible to have this approach with camera (camera preview window that partially overlap an openGl viewport) ?
at the end, it's possible to avoid visualization of camera shutter? I'd like to initialize camera without opening sound and shutter visualization.
This is a screenshot:
http://www.powerwolf.it/temp/UIImagePickerController.jpg
If you want to do something more custom than what Apple intended for the UIImagePickerController, you'll need to use the AV Foundation framework instead. The camera input can be ported to a layer or view. Here is an example that will get you half way there (it is intended for frame capture). You could modify it for face detection by taking sample images using a timer. As long as you use these public APIs, it'll be accepted in the app store. There are a bunch of augmented reality applications that use similar techniques.
http://developer.apple.com/library/ios/#qa/qa2010/qa1702.html