Hi,
I've rolled my own perl component for resizing pictures on the fly, but I
have a problem with actually outputting the resized image.
Here's my code:
Dim res
Response.Buffer = true
Set res = Server.CreateObject("ResCom.Resizer")
grr = res.ResizeFile("c:\inetpub\wwwroot\perl\test.jpg", 100)
Response.ContentType = "image/jpeg"
Response.BinaryWrite(grr)
Response.Flush
....and it appears as a broken image. If I download the web page it creates
with 'wget', it looks like BinaryWrite is padding every character from the
string with a hexadecimal 0 (unicode?), thereby doubling the output in size
and making it unusable. If I use Response.Write, it (naturally) doesn't work
either.
I've tried returning a VT_UI1, VT_BSTR or VT_ARRAY from the component, and
it doesn't make any difference.
Any recommendations?
Thanks,
Gunther