コード例 #1
0
 public bool Open(Stream fs)
 {
     StartOffset = fs.Position;
     Header      = MarshalUtil.ReadStruct <ICNHeader>(fs);    //read header
     fs.Seek(StartOffset + 0x2000, SeekOrigin.Begin);         //Jump to the icons
     DataHeader = MarshalUtil.ReadStruct <ICNDataHeader>(fs); //read data header
     //fs.Seek(0x40, SeekOrigin.Current); //skip header
     SmallIcon = ImageUtil.ReadImageFromStream(fs, 24, 24, ImageUtil.PixelFormat.RGB565);
     LargeIcon = ImageUtil.ReadImageFromStream(fs, 48, 48, ImageUtil.PixelFormat.RGB565);
     return(true);
 }
コード例 #2
0
ファイル: mdlICN.cs プロジェクト: dr1s/rom_tool
 public bool Open(Stream fs)
 {
     StartOffset = fs.Position;
     Header = MarshalUtil.ReadStruct<ICNHeader>(fs); //read header
     fs.Seek(StartOffset + 0x2000, SeekOrigin.Begin); //Jump to the icons
     DataHeader = MarshalUtil.ReadStruct<ICNDataHeader>(fs); //read data header
     //fs.Seek(0x40, SeekOrigin.Current); //skip header
     SmallIcon = ImageUtil.ReadImageFromStream(fs, 24, 24, ImageUtil.PixelFormat.RGB565);
     LargeIcon = ImageUtil.ReadImageFromStream(fs, 48, 48, ImageUtil.PixelFormat.RGB565);
     return true;
 }