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

End() public method

Finalizes the image creation and closes the file stream.
This MUST be called after writing the lines.
public End ( ) : void
return void
        public void End()
        {
            if (rowNum != ImgInfo.Rows - 1)
                throw new PngjOutputException("all rows have not been written");
            try {
                datStreamDeflated.Dispose();
                datStream.Dispose();
                WriteLastChunks();
                WriteEndChunk();
                if (this.ShouldCloseStream)
                    outputStream.Dispose();
            } catch (IOException e) {
                throw new PngjOutputException(e);
            }
        }

Usage Example

Example #1
0
 public static void endFileTmp(PngWriter png)
 {
     ImageLine imline = new ImageLine(png.ImgInfo);
     for (int i = 0; i < png.ImgInfo.Rows; i++)
         png.WriteRow(imline, i);
     png.End();
 }
All Usage Examples Of Hjg.Pngcs.PngWriter::End