Nice, thanks....exactly what I was looking for.
> Yes that's what I found too when using an API that returned images
> that did not have an 'image' url. Appending a .jpg or similar did not
> help either.
>
> In the end I did something like this (I knew that gifs were
> returned):
>
> <cfhttp
> url="#image.src#"
> resolveurl="No" >
> </cfhttp>
>
> <cfset resImg = cfhttp.fileContent.toByteArray() />
>
> <cfset imagename = CreateUUID()>
> <cfimage
> action = "write"
> destination = "#THISFOLDER#/#imagename#.gif"
> source = "#resImg#"
> overwrite="true">
>
> Cheers
>
> Stefan
>
>
>
>
>
> On 9 Feb 2011, at 19:26, Dan G. Switzer, II wrote:
>
> >
> > JD,
> >
> > In my experience, the image functions generally want an extension
> for the
> > input so the image libraries know how to handle the image. Since the
> URL
> > doesn't have a ".png" in the filename, I think that's the problem.
> >
> > You may need to use CFHTTP to save the image as a PNG on a
> filesystem and
> > then read the image off disk.
> >
> > -Dan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:342069
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm