1
我有一個用戶上傳圖片的圖庫頁面。我注意到有一個特定的用戶上傳了3張tiff圖片,並且他們無法訪問。從tiff圖像創建位圖對象
Exception type: System.ArgumentException
Exception message: Parameter is not valid.
它發生在這裏:
using (Image photo = new Bitmap(new MemoryStream(photoData)))
文件似乎是確定,SICE File.ReadAllBytes()的作品,我可以用其他方法進行下載(一個不工作用於返回一個調整圖像),在本地測試並且不拋出異常。任何想法可能是這種情況?不幸的是,我不知道這是否也會出現在其他用戶上傳的所有tiff圖片上。
我使用專用於tiff圖像的[this](http://bitmiracle.com/libtiff/help/convert-color-tiff-to-a-32-bit-system.drawing.bitmap.aspx)方法,它似乎正在工作(生產運行在Windows服務器2K8,我的工作站在WIN7上,所以可能是這個問題),非常感謝! – matt137