
.NET ez 2012-06-20
首先下載 FreeImage:
本地下載:FreeImage
官方下載:http://freeimage.sourceforge.net/
將 FreeImageNET.dll 加入參考,即可開始利用 FreeImage 讀寫圖檔。
//讀出PCX圖檔到Image FREE_IMAGE_FORMAT FIF = FREE_IMAGE_FORMAT.FIF_PCX; Image IMG = FreeImage.LoadBitmap("檔案路徑", FREE_IMAGE_LOAD_FLAGS.DEFAULT, ref FIF); //讀出BMP圖檔到Image FREE_IMAGE_FORMAT FIF = FREE_IMAGE_FORMAT.FIF_BMP; Image IMG = FreeImage.LoadBitmap("檔案路徑", FREE_IMAGE_LOAD_FLAGS.DEFAULT, ref FIF);
官方有提供 Sample 喔,自己研究吧!
標籤: .NET