Hjg.Pngcs.PngWriter.PngWriter C# (CSharp) Method

PngWriter() public method

Constructs a PngWriter from a outputStream, with optional filename or description
After construction nothing is writen yet. You still can set some parameters (compression, filters) and queue chunks before start writing the pixels. See also FileHelper.createPngWriter()
public PngWriter ( Stream outputStream, Hjg.Pngcs.ImageInfo imgInfo, String filename ) : System
outputStream Stream Opened stream for binary writing
imgInfo Hjg.Pngcs.ImageInfo Basic image parameters
filename String Optional, can be the filename or a description.
return System
        public PngWriter(Stream outputStream, ImageInfo imgInfo,
                String filename)
        {
            this.filename = (filename == null) ? "" : filename;
            this.outputStream = outputStream;
            this.ImgInfo = imgInfo;
            // defaults settings
            this.CompLevel = 6;
            this.ShouldCloseStream = true;
            this.IdatMaxSize = 0; // use default
            this.CompressionStrategy = EDeflateCompressStrategy.Filtered;
            // prealloc
            //scanline = new int[imgInfo.SamplesPerRowPacked];
            rowb = new byte[imgInfo.BytesPerRow + 1];
            rowbprev = new byte[rowb.Length];
            rowbfilter = new byte[rowb.Length];
            chunksList = new ChunksListForWrite(ImgInfo);
            metadata = new PngMetadata(chunksList);
            filterStrat = new FilterWriteStrategy(ImgInfo, FilterType.FILTER_DEFAULT);
            unpackedMode = false;
            needsPack = unpackedMode && imgInfo.Packed;
        }

Same methods

PngWriter::PngWriter ( Stream outputStream, Hjg.Pngcs.ImageInfo imgInfo ) : System