示例#1
0
        public override IImageDecoder OpenImage(ArcFile arc, Entry entry)
        {
            var input = arc.File.CreateStream(entry.Offset, entry.Size);
            var info  = CgdMetaData.FromStream(input, 0);

            input.Position = 0;
            if (null == info)
            {
                return(ImageFormatDecoder.Create(input));
            }
            return(new CgdDecoder(input, info));
        }
示例#2
0
        }                                                                 // 'ktool210'

        public override ImageMetaData ReadMetaData(IBinaryStream file)
        {
            var header = file.ReadHeader(0x18);

            if (!header.AsciiEqual("ktool210") || header.ToInt32(8) != 1)
            {
                return(null);
            }
            uint offset = header.ToUInt32(0x10) & 0x7FFFFFFF;

            return(CgdMetaData.FromStream(file, offset));
        }
示例#3
0
 public CgdDecoder(IBinaryStream input, CgdMetaData info) : base(input, info)
 {
 }