Example #1
0
        public override ImageData Read(IBinaryStream file, ImageMetaData info)
        {
            var meta = (ExpMetaData)info;

            file.Position = 0x28;
            var reader   = new ExpReader(file, meta.BitmapFileName);
            var bmp_data = reader.Unpack(meta.BitmapSize);

            using (var mem_bmp = new BinMemoryStream(bmp_data, file.Name))
                return(Bmp.Read(mem_bmp, info));
        }
Example #2
0
        }                                                                 // 'PXEN'

        public override ImageMetaData ReadMetaData(IBinaryStream file)
        {
            file.Position = 4;
            var filename    = file.ReadBytes(0x20);
            int bitmap_size = file.ReadInt32();
            var reader      = new ExpReader(file, filename);
            var bmp_header  = reader.Unpack(0x36);

            using (var mem_bmp = new BinMemoryStream(bmp_header, file.Name))
            {
                var info = Bmp.ReadMetaData(mem_bmp);
                if (null == info)
                {
                    return(null);
                }
                return(new ExpMetaData {
                    Width = info.Width,
                    Height = info.Height,
                    BPP = info.BPP,
                    BitmapSize = bitmap_size,
                    BitmapFileName = filename,
                });
            }
        }