Beispiel #1
0
        private void Handle_IDAT(PNGChunk chunk)
        {
            IDATChunk idatC = new IDATChunk();

            idatC.ChunkData = chunk.ChunkData;
            IDATList.Add(idatC);
        }
Beispiel #2
0
 public void AddChunk(IDATChunk i)
 {
     if (IFrame)
     {
         idats.Add(i);
     }
     else
     {
         throw new ApplicationException("Cannot add IDAT chunk to fdAT frame");
     }
 }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
            }
        }