ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Document Assembly / GrapeCity.ActiveReports.Document.Section Namespace / PngImage Class / CreateRead Method
Reader containing the binary data of PngImage.
The type of data in the stream.
The page.
Service that converts image data from one format to another.
Example

In This Topic
    CreateRead Method (PngImage)
    In This Topic
    Return an instance of the PngImage received from a System.IO.BinaryReader.
    Syntax
    'Declaration
     
    Public Shared Function CreateRead( _
       ByVal reader As BinaryReader, _
       ByVal fileVersion As Short, _
       ByVal pageObj As Page, _
       ByVal imageConverterService As IImageConverterService _
    ) As PngImage
    public static PngImage CreateRead( 
       BinaryReader reader,
       short fileVersion,
       Page pageObj,
       IImageConverterService imageConverterService
    )

    Parameters

    reader
    Reader containing the binary data of PngImage.
    fileVersion
    The type of data in the stream.
    pageObj
    The page.
    imageConverterService
    Service that converts image data from one format to another.

    Return Value

    A new PngImage instance.
    Example
    private void AddImageToPage(Page page, string filename)
    	{
    		var fileStream = new FileStream(filename, FileMode.Open);
    		var binaryReader = new BinaryReader(fileStream);
    		var reuslt = PngImage.CreateRead(binaryReader, Globals.DocumentVersion, page, new GcImageConverterService(CustomFontResolver.Instance));
    }
    See Also