Linux for Designers

a blog by Eckhard M. Jäger

Flash SWF Export for GIMP

, , , , , ,

For image conversion and an easy way keeping the content of our lastest Flash project up to date i wrote today an Flash SWF Export Script for Gimp.

You can export the hole image as an Flash SWF image or the layers of the GIMP image as an Flash SWF animation (not Flash video Flv). This script requires the package SWFTools.

How it work:
* Open your image in Gimp
* Goto "File > Flash SWF Export"
* Setup options, output directory and filename
* The GIMP background color is exported as the background color of the XHTML

Download
Download the FLash SWF Export script
and copy it to
/home/#YourProfileName/.gimp-2.6/plug-ins
Make sure the file is marked as executable.

Support for Gimp on Windows coming later.

CMYK Tiff 2 PDF for Gimp updateGimp Flash SWF Exporter Update

Comments

Unregistered user Sunday, March 22, 2009 4:43:57 PM

Anonymous writes: Can you please link to an example you have exported? This is really an awesome feature, but I don't really understand what it can do now. Thanks!

slackwrdave Sunday, March 22, 2009 5:04:34 PM

This looks good. I'm keeping an eye on it. Thanks!

Eckhard M. Jägerarea42 Sunday, March 22, 2009 6:22:44 PM

@ #1
At the moment the script do just convert an image into an SWF. This is sometimes useful for saving file size (instead of an PNG24) and getting alpha values too (when embedding Flash with wmode transparent).
The next version will include animation support (SWF and FLV) by using the image layers and generate an XHTML file too.

Unregistered user Thursday, March 26, 2009 12:35:53 AM

Yorik writes: wow! this is very cool. Animation support would be totally awesome... animated gif export is SO easy with the gimp that I almost like gif format again. imagine exporting to swf, with decent color support!

Unregistered user Thursday, March 26, 2009 1:47:05 AM

Bugsbane writes: Awesome! Recently I had to try and make a simple "fade from one photo to the next" banner in Linux. It was a dismal failure. The closest I could find was that you could make an image slideshow in OpenOffice.org 3.0, tell it to have transitions and export as an swf. Trouble was that the transitions didn't show in the swf. Anything that lets us do basic fading in an swf, and especially if it let us do basic movement/scaling animation would be AMAZING! Seriously though, even just the ability to adjust transparency and fade would kick ass.

Shaunak DeShaunak Thursday, March 26, 2009 2:09:35 AM

Looks great. Tracking this.

Eckhard M. Jägerarea42 Friday, March 27, 2009 11:01:52 AM

Animation-Support is nearly done, a new Version is coming soon smile

Unregistered user Saturday, March 28, 2009 1:08:05 AM

Anonymous writes: how do i add this plugin to my pc do i have to get a compiler or something like that

Eckhard M. Jägerarea42 Saturday, March 28, 2009 9:17:55 AM

It's a Python plugin, it mustn't be compiled. At the moment it still run on Linux. Nest time better read the article wink

Unregistered user Tuesday, March 31, 2009 10:18:35 AM

Anonymous writes: Any plan for vectorial support ?

Eckhard M. Jägerarea42 Tuesday, March 31, 2009 12:00:35 PM

As long as GIMP uses pathes only to generate selection it doesn't make sense support them.

Unregistered user Wednesday, April 1, 2009 9:26:10 AM

