Skip navigation.

Log in | Sign up

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.

^Gimp Flash SWF Exporter Update

Comments

Anonymous 22. March 2009, 16:43

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 22. March 2009, 17:04

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

Eckhard M. Jäger 22. March 2009, 18:22

@ #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.

Anonymous 26. March 2009, 00:35

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!

Anonymous 26. March 2009, 01:47

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 De 26. March 2009, 02:09

Looks great. Tracking this.

Eckhard M. Jäger 27. March 2009, 11:01

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

Anonymous 28. March 2009, 01:08

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äger 28. March 2009, 09:17

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:

Anonymous 31. March 2009, 10:18

Anonymous writes:

Any plan for vectorial support ?

Eckhard M. Jäger 31. March 2009, 12:00

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

Anonymous 1. April 2009, 09:26

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äger 1. April 2009, 16:46

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äger 1. April 2009, 16:46

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

Anonymous 1. April 2009, 18:04

momo writes:

i'm on debian lenny
gimp 2.6.6
swftools 0.8.1

Anonymous 1. April 2009, 18:25

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äger 1. April 2009, 18:31

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

Thanks!

Anonymous 1. April 2009, 19:14

momo writes:

same error

Unknown option: --jpeg

but the -q parameter works

Anonymous 8. April 2009, 06:06

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.

Anonymous 8. April 2009, 08:29

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.

Anonymous 19. April 2009, 05:32

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äger 19. April 2009, 09:01

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.

Anonymous 19. April 2009, 20:50

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!

Anonymous 27. April 2009, 14:53

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äger 28. April 2009, 20:39

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

Anonymous 29. April 2009, 09:24

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

Anonymous 10. May 2009, 08:31

Alessandro writes:

hi!
but does not work with Windows?

Anonymous 26. May 2009, 11:01

Anonymous writes:

I really hope it comes out for windows soon.

Anonymous 27. May 2009, 08:51

ciprian writes:

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

Anonymous 27. May 2009, 08:53

ciprian writes:

I ment the output file

Anonymous 28. May 2009, 14:36

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äger 30. May 2009, 19:27

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

Anonymous 8. June 2009, 19:55

Anonymous writes:

does it work with windows yet?

Eckhard M. Jäger 9. June 2009, 07:53

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

Anonymous 25. June 2009, 00:31

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.

Anonymous 30. June 2009, 09:28

arno writes:

Please Help ...

I can' find this script in gimp. Where I find it , when it is install?

Eckhard M. Jäger 3. July 2009, 06:55

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

Anonymous 28. July 2009, 11:36

Anonymous writes:

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

Eckhard M. Jäger 28. July 2009, 15:00

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

Anonymous 30. July 2009, 04:43

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.

Anonymous 30. July 2009, 04:57

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?

Anonymous 30. July 2009, 04:59

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äger 30. July 2009, 06:58

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/

Anonymous 30. July 2009, 09:24

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. :)

Anonymous 2. August 2009, 05:45

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

Anonymous 21. August 2009, 15:13

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?

Anonymous 22. August 2009, 10:13

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 29. August 2009, 10:53

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.:D

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

Anonymous 27. October 2009, 16:50

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äger 28. October 2009, 19:09

@MK

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

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies