how to create gif animation from a stack of jpgs - gif

I have around 200 jpg images. I need to stack them so that i can convert them into a simple animated gif image. Are there any free tools available to do that job? My os is windows.
I'm not so bothered about the quality of the output.

Try using ImageMagick's convert utility. I have used it to create animated gifs from a set of images (in any format) in the past.
Use the command
convert -delay 20 -loop 0 *.jpg animated.gif

Might want to look at GiftedMotion: http://www.onyxbits.de/giftedmotion

In theory this would work
ffmpeg -f image2 -i image%d.jpg video.avi
ffmpeg -i video.avi -pix_fmt rgb24 -loop_output 0 out.gif

If you'd like a flexible on-line solution, I just used GIFmaker.me and it worked great. It lets you change the frame order, change the size, set the speed, and set the repeat cycles. You can view the animated GIF and download it when you're finished.
Edit: I just used another on-line tool that GIFmaker refers to on their site. GIFcreator is even more flexible, letting you duplicate frames, change the delay for each frame, remove frames, and reverse frames. It also has a more flexible resize capability.

ImageJ and FIJI provide a powerful GUI for doing this is (FIJI is a re-package of ImageJ that also includes some widely used plugins). These powerful (but free!) programs may be overkill, but depending on your needs this may be the way to go, since this is a somewhat common and crucial task for biologists.
Also FIJI can open a large array of different image types, can save to GIF or AVI, and it is very easily scriptable (insternally with in Python or Java) for automating custom tasks etc.
Step-by-step instructions (from Here and Here) are as follows:
Put your images in a folder, and name them in sequence (eg. make sure they
open alphabetically in the right order, perhaps by adding the
desired frame numbers to the start of the filenames).
(On MacOS, this automator action could help)
In FIJI, Select `File > Import > Image Sequence..."
Choose your folder, and then any options (eg. scaling the images)
Preview the video with the Play button in the resulting window's
corner.
To change the frame rate, choose Image > Stacks > Animation > Animation Options...
Select File > Save As > Animated GIF... or AVI... and you're done.
For GIF you can choose the delay between frames (ie. frame rate), and looping option. For AVI you can choose the frame rate.

Related

How can I display a JPG image so that a very low resolution displays first?

I've noticed that on some sites, a very low resolution version of an image gets displayed underneath the final version before it's done loading, to give the impression that the page is loading faster. How is this done?
This is called progressive JPEG. When you save a picture using a tool like Photoshop you need to specify you want to use this JPEG flavor.
I've found this Photoshop "Save for Web" dialog sample where you will find the whole Progressive option enabled:
What you are asking for depends upon the decoder and display software used. As noted, it occurs in progressive JPEG images. In that type of JPEG, the coefficients are broken down into separate scans.
The decode then needs to update the image in between decoding scans rather than just at the end of the image.
There was more need for this in the days of dial up modems. Unless the image is really large, it is usually faster just to wait and display the whole image.
If you are programming, the display software you use may have an option to update after scans.
Most libraries now use a model where you decode an image file stream into a generic image buffer. Then you display the image buffer. In this model, there generally is no place to display the images on the fly.
In short, you enable this by creating progressive JPEG images. Whether the image displays fading in dependents entire on what is used to display the image.
As an alternative, you can batch optimize all your images using the ImageMagick's convert command like this:
convert -strip -interlace plane input.jpg output.jpg
You can use these other options instead of plane.
Or just prefix the output's filename with PJPEG
convert -strip input.jpg PJPEG:output.jpg
Along with a proper file search or filename expansion (e.g.):
for i in images/*; do
# Your conversion command
done
The strip option is for stripping any profiles or comments, to make the conversion "cleaner". You may also want to set the -quality option to reduce the quality loss.

as3 air convert sequence of bitmaps to flv

It's posible convert an image sequence (jpg, png) to .flv (or .mp4 instead), using AS3/AIR?
I'm developing an app. This app must record video on an Android tablet.
As the "CameraUI" class doesn't permit to put images/design over the camera capture, and I need to overlay branded design,
I'm trying to save a sequence of bitmaps using this Starling extension (Using this extension I can overlay desing and it's manage a good performance).
My idea is take the generated image sequence, convert it to video, and then to delete the original bitmap files.
Any idea?
Thanks.
Yes this is possible. FLV is an open format. Easiest way is to create raw flv. Otherwise you need to search for the proper compression (there are libraries online).
For the first one, there are a few very old posts, but I think the idea is the same. Few can be found here:
http://www.zeropointnine.com/blog/simpleflvwriteras-as3-class-to-create-flvs/
http://www.joristimmerman.be/wordpress/2008/12/18/flvrecorder-record-to-flv-using-air/
Try to search for 'flv recorder'. There are few out, even with compression and audio.

Create SWF video of images through Adobe Flex

I don't know whether it's the right place to put this up. But I've been trying from past 12 hours and haven't found anything related.
I'm creating a Adobe AIR project (which'll run on desktop), it'll ask for image locations on the local pc.
After the user is done selecting images. I want to output a SWF video (slideshow) of the selected images.
How to do the second step. Please guide. I want to create an output file (SWF) from my AIR Flex Desktop Application.
Check out https://github.com/claus/as3swf to compile SWFs at runtime...
This individual seems to have had a similar issue AS3 to Generate Dynamic SWF?
You can try following options from SWFtools
JPEG2SWF Takes one or more JPEG pictures and generates a SWF slideshow from them. Supports motion estimation compression (h.263) for better compression of video sequences.
PNG2SWF Like JPEG2SWF, only for PNGs.
GIF2SWF Converts GIFs to SWF. Also able to handle animated gifs.
Here is what I did :
Install the as3 compiler (mxmlc)
Run the command mxmlc.exe sample.as3 using NativeProcess

AS3 - Using sprite sheets to optimize my games

So, I'm trying to make my flash "games" run more smoothly. I am using individual PNG files for each of my objects in order to create player animations.
I've heard from some places that using individual files like that is bad.
I heard about using sprite sheets in order to compress data and reduce memory usage.
Maybe I have it wrong, but is there a way to merge all of my PNG images (with transparency) together in such a way that flash can continue to use the images individually?
I am really looking for ways to make my programs run more smoothly in order to be able to have lots of images on screen without much lag. Any ideas on how I can make things run better?
Here is an example of a tile based game I'm trying to make that is having serious lag issues.
TexturePacker allows merge png files. It generates two files: png and config file. Png is just merged images and config file is txt file which you can load into your swf, parse and demerge your images using it. Config could be in various formats for different game engines.
Using Photoshop or similar software you would combine all of the animations frames into one file. The size and shape of the file can be whatever you want, but each of the 'frames' should be the same size, in the same order and with no space between them. For example, lets say each frame is 25x25px, your walk animation is 10 frames and you want the final .png to be one long strip. You would make a new .png with the dimensions of either 250X25 or 25X250 and then insert all of your frames into that one file in the order of the animation. It's up to you if you want to embed these as display object or files that get loaded, but once you have them you just need to use BitmapData to break up the input file into new BitmapData objects and then display them as needed. Going one step further, lets say that most if not all characters have a walk animation and an action animation, you would make a single class to deal with loading character animations and the first row of the image file would be the walk animation and the second would be the action animation.

Embedded Sounds cut off early

I have a combined Flash Builder/Flash Pro project. Because of the hassles involving in maintaining sound assets on the timeline, my sounds are all embedded into Class files, like:
[Embed (source="/mp3/Welcome_01_V.mp3", mimeType="audio/mpeg")]
private static const WELCOME_1:Class;
These files are then referenced by the base Classes for the symbols that need them, embedded for Actionscript on Frame 10 (because the second frame label is on Frame 10 to give space for you to read the first one).
What I'm finding is that a few of these Sounds don't play all the way through, but the SoundChannel dispatches the "soundComplete" event, and its final position matches the Sound's length.
All sounds are converted from wav to mp3 at 44Hz / 16 kbps. I faked out the compiler to avoid a reference to Flex by including a dummy SoundAsset that extends Sound.
I don't know what other steps to take to debug this. Is there a way to figure out whether the problem is on the compile side or on the run side?
Updated
More things I have tried:
Looked at the Size report: The nonworking sounds were smaller in
their embedded form than the source mp3
Got rid of my own BitmapAsset and let Flash link in the Flex Framework and do whatever that does (definitely worse)
Dropped the encoding from 44 kHz to 22 kHz (no improvement or worse)
Dropped the bit rate to 8kbps (the lowest dbPowerAmp, the tool I use, supports). This usually helps somewhat, but I still usually use a word or two from the end of the file
Dropped both parameters in the encoding. This helped a few that just dropping the bit rate didn't, but not all files. Plus it sounds tinny.
Thanks!
For Flash audio, I recommend importing the sound assets into a FLA using wav files if you have the high quality source wavs. Otherwise, you can consider converting your mp3 into a wav as well. Then set the FLA export settings to the quality you want and Flash will convert your wavs into its own format at the quality you set with hopefully less issues.
Once you do that, you can export the sound symbol for actionscript in your library and set a class name just like how you would embed it.
One other trick I use is I have one FLA just for sound assets which can be used to store as big waves as I want. And when I export that, it becomes a small SWF file which I can then embed in my main application. That way, I never have Flash reconvert the wavs to the swf every single time I export the swf. Instead it just copies the swf data which is much faster as well.
[Embed(source="Audio/Sfx.swf", symbol="WELCOME_1_WAV")]
private static const WELCOME_1:Class;
If you are having audio cut off issues in Flash Pro, you may want to check your frame rate.
I had an issue with sounds cutting off (in Flash pro CC 2014). My issue turned out to be related to the frame rate being set to 25 rather than the default 24. I have been using 25 to resolve an issue unrelated to anything in this project, so my solution was to change the FPS to 24, which invoked the necessity to move all of the synchronized animations to re-align with the corresponding audio.
Why long(ish) audio tracks get cut off at the end when the frame rate is at 25 regardless of using proper keyframing is a mystery. This solved the symptoms however, so if you are having audio cut off issues in Flash Pro, you may want to check your frame rate.
My symptoms were specifically when an audio clip was particularly long, and deep into the time line.
What worked for me: I opened the audio files in an audio editor and added a few seconds of silence to the end.
Good luck! - J.Hall