momo writes: thanks for your work ! i have a problem with the script Unknown option: -j destroy `/home/****/temp-gimp-swf-name.swf.png'

Eckhard M. Jägerarea42 Wednesday, April 1, 2009 4:46:46 PM

Hi Momo,
Thanks for your feedback. What kind of OS you are using? WHich version of SWFTools do you have installed?

-j stands for JPEG output:
http://www.swftools.org/png2swf.html

Eckhard M. Jägerarea42 Wednesday, April 1, 2009 4:46:47 PM

Hi Momo,
Thanks for your feedback. What kind of OS you are using? WHich version of SWFTools do you have installed?

-j stands for JPEG output:
http://www.swftools.org/png2swf.html

Unregistered user Wednesday, April 1, 2009 6:04:15 PM

momo writes: i'm on debian lenny gimp 2.6.6 swftools 0.8.1

Unregistered user Wednesday, April 1, 2009 6:25:54 PM

momo writes: it works without the -j parameter line 52 "png2swf -r %s -o %s -q %s -z -T %s -X %s -Y %s %s"

Eckhard M. Jägerarea42 Wednesday, April 1, 2009 6:31:06 PM

did it work using --jepg instead of -j ? Can you try that?

Thanks!

Unregistered user Wednesday, April 1, 2009 7:14:49 PM

momo writes: same error Unknown option: --jpeg but the -q parameter works

Unregistered user Wednesday, April 8, 2009 6:06:05 AM

Anonymous writes: This works a treat and I am still exploring just what I can do with it. You mentioned making FLV files, which I would like to do, but there is no sign of that option.

Unregistered user Wednesday, April 8, 2009 8:29:05 AM

Anonymous writes: Just read through the website again and note right at the top that you say it does not make FLV files - so that is the answer to that.

Unregistered user Sunday, April 19, 2009 5:32:39 AM

Anonymous writes: I'm having trouble with this script. Saving as an .swf doesn't produce a file at all, and saving as an XHTML file results only in the file showing a blank page with my background color from GIMP. Bringing the XHTML file up in a text editor, I can find no reference to my images at all. I'm using Ubuntu 8.10, SWFtools version 0.8.1-1ubuntu1, and GIMP 2.6.3 Any help or suggestions would be appreciated.

Eckhard M. Jägerarea42 Sunday, April 19, 2009 9:01:23 AM

Hi,

i'm using Ubuntu 8.04, SWFtools 0.9 and Gimp 2.6.6. May try start gimp from a shell a take a look after export on it if there a error message appear.

Unregistered user Sunday, April 19, 2009 8:50:33 PM

Anonymous writes: Thanks for the quick response! The error returned was the same "Unknown option -j" as listed above. I uninstalled the version of swftools that I got from the Ubuntu repository and downloaded 0.9 instead. Now it works! Thanks a lot!

Unregistered user Monday, April 27, 2009 2:53:53 PM

Anonimo writes: Hi, using the swf animation export, can I set a time between each slide? If so, how can do it? thx Luciano

Eckhard M. Jägerarea42 Tuesday, April 28, 2009 8:39:38 PM

Yes you can, setup the framerate (frames per secound).

Unregistered user Wednesday, April 29, 2009 9:24:17 AM

Anonimo writes: Already tried it at the minimum of 12 per secound, but the slideshow is too much fast. I need to reproduce 3 seconds between each slide... Thx in advance for any possible solution and for your great job. Luciano

Unregistered user Sunday, May 10, 2009 8:31:15 AM

Alessandro writes: hi! but does not work with Windows?

Unregistered user Tuesday, May 26, 2009 11:01:24 AM

Anonymous writes: I really hope it comes out for windows soon.

Unregistered user Wednesday, May 27, 2009 8:51:56 AM

ciprian writes: It-s not working... I can't find enywhere the putput name.swf... What is wrong? I don't have any errors!

Unregistered user Wednesday, May 27, 2009 8:53:29 AM

ciprian writes: I ment the output file

Unregistered user Thursday, May 28, 2009 2:36:49 PM

Anonymous writes: Windows version download, screenshot and more information at http://tw.myblog.yahoo.com/jw!5nbbef.RAx8aIbO00RkKIw--/article?mid=2241&prev=2252&next=2237 The first character of folder name and file name best use upper case add audio support it generate a temp script and use swfc to compile the script so you need to copy swfc.exe to \Program Files\Gimp-2.0\bin folder

Eckhard M. Jägerarea42 Saturday, May 30, 2009 7:27:42 PM

Sounds great, i will check it out, may we can create together one version running on Windows and Linux too.

Unregistered user Monday, June 8, 2009 7:55:23 PM

Anonymous writes: does it work with windows yet?

Eckhard M. Jägerarea42 Tuesday, June 9, 2009 7:53:19 AM

Have you read the post 2 posts above? It seems there is a Windows version.

Unregistered user Thursday, June 25, 2009 12:31:50 AM

Anonymous writes: to create a slide show you can go to Filters> animation> Blend it will create all frames to make a fading slide show. At 1024x768 with 4 layers and 24 frames of animation to blend swf export creates a 42mb swf file. On a core 2 duo this takes a while.

Unregistered user Tuesday, June 30, 2009 9:28:08 AM

arno writes: Please Help ... I can' find this script in gimp. Where I find it , when it is install?

Eckhard M. Jägerarea42 Friday, July 3, 2009 6:55:32 AM

@arno
- this script works for Linux only
- Make sure the file is marked as executable
- you will find it at: "File > Flash SWF Export"

Unregistered user Tuesday, July 28, 2009 11:36:10 AM

Anonymous writes: export to swf does not work only save as xhtml file! :(

Eckhard M. Jägerarea42 Tuesday, July 28, 2009 3:00:45 PM

I'm working on an update which will support transitions too.

Unregistered user Thursday, July 30, 2009 4:43:29 AM

Anonymous writes: I've checked the address for the Windows version provided above. What is exactly the link for the download of this version as the page is in Japanese and there are several links? Can you please provide the direct link to the file to download? Thanks.

Unregistered user Thursday, July 30, 2009 4:57:49 AM

Anonymous writes: There is no swfc.exe available for download at http://tw.myblog.yahoo.com/jw!5nbbef.RAx8aIbO00RkKIw--/article?mid=2241&prev=2252&next=2237 Where is it?

Unregistered user Thursday, July 30, 2009 4:59:46 AM

Anonymous writes: There is no swfc.exe (mentioned in a post above) file available at http://tw.myblog.yahoo.com/jw!5nbbef.RAx8aIbO00RkKIw--/article?mid=2241&prev=2252&next=2237 Where is it?

Eckhard M. Jägerarea42 Thursday, July 30, 2009 6:58:47 AM

Please spare me about Windows problems, better switch to Linux. I'm not the author of the Windows script. You may must download the SWFtools and install them first: http://www.swftools.org/

Unregistered user Thursday, July 30, 2009 9:24:00 AM

Anonymous writes: >Anonymous # 28. July 2009, 11:36 >Anonymous writes: > >export to swf does not work only save as xhtml file! :( > >area42 # 28. July 2009, 15:00 >I'm working on an update which will support transitions too. destop environment: kde 3.5 graphics application: gimp 2.6.6 dependencies: py26-gimp-app-2.6.6 python26-2.6.1_2 swftools-0.9.0 python-fu-flash-swf-export: 20090327 I tried to export my work in gimp to swf (default settings, single image) in my user home directory as name.swf but nothing is saved after pressing ok in so this part of the script does not work (image 200x200 rgb one layer). :( When i set "generate xhtml" to yes it does create a xhtml file so this part of the script is working. :) Other installed python scripts in gimp are working ok. :)

Unregistered user Sunday, August 2, 2009 5:45:52 AM

Anonymous writes: If you have problem with windows version You can post your problem here http://www.gimptalk.com/forum/flash-swf-export-python--t41499.html

Unregistered user Friday, August 21, 2009 3:13:26 PM

Anonymous writes: I'm using ubuntu jaunty 9.04. swftools from repository does not work - I loaded swftools-0.90 after loading libjpeg62-dev, libfreetype6-dev and zlib1g-dev from repositories for dependancies. It works now! However like another mentioned above the change between layers happens too fast. I need about 3 seconds between layers as well. How do I get this right?

Unregistered user Saturday, August 22, 2009 10:13:52 AM

Corbin writes: This is awesome, and exactly what I've been looking for. Thank you. Do have an issue though...it is playing backwards and looping. I want it to play only once and the opposite direction (do I just need to manually drag all the frames into the opposite order for this?)

JanGen Saturday, August 29, 2009 10:53:11 AM

SWFtools is great, extracting text or images from swf files. Adobe was bragging they gave only Google and Yahoo (not MS ) server driven power to index swf files, but I guess everybody can do it with SWF tools.bigsmile

This plugin gives a lot of power combined with the Gimp Gap package.
So mucho gracias, for this great plugin.

I agree with Anonymous (who does not wink )

I have the backwards issue as well, it's the wrong direction compared to an animated GIF.

I would like to have a option to loop or play once smile

# Version 20090327
swftools-0.90

Unregistered user Tuesday, October 27, 2009 4:50:52 PM

Anonymous MK writes: Can it be run on command line, i.e. as a standalone program so that one can run it via command line execution as a server side program Regards, MK

Eckhard M. Jägerarea42 Wednesday, October 28, 2009 7:09:35 PM

@MK

This script not but SWF tools can. Check out the code and rewrite as a shell or a pure python script.

Write a comment

New comments have been disabled for this post.