Ejemplo n.º 1
0
 public PngChunk(int length, PngChunkType type, IManagedByteBuffer data = null, uint crc = 0)
 {
     this.Length = length;
     this.Type   = type;
     this.Data   = data;
     this.Crc    = crc;
 }
        public PngChunkHeader(uint length, PngChunkType type)
        {
            if (length > int.MaxValue)
            {
                throw new ArgumentOutOfRangeException(nameof(length));
            }

            Length = (int)length;
            Type   = type;
        }
        public void ConstructorValidBytes()
        {
            var validStrings = new[] { "ABCD", "abcd", "wxyz", "WXYZ", "lkjh", "LKJH" };

            foreach (var validString in validStrings)
            {
                // ReSharper disable once ObjectCreationAsStatement
                _ = new PngChunkType(validString);
            }
        }
 public PngChunkHeader(int length, PngChunkType type) : this((uint)length, type)
 {
 }
Ejemplo n.º 5
0
 public PngChunk(PngChunkType chunkType, byte[] bytes)
 {
     ChunkType = chunkType;
     Bytes     = bytes;
 }
Ejemplo n.º 6
0
 public PngChunk(int length, PngChunkType type, IManagedByteBuffer data = null)
 {
     this.Length = length;
     this.Type   = type;
     this.Data   = data;
 }
Ejemplo n.º 7
0
 public PngDirectory([NotNull] PngChunkType pngChunkType)
 {
     _pngChunkType = pngChunkType;
     this.SetDescriptor(new PngDescriptor(this));
 }
Ejemplo n.º 8
0
 public PngChunk(int length, PngChunkType type, IMemoryOwner <byte> data = null)
 {
     this.Length = length;
     this.Type   = type;
     this.Data   = data;
 }