Still not sure why CF complained, but I am having more luck using this:

    
    <cfhttp
        
url="http://www4d.wolframalpha.com/Calculate/MSP/MSP79419e1a6ei6h30076g00003170cdffcai81067?MSPStoreType=image/gif&s=55";
        resolveurl="No" >
    </cfhttp>
    
    <cfset resImg = cfhttp.fileContent.toByteArray() />
    <cfimage
        action = "write"
        destination = "#THISFOLDER#/#imagename#.gif"
        source = "#resImg#"
        overwrite="true">  


Cheers 

Stefan





On 15 Jan 2011, at 19:10, Stefan Richter wrote:

> Hi all,
> I'm trying to fetch images from the Wolfram Alpha API. The source for each 
> image is specified in a format such as this:
> http://www4d.wolframalpha.com/Calculate/MSP/MSP79419e1a6ei6h30076g00003170cdffcai81067?MSPStoreType=image/gif&s=55
> (note this may have expired now)
> 
> When I check the HTTP response I see that the content-type is correctly 
> specified as image/gif and in the browser the URL results in an image being 
> displayed as expected.
> 
> However when I try the following
> 
> <cfimage
>       action = "write"
>       destination = "#thisFolder#"
>       source = 
> "http://www4d.wolframalpha.com/Calculate/MSP/MSP79419e1a6ei6h30076g00003170cdffcai81067?MSPStoreType=image/gif&s=55";
>   >
> 
> I get an error:
> 
> "The /calculate/msp/msp79419e1a6ei6h30076g00003170cdffcai81067 image format 
> is not supported on this operating system."
> 
> I also tried using ImageNew but got the same error.
> 
> I'm not sure what to make of this. Does CF expect the URL to end in .gif or 
> why is it complaining? Are there any easy fixes for this or what other ways 
> are there for me to retrieve the image and store it on my server?
> 
> Thanks for any tips.
> 
> Stefan



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340923
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to