Click to See Complete Forum and Search --> : JPG to SWF converter via Cold Fusion

07-17-2000, 06:44 PM
Hi All,

I'd like to build a Cold Fusion Application (or ASP for that matter) that would convert JPG's to SWF files. Has anyone built something similar? My thinking was to use <CFFILE> to open and read the jpg binary data to a var and wrap it the additional header and object information before using <CFContent> to output it as a swf format.

I originally thought of using a basic swf and replacing the jpg data portion.

I'm not interested in using a generator like product for the task, my requirement is to simply convert jpgs to single frame swf movies.

Anyone have any thoughts on how this could be done would be appreciated!


07-18-2000, 12:36 PM
I don't see any reason for doing that...it is quite pointless to convert a JPEG to a one frame flash movie.

I would write an IISAPI server extension DLL with the SDK and access with your ASP it to build the SWF.


07-19-2000, 05:36 AM

In *your* opinion, of course. So, what do you propose sites like moveon (http://www.moveon.co.uk) and Moonfruit (http://www.moonfruit.com) do in order to display user-uploaded images? "Show them in a new HTML window"? Idiot.

As any fule kno, flash can't load in jpg files while running. It can, however, load in swfs. Hence the need for a converter.

As a reply to the original poster, you will need to parse the jpg to get the pixel sizes as well - the "wrapper" you put around the jpg needs to know how to show it (movie size, scale matrix, shape record etc). The conversion isn't that hard, but more complicated than you think.

Also be aware that photoshop jpgs are non-standard (mime type image/pjpeg or something), and won't convert in the same way - you should either convert them to standard jfif format first or do all sorts of weird stuff with the file.

The basic answer is "it's not easy" - it'll take you a good few days' worth of coding and there aren't any freely available programs to do it. One day I'll clean up my perl converter and release it tho :-)

07-19-2000, 07:06 PM
yeah I reckon a convertor would be very handy when loading movies and an ASP or PHP module for this would be cool.