hi!

this is what i use to send a .gif from delphi>browser (after doing
image.SaveToStream):

function StreamToVariant(const aStream:TStream):Variant;
var
 Buffer:Pointer;
 Size:integer;
begin
 Result := null;
 Assert(aStream<>nil);
 Assert(aStream.Position=0);
 Size:=aStream.Size;
 Result:=VarArrayCreate([0, Size-1], varByte);
 try
  Buffer:=VarArrayLock(Result);
  aStream.ReadBuffer(Buffer^, Size);
 finally
  VarArrayUnLock(Result);
 end;
end;

you'll also need to do this in the asp that reurns the image/whatever.

Response.Buffer = TRUE
Response.Clear
Response.ContentType = "image/gif"
Response.BinaryWrite vntGraph
Response.End

Cya

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to