0
我的加載RAW圖像的函數有問題。我不明白錯誤的原因。它顯示了我這個錯誤:不能隱式地將類型'int'轉換爲LittleEndian ByteOrder
Cannot implicitly convert type 'int' to 'Digital_Native_Image.DNI_Image.Byteorder'
public void load_DNI(string ficsrc)
{
FileStream FS = null;
BinaryReader BR = null;
int width = 0;
int height = 0;
DNI_Image.Datatype dataformat = Datatype.SNG;
DNI_Image.Byteorder byteformat = Byteorder.LittleEndian;
FS = new FileStream(ficsrc, System.IO.FileMode.Open);
BR = new BinaryReader(FS);
dataformat = BR.ReadInt32();
byteformat = BR.ReadInt32();
width = BR.ReadInt32();
height = BR.ReadInt32();
// fermeture des fichiers
if ((BR != null))
BR.Close();
if ((FS != null))
FS.Dispose();
// chargement de l'_image
ReadImage(ficsrc, width, height, dataformat, byteformat);
}