mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-26 05:37:56 +08:00
(IImageDecoder): new interface.
This commit is contained in:
@@ -197,6 +197,15 @@ namespace GameRes
|
||||
return arc.File.CreateStream (entry.Offset, entry.Size, entry.Name);
|
||||
}
|
||||
|
||||
/// <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 new ImageStreamDecoder (input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create file corresponding to <paramref name="entry"/> in current directory and open it
|
||||
/// for writing. Overwrites existing file, if any.
|
||||
|
||||
Reference in New Issue
Block a user