Exemplo n.º 1
0
        }                                                                 // 'ARGB'

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

            if (!header.AsciiEqual("ARGBSaveData1\0") || header[0x10] != 3)
            {
                return(null);
            }
            const uint image_offset = 0x19;
            uint       image_size   = header.ToUInt32(0x11);
            uint       mask_size    = header.ToUInt32(0x15);

            using (var jpeg = OpenStreamRegion(file, image_offset, image_size))
            {
                var info = Jpeg.ReadMetaData(jpeg);
                if (null == info)
                {
                    return(null);
                }
                return(new ArgbMetaData {
                    Width = info.Width,
                    Height = info.Height,
                    BPP = 32,
                    ImageOffset = image_offset,
                    ImageLength = image_size,
                    MaskLength = mask_size,
                });
            }
        }
Exemplo n.º 2
0
 public override ImageMetaData ReadMetaData(IBinaryStream file)
 {
     if ((file.Signature & 0xFFFFFF) != 0xFDFF00)
     {
         return(null);
     }
     using (var jpeg = OpenAsJpeg(file))
         return(Jpeg.ReadMetaData(jpeg));
 }
Exemplo n.º 3
0
        public override ImageMetaData ReadMetaData(IBinaryStream stream)
        {
            var header = stream.ReadHeader(2);

            if (header[0] != 0 || header[1] != 0x93)
            {
                return(null);
            }
            using (var jpg = OpenEncrypted(stream))
                return(Jpeg.ReadMetaData(jpg));
        }
Exemplo n.º 4
0
        public override ImageMetaData ReadMetaData(IBinaryStream file)
        {
            int type = file.ReadByte();

            if (type != 3)
            {
                return(null);
            }
            uint width  = file.ReadUInt16();
            uint height = file.ReadUInt16();

            if (0 == width || width > 0x8000 || 0 == height || height > 0x8000)
            {
                return(null);
            }
            using (var jpeg = OpenJpegStream(file))
                return(Jpeg.ReadMetaData(jpeg));
        }
Exemplo n.º 5
0
 public override ImageMetaData ReadMetaData(IBinaryStream stream)
 {
     using (var input = OpenEncrypted(stream, true))
         return(Jpeg.ReadMetaData(input));
 }