Пример #1
0
        public override ImageMetaData ReadMetaData(IBinaryStream file)
        {
            file.Position = 8;
            var info = new DpngMetaData {
                BPP = 32
            };

            info.TileCount = file.ReadInt32();
            if (info.TileCount <= 0)
            {
                return(null);
            }
            info.Width  = file.ReadUInt32();
            info.Height = file.ReadUInt32();
            return(info);
        }
Пример #2
0
 public override ImageMetaData ReadMetaData(Stream stream)
 {
     stream.Position = 8;
     using (var header = new ArcView.Reader(stream))
     {
         var info = new DpngMetaData {
             BPP = 32
         };
         info.TileCount = header.ReadInt32();
         if (info.TileCount <= 0)
         {
             return(null);
         }
         info.Width  = header.ReadUInt32();
         info.Height = header.ReadUInt32();
         return(info);
     }
 }