看板 C_Sharp 關於我們 聯絡資訊
各位好 我想寫一個簡單的讀圖工具 將 Bitmap 檔讀入 然後可以放大~ 剪下需要的區域另存成新檔 但是在放大的階段就失敗了 主要是放大之後圖檔會變得模糊不清 而不是清楚的每個 pixel 我認為應該是我的方法不對 請了解的大大多多指教 以下是我的方法 //將要讀的檔案讀入 PictureBox 中 private void buttonBrowse_Click(object sender, EventArgs e) { if (DialogResult.OK == this.openFileDialogBmpLocation.ShowDialog()) { this.pictureBoxBitmap.ImageLocation = this.openFileDialogBmpLocation.FileName; } } //處理 Zoom In botton 的 Handler private void buttonZoomOut_Click(object sender, EventArgs e) { // 目前是直接放大一倍 this.pictureBoxBitmap.Width *= 2; this.pictureBoxBitmap.Height *= 2; this.pictureBoxBitmap.SizeMode = PictureBoxSizeMode.StretchImage; } 放大後的 PictureBox 中的圖~ 邊緣會有模糊的狀況 請問 是我的方法錯誤嗎? 應該怎麼實做? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.30.60
kiroru:搜尋nearest neighbor interpolation看看..或是bilinear 10/26 23:38