views:

30

answers:

1

We are attempting to convert a flash frame into a JPEG without using the Flex SDK or other adobe tools. Right now, we have a flash file that passes binary data over to a .cfm page, which uses the following code to change the headers:

<cfset var = GetHttpRequestData()>

<cfcontent type="image/jpeg">
<cfheader name="Content-Disposition" value="attachment; filename=#url.name#">
<cfoutput>#var.content#</cfoutput>

This code is producing some strange results. Basically, it renders as an image, and I can "right click -> Set as desktop background", but I cannot save the image any other way, as it simply saves the contents of the HTML Source. So, questions:

1) Is what I'm trying to do even possible? 2) If so, any suggestions?

Thanks guys.

+2  A: 

I'm going to answer my own question, thanks to tj_d_ and ejholmgren_ of the DALNet coldfusion channel:

<cfset var = GetHttpRequestData() />

<cfimage action="writetobrowser" source="#var.content#" format="png">

done and done.

dhorn
Wow, this is neat.
Jas Panesar