mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
call overloaded Image.Read method.
This commit is contained in:
parent
097672845d
commit
78bd4f954d
@ -199,7 +199,7 @@ namespace GARbro.GUI
|
|||||||
string target_name = Path.ChangeExtension (filename, target_ext);
|
string target_name = Path.ChangeExtension (filename, target_ext);
|
||||||
using (var file = File.OpenRead (filename))
|
using (var file = File.OpenRead (filename))
|
||||||
{
|
{
|
||||||
var image = ImageFormat.Read (file);
|
var image = ImageFormat.Read (filename, file);
|
||||||
if (null == image)
|
if (null == image)
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
|
@ -294,7 +294,7 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
using (var file = arc.OpenSeekableEntry (entry))
|
using (var file = arc.OpenSeekableEntry (entry))
|
||||||
{
|
{
|
||||||
var src_format = ImageFormat.FindFormat (file);
|
var src_format = ImageFormat.FindFormat (file, entry.Name);
|
||||||
if (null == src_format)
|
if (null == src_format)
|
||||||
throw new InvalidFormatException (string.Format ("{1}: {0}", guiStrings.MsgUnableInterpretImage, entry.Name));
|
throw new InvalidFormatException (string.Format ("{1}: {0}", guiStrings.MsgUnableInterpretImage, entry.Name));
|
||||||
file.Position = 0;
|
file.Position = 0;
|
||||||
|
@ -243,7 +243,7 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
using (var file = OpenPreviewStream (preview))
|
using (var file = OpenPreviewStream (preview))
|
||||||
{
|
{
|
||||||
var data = ImageFormat.Read (file);
|
var data = ImageFormat.Read (preview.Name, file);
|
||||||
if (null != data)
|
if (null != data)
|
||||||
SetPreviewImage (preview, data.Bitmap);
|
SetPreviewImage (preview, data.Bitmap);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user