Exemplo n.º 1
0
        public static AImageScheme GetScheme(string title)
        {
            AImageScheme scheme = null;

            if (string.IsNullOrEmpty(title) || !KnownSchemes.TryGetValue(title, out scheme))
            {
                return(null);
            }
            return(scheme);
        }
Exemplo n.º 2
0
        protected override IImageDecoder DecryptImage(IBinaryStream input, AImageScheme scheme)
        {
            int id = input.ReadByte();

            if (id == scheme.Value2)
            {
                return(new AImageReader(input, scheme));
            }
            input.Position = 0;
            return(new ImageFormatDecoder(input));
        }
Exemplo n.º 3
0
        protected virtual IImageDecoder DecryptImage(IBinaryStream input, AImageScheme scheme)
        {
            int type = input.ReadByte();

            if ('c' == type || 'b' == type)
            {
                uint img_size  = Binary.BigEndian(input.ReadUInt32());
                long start_pos = input.Length - img_size;
                input = BinaryStream.FromStream(new StreamRegion(input.AsStream, start_pos, img_size), input.Name);
            }
            else if (scheme != null && ('a' == type || 'd' == type) && input.Length > 21)
            {
                int id = input.ReadByte();
                if (id == scheme.Value2)
                {
                    return(new AImageReader(input, scheme, type));
                }
            }
            input.Position = 0;
            return(new ImageFormatDecoder(input));
        }
Exemplo n.º 4
0
 public BellArchive(ArcView arc, ArchiveFormat impl, ICollection <Entry> dir, AImageScheme scheme)
     : base(arc, impl, dir)
 {
     Scheme = scheme;
 }
Exemplo n.º 5
0
 public AImageReader(IBinaryStream input, AImageScheme scheme, int type = 'a')
 {
     m_input  = input;
     m_scheme = scheme;
     m_type   = type;
 }
Exemplo n.º 6
0
 public AImageReader(IBinaryStream input, AImageScheme scheme)
 {
     m_input  = input;
     m_scheme = scheme;
 }