# Inserting PNG into SWF or PNG conversion to SWF

**URL:** <https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423>\
**Category:** programming\
**Created:** [August 27, 2004, 5:40pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423 "2004-08-27T17:40:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![karmakat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/karmakat/32/476_2.png) [@karmakat](https://forum.kirupa.com/u/karmakat)\
**Post date:** [August 27, 2004, 5:40pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/1 "2004-08-27T17:40:24Z")

</div>

Hi all…

I want to hear peoples opinions and experience with Inserting a PNG into SWF or PNG conversion to SWF

There seems to be some major disparities on what people think about the methodology and even possibility of this on a unix system, serverside.

I have put many many hours googling this, and have found much conflicting info… I am still not convinced this is impossible…

Ming somehow requires you to convert pngs to the dbl format before it can do a server side conversion…  
Except… there are no server side functions to do this!!

Flash can’t dynamically load pngs… what a stupid omission…

I have seen this (png inserted into swf) being done, however…

on[http://charas-project.net](http://charas-project.net)

after you create your character, you can view a flash preview…

this is where they do it… i think… i have asked them on their forums… but no answer as of yet…  
great site btw…

Look forward to hearing your guys responses!

- Aleks AKA KarmaKat

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 5:46pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/2 "2004-08-27T17:46:12Z")

</div>

What about using a tool like this to convert the PNG files to SWF files???

[http://www.quiss.org/swftools/png2swf.html](http://www.quiss.org/swftools/png2swf.html)  
[http://www.active-web.cc/html/png2swf/](http://www.active-web.cc/html/png2swf/)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 6:12pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/3 "2004-08-27T18:12:41Z")

</div>

> [@CyanBlue](#):
>
> What about using a tool like this to convert the PNG files to SWF files???
> 
> [http://www.quiss.org/swftools/png2swf.html](http://www.quiss.org/swftools/png2swf.html)  
> [http://www.active-web.cc/html/png2swf/](http://www.active-web.cc/html/png2swf/)

I need this to work **serverside**. The volume of pngs that need to be converted, and the need for the immediate presence of those files neccessitates this.

I am definitely aware of the various tools available for a non-unix system, including those for [ASP.NET](http://ASP.NET) etc.

here are some links i have been researching…

[http://www.flashmove.com/forum/showthread.php?threadid=15021](http://www.flashmove.com/forum/showthread.php?threadid=15021)  
[http://www.php.net/manual/en/function.swfbitmap.php](http://www.php.net/manual/en/function.swfbitmap.php)  
[http://www.qlod.com/experimentos/dbl2swf.php.txt](http://www.qlod.com/experimentos/dbl2swf.php.txt)  
[http://forums.devshed.com/archive/t-153904](http://forums.devshed.com/archive/t-153904)  
[http://www.tek-tips.com/viewthread.cfm?qid=879626](http://www.tek-tips.com/viewthread.cfm?qid=879626)

hmm…

maybe this one:  
[http://blue-pac.com/products/phpturbine/default.htm](http://blue-pac.com/products/phpturbine/default.htm)

theres lots more out there… including a great strain at [chattyfig.figleaf.com](http://chattyfig.figleaf.com)

(except they r down right now i think… the flash coding wiki at least…)

I know this can be done…

If i can’t figure this out… i have to switch to director… and learn it… and lingo… and much more…

plus resources for director SUCK, especially for game design… believe it or not…

I need a good site for shockwave game design resources if you got that laying around…  
Hours of googling didn’t add up to much… and I am an _expert_ googler…

-aleks AKA Karmakat

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 6:23pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/4 "2004-08-27T18:23:33Z")

</div>

That’s nice list of the possible solutions… Thanks for sharing it… 🙂

The only problem I have is that I do not know what you are looking for… It sounds like you can just pick up any of those and have them running to convert the PNG files to SWF files… I guess I am abit confused… ☹

> the flash coding wiki at least

Yup… Wiki is down for some reason… (Somebody at the FlashCoders said that it was because wiki was abused or something…)

> If i can’t figure this out…

Yeah, I want to hear more about what you are trying to do… 🙂

> plus resources for director SUCK, especially for game design… believe it or not…

Um… It sucks in what way??? There was good amount of information available out there and I didn’t have problem getting what I needed… At least that’s how it used to be… 🙂  
But then, I pretty much abandoned Director several years ago, so I might be nobody to talk about the Director… Dang… ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 7:02pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/5 "2004-08-27T19:02:59Z")

</div>

Um… you could use the ming library. ([http://php.net/ming](http://php.net/ming))

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 7:33pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/6 "2004-08-27T19:33:13Z")

</div>

> [@njs12345](#):
>
> Um… you could use the ming library. ([PHP: Manual Quick Reference](http://php.net/ming))

nope… i wish it was that simple…

as i said… in order to ‘convert’ pngs to swf ‘on the fly’ serverside, ming requires that pngs are first converted to dbl… then u use dbl2swf  
except that there is no serverside png2swf. it is an exe.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 7:37pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/7 "2004-08-27T19:37:16Z")

</div>

Uh… Sorry, but I still am not getting it right…

This one… PNG2SWF v1.1 from the [http://www.active-web.cc/html/png2swf/](http://www.active-web.cc/html/png2swf/)

> png2swf is a client- or server-side component for converting PNG images (including transparent PNGs) to Flash SWF 5 and higher.

Wouldn’t this solve the problem??? ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 7:58pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/8 "2004-08-27T19:58:26Z")

</div>

> [@CyanBlue](#):
>
> That’s nice list of the possible solutions… Thanks for sharing it… 🙂

My pleasure!

> [@CyanBlue](#):
>
> The only problem I have is that I do not know what you are looking for… It sounds like you can just pick up any of those and have them running to convert the PNG files to SWF files… I guess I am abit confused… ☹

I am looking for ANY serverside solution that will run in an unix environment that will allow me to convert pngs to swf files on the fly.

the possible methods:

1. A serverside solution that converts png to dbl… then i can use ming for the rest using dbl2swf.

2. Somehow insert the png into a swf using some type of clever php file such as the example i mentioned before at [http://charas-project.net/charas/index.php](http://charas-project.net/charas/index.php) …\>\>\> make a character if you want … \>\> click Flash Preview…

it then opens up a window…

```auto
javascript:popflash('res_flash_view.php?scale=6&body=C-Devil_body.png&cat_body=base_chara/chara-medi/Corpi&face=vuoto.png&cat_face=base_chara/chara-medi/Facce&dress=vuoto.png&cat_dress=base_chara/chara-medi/Vestiti&hair=vuoto.png&cat_hair=base_chara/chara-medi/Capelli&item=vuoto.png&cat_item=base_chara/chara-medi/Accessori&item2=vuoto.png&cat_item2=base_chara/chara-medi/Accessori&item3=vuoto.png&cat_item3=base_chara/chara-medi/Accessori&tr_body=100&');

```

the source reads:

```auto
<html><head>
<title>Charas generated Flash</title>
</head>
<body bgcolor='black'>
<center>
<embed src='res_viewer_flash.php?scale=6&body=C-Devil_body.png&cat_body=base_chara/chara-medi/Corpi&face=vuoto.png&cat_face=base_chara/chara-medi/Facce&dress=vuoto.png&cat_dress=base_chara/chara-medi/Vestiti&hair=vuoto.png&cat_hair=base_chara/chara-medi/Capelli&item=vuoto.png&cat_item=base_chara/chara-medi/Accessori&item2=vuoto.png&cat_item2=base_chara/chara-medi/Accessori&item3=vuoto.png&cat_item3=base_chara/chara-medi/Accessori&tr_body=100&' quality=high loop=true type='application/x-shockwave-flash' width=72 height=128></embed>
<br>
<a href='javascript:window.close()' style='color:white'><b>Close this window</b></a>
</center>
</body>
</html>

```

so res\_flash\_view.php sends the info to res\_viewer\_flash.php which i can’t view… i get an error in php and nothing else when i try to access this file directly from my browser and view the source… the source is the error itself…

I am pretty sure they are inserting pngs live into a swf…

and …

1. use some other serverside app or something such php flash turbine… which i haven’t totally looked into yet… to convert the pngs to swf

> Um… It sucks in what way??? There was good amount of information available out there and I didn’t have problem getting what I needed… At least that’s how it used to be… 🙂  
> But then, I pretty much abandoned Director several years ago, so I might be nobody to talk about the Director… Dang… ☹

yeah i guess it may be different now that “flash is catching up to it’s big brother” as i heard one forum poster say…  
but i guess i am used to the immense amount of online resources for game design and other stuff for flash… in comparison i can find considerably less such material for director…

what i am actually working on is something of a extensible online rpg type game… wherein users may draw pixel art graphics online and actually use them to create their own spaces using online utilities such as map editors…  
jpeg compression seriously damages pixel art integrity, and gifs (also not dynamically loadable in flash) only have 256 colours…

i thought this was possible using flash… but i guess the standard for media-rich online apps/games is director… but i don’t know director or lingo…  
I know maybe just enough of flash to work on this…

I guess it makes sense to switch this project over to director… but it would be nice to at least figure this out… loading pngs dynamically into flash (using flash remoting to browse the actual directories, then load the swfs (that once were pngs) into the movie…

could prove to be VERY useful to use Flashers…

However… I get this feeling that this ‘problem’ is part of macromedias methodology to keep director and flash and their functionalities seperate to justify the product slice…

pricetag flash mx 2004: hovering around $300 US  
pricetag director mx 2004: hovering around $1000 US

Ok … enuf of my conspiracy rants…

haha

ok off to check out php flash turbine…

-aleks AKA karmakat

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 8:11pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/9 "2004-08-27T20:11:09Z")

</div>

> [@CyanBlue](#):
>
> Uh… Sorry, but I still am not getting it right…
> 
> This one… PNG2SWF v1.1 from the [http://www.active-web.cc/html/png2swf/](http://www.active-web.cc/html/png2swf/)
> 
> Wouldn’t this solve the problem??? ☹

if you run .NET … yeah…

but my host does not…

i need a unix solution … using php or something …

besides… the majority of users don’t run [asp.net](http://asp.net) server architechture unless they are the hosting themselves…

right??

personally as mostly a designer with side-dish of developer… i hate asp

at any rate… gotta clean my apartment now!!!  
-aleks AKA KarmaKat

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 6:54pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/10 "2004-08-30T18:54:00Z")

</div>

I started this same thread at [actionscript.org](http://actionscript.org)

someone posted a link to a purported png2swf serverside utility…  
for linux…  
i think…

but i am utterly confused on how to install/use it…

take a look:

[http://www.actionscript.org/forums/showthread.php3?t=53680](http://www.actionscript.org/forums/showthread.php3?t=53680)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 12:29pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/11 "2004-09-01T12:29:46Z")

</div>

If you grab the latest CVS version of Ming, and edit the configuration/make files, it will support server-side conversion of PNG to SWF without previous conversions as in the past. I just tested and it works both on UNIX and Windows platforms.

Ming0.3

BTW- It even supports non-animated GIF conversions, but animated gifs will give you very strange results.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2004, 4:39pm UTC](https://forum.kirupa.com/t/inserting-png-into-swf-or-png-conversion-to-swf/62423/12 "2004-09-02T16:39:17Z")

</div>

Thanks Jerry!  
U ARE awesome!!!

-aleks AKA KarmaKat
