Using _Stream in Delphi

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
BennyCUAG
Posts: 6
Joined: Wed Mar 07, 2012 6:45 pm

Using _Stream in Delphi

Post by BennyCUAG » Wed Mar 07, 2012 7:05 pm

Hello,
we have problems using "stream methods" like GdPictureImaging.SaveAsStream
In Delphi the signature looks like this:

Code: Select all

 function SaveAsStream(ImageID: Integer; const Stream: _Stream; ImageFormat: DocumentFormat;  EncoderParameter: Integer): GdPictureStatus; safecall;
_Stream is defined in mscorlib, but CoStream.Create creates an error (class not registered).
Does anybody know how to use or create a "_Stream" object in Delphi?

For images (GdPictureImaging) there is a SaveAsString method instead, why there is no SaveAsSting in GdPicturePDF (and LoadFromString)?

Thanks!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Using _Stream in Delphi

Post by Loïc » Wed Mar 07, 2012 7:51 pm

Hello,

You can not use method having managed Stream object as parameter from Delphi. You need an IStream parameter.

In the next release we will add a SaveAsIStream method that you will be able to call by using a TStreamAdapter wrapper.

I will post a snippet as soon the solution will be implemented.

Kind regards,

Loïc

BennyCUAG
Posts: 6
Joined: Wed Mar 07, 2012 6:45 pm

Re: Using _Stream in Delphi

Post by BennyCUAG » Tue Jul 03, 2012 11:30 am

Hello,
is there an new SaveAsIStream Method in Version 9?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Using _Stream in Delphi

Post by Loïc » Tue Jul 03, 2012 7:53 pm

Yes!

BennyCUAG
Posts: 6
Joined: Wed Mar 07, 2012 6:45 pm

Re: Using _Stream in Delphi

Post by BennyCUAG » Tue Feb 05, 2013 5:38 pm

Unfortunately there is no chance to get a (OCR) PDF (from a picture) as a Stream, isn´t it?
The GdPictureImaging.SaveAsPDF Methods have only _Stream parameters.. :|

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Using _Stream in Delphi

Post by Loïc » Wed Feb 06, 2013 4:34 pm

Hello,

the next release will include an overload of this method that takes an IStream object as parameter.

kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest