GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / CreateGdPictureImageFromIStream Method / CreateGdPictureImageFromIStream(IStream,Boolean,DocumentFormat) Method
An IStream object storing the image data.
When True, only image properties, metadata and embedded thumbnail will be loaded. This parameter is particularly useful to obtain image information's without decoding it. Be careful not to call subsequent methods that need to access pixel data if this parameter is set to True.
A member of the DocumentFormat enumeration specifying the input image format.





In This Topic
CreateGdPictureImageFromIStream(IStream,Boolean,DocumentFormat) Method
In This Topic
Creates a new GdPicture image from an image stored into an IStream Object.
Syntax
'Declaration
 
Public Overloads Function CreateGdPictureImageFromIStream( _
   ByVal Stream As IStream, _
   ByVal DirectAccess As Boolean, _
   ByVal ImageFormat As DocumentFormat _
) As Integer
public int CreateGdPictureImageFromIStream( 
   IStream Stream,
   bool DirectAccess,
   DocumentFormat ImageFormat
)
public function CreateGdPictureImageFromIStream( 
    Stream: IStream;
    DirectAccess: Boolean;
    ImageFormat: DocumentFormat
): Integer; 
public function CreateGdPictureImageFromIStream( 
   Stream : IStream,
   DirectAccess : boolean,
   ImageFormat : DocumentFormat
) : int;
public: int CreateGdPictureImageFromIStream( 
   IStream* Stream,
   bool DirectAccess,
   DocumentFormat ImageFormat
) 
public:
int CreateGdPictureImageFromIStream( 
   IStream^ Stream,
   bool DirectAccess,
   DocumentFormat ImageFormat
) 

Parameters

Stream
An IStream object storing the image data.
DirectAccess
When True, only image properties, metadata and embedded thumbnail will be loaded. This parameter is particularly useful to obtain image information's without decoding it. Be careful not to call subsequent methods that need to access pixel data if this parameter is set to True.
ImageFormat
A member of the DocumentFormat enumeration specifying the input image format.

Return Value

0: The image could not be created. Use the GetStat() method to determine the reason this method failed. Non-zero: GdPicture image identifier. The created image. The ReleaseGdPictureImage() method must be subsequently used to release the image from the memory.
Remarks

Supported formats are listed here: http://www.gdpicture.com/solutions/supported-formats/.

Notes for multipage images (TIFF and GIF): By default, the class loads multipage images (GIF and TIFF) in read & write mode. To open multipage images in read-only mode call the TiffOpenMultiPageForWrite() method specifying False for tiff images or the GifOpenMultiFrameForWrite() method for gif images.

This method requires the Image Documents component to run.

See Also