private void Handle_IDAT(PNGChunk chunk) { IDATChunk idatC = new IDATChunk(); idatC.ChunkData = chunk.ChunkData; IDATList.Add(idatC); }
public void AddChunk(IDATChunk i) { if (IFrame) { idats.Add(i); } else { throw new ApplicationException("Cannot add IDAT chunk to fdAT frame"); } }
protected void WriteImageData(Stream s, IList <byte> imageData, uint width, uint height) { WriteSignature(s); IHDRChunk tIHDR = new IHDRChunk(); tIHDR.ChunkData = IHDR.ChunkData; tIHDR.Width = width; tIHDR.Height = height; WriteChunk(s, tIHDR); WriteAncillaryChunks(s); IDATChunk id = new IDATChunk(); id.ChunkData = imageData.ToArray(); WriteChunk(s, id); WriteChunk(s, IEND); }
private void Handle_IDAT(PNGChunk chunk) { IDATChunk idatC = new IDATChunk(); idatC.ChunkData = chunk.ChunkData; IDATList.Add(idatC); if (frames.Count > 1) { throw new ApplicationException("IDAT chunk encountered out of order"); } else if (frames.Count == 1) { Frame f = frames.First(); f.AddChunk(idatC); } }