Does anybody have example asp code for streaming converted image straight to the browser without creating a second file.
Thanks
Stream image straight to browser
Re: Stream image straight to browser
Hmmm...great product shite community support.
I've found out it's done. If anybody is interested let me know.
I've found out it's done. If anybody is interested let me know.
Re: Stream image straight to browser
<%
response.contenttype = "image/JPEG"
fileName = request.queryString("fileName")
size = request.queryString("size")
extent = request.queryString("extent")
Set img = Server.CreateObject("ImageMagickObject.MagickImage.1")
dim image2(2)
image2(0)="JPEG:"
msg = img.convert("-trim","-resize",size,"-extent",extent,"-gravity","center","d:\productImages\"+fileName, image2)
response.expires = 0
response.buffer = true
response.binarywrite(image2)
response.end()
set img = nothing
%>
response.contenttype = "image/JPEG"
fileName = request.queryString("fileName")
size = request.queryString("size")
extent = request.queryString("extent")
Set img = Server.CreateObject("ImageMagickObject.MagickImage.1")
dim image2(2)
image2(0)="JPEG:"
msg = img.convert("-trim","-resize",size,"-extent",extent,"-gravity","center","d:\productImages\"+fileName, image2)
response.expires = 0
response.buffer = true
response.binarywrite(image2)
response.end()
set img = nothing
%>