Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / CreateGdPictureImageFromStream Method / CreateGdPictureImageFromStream(Stream,DocumentFormat,Boolean) Method
System.IO.Stream object storing the image data.
A member of the DocumentFormat enumeration specifying the input image format.
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.





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

    Parameters

    Stream
    System.IO.Stream object storing the image data.
    ImageFormat
    A member of the DocumentFormat enumeration specifying the input image format.
    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.

    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

    The provided stream must support seeking.

    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. If the image is a multipage file (TIFF, JBIG2, GIFF), the stream should be kept open until the image is released.

    See Also