示例#1
0
        }                                                                   // '256G'

        public override ImageMetaData ReadMetaData(IBinaryStream file)
        {
            file.Position = 4;
            var info = new GgdMetaData {
                BPP = 8
            };

            info.HeaderSize = file.ReadUInt32();
            info.Width      = file.ReadUInt32();
            int height = file.ReadInt32();

            if (height < 0)
            {
                height       = -height;
                info.Flipped = true;
            }
            info.Height = (uint)height;
            file.ReadInt64();
            info.BitmapSize = file.ReadUInt32();
            return(info);
        }
示例#2
0
        }                                                                   // '256G'

        public override ImageMetaData ReadMetaData(Stream stream)
        {
            using (var input = new ArcView.Reader(stream))
            {
                input.ReadUInt32();
                var info = new GgdMetaData {
                    BPP = 8
                };
                info.HeaderSize = input.ReadUInt32();
                info.Width      = input.ReadUInt32();
                int height = input.ReadInt32();
                if (height < 0)
                {
                    height       = -height;
                    info.Flipped = true;
                }
                info.Height = (uint)height;
                input.ReadInt64();
                info.BitmapSize = input.ReadUInt32();
                return(info);
            }
        }
示例#3
0
文件: ImageDRG.cs 项目: Casidi/GARbro
 public override ImageMetaData ReadMetaData(Stream stream)
 {
     using (var input = new ArcView.Reader (stream))
     {
         input.ReadUInt32();
         var info = new GgdMetaData { BPP = 8 };
         info.HeaderSize = input.ReadUInt32();
         info.Width = input.ReadUInt32();
         int height = input.ReadInt32();
         if (height < 0)
         {
             height = -height;
             info.Flipped = true;
         }
         info.Height = (uint)height;
         input.ReadInt64();
         info.BitmapSize = input.ReadUInt32();
         return info;
     }
 }