public static IImageDecoder OpenImage(Entry entry)
        {
            var fs     = m_vfs.Top;
            var arc_fs = fs as ArchiveFileSystem;

            if (arc_fs != null)
            {
                return(arc_fs.Source.OpenImage(entry));
            }

            var input = fs.OpenBinaryStream(entry);

            return(ImageFormatDecoder.Create(input));
        }
Exemple #2
0
        /// <summary>
        /// Open <paramref name="entry"> as image. Throws InvalidFormatException if entry is not an image.
        /// </summary>
        public virtual IImageDecoder OpenImage(ArcFile arc, Entry entry)
        {
            var input = arc.OpenBinaryEntry(entry);

            return(ImageFormatDecoder.Create(input));
        }