[.NET] 有關非bitmap圖轉存bitmap問題
以下有個問題想要請教版上諸位
小弟正在做用vb撰寫讀取繪製autocad裡頭dxf檔的程式
在重新繪圖後想要把他存成bitmap檔
所以放了一個button 程式段如下
Dim bmp As New Bitmap(PictureBox1.Image)
Dim bmp1 As Bitmap
Dim rect As New Rectangle(0, 0, 653, 654)
bmp1 = bmp.Clone(rect, bmp.PixelFormat)
bmp1.Save("C:\text.jpg")
bmp.Dispose()
但是在執行後都會出現 「並未將物件參考設定為物件的執行個體」
指出是在第一行 As New Bitmap的部份
請問可能是遇到什麼問題了嘛?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.121.150.18