Exemple #1
0
 public bool Open(Stream fs)
 {
     Graphics = MarshalUtil.ReadStruct<CGFX>(fs);
     GraphicsData = new byte[Graphics.DataBlob.Length - Marshal.SizeOf(Graphics.DataBlob)];
     fs.Read(GraphicsData, 0, GraphicsData.Length);
     var imagPos = fs.Position;
     GraphicsImage = MarshalUtil.ReadStruct<CGFXIMAG>(fs);
     fs.Seek(imagPos + GraphicsImage.Length, SeekOrigin.Begin);
     
     BannerImage = ImageUtil.ReadImageFromStream(fs, 256, 128, ImageUtil.PixelFormat.RGBA4);
     return true;
 }
Exemple #2
0
        public bool Open(Stream fs)
        {
            Graphics     = MarshalUtil.ReadStruct <CGFX>(fs);
            GraphicsData = new byte[Graphics.DataBlob.Length - Marshal.SizeOf(Graphics.DataBlob)];
            fs.Read(GraphicsData, 0, GraphicsData.Length);
            var imagPos = fs.Position;

            GraphicsImage = MarshalUtil.ReadStruct <CGFXIMAG>(fs);
            fs.Seek(imagPos + GraphicsImage.Length, SeekOrigin.Begin);

            BannerImage = ImageUtil.ReadImageFromStream(fs, 256, 128, ImageUtil.PixelFormat.RGBA4);
            return(true);
        }