顯示具有 去背 標籤的文章。 顯示所有文章
顯示具有 去背 標籤的文章。 顯示所有文章

2023年2月12日 星期日

[研究][WinForm][C#]把白底圖去背變成透明圖

[研究][WinForm][C#]把白底圖去背變成透明圖

2023-02-12

環境:Visual Studio 2022 + WinForm + C#

********************************************************************************

Form1.cs

using System.Drawing.Imaging;
using System.Windows.Forms;

namespace BgRemover
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.InitialDirectory = "c:\\";
            //openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
            //openFileDialog1.FilterIndex = 2;
            //openFileDialog1.RestoreDirectory = true;

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string filePath = openFileDialog1.FileName;
                Image image = System.Drawing.Image.FromFile(filePath);
                Bitmap pbitmap = new Bitmap(image);
                pbitmap.MakeTransparent(Color.White);
                pictureBox1.Image = pbitmap;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            //saveFileDialog1.Filter = "Png Image|*.png|JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif";
            saveFileDialog1.Filter = "Png Image|*.png";
            saveFileDialog1.Title = "Save an Image File";
            saveFileDialog1.ShowDialog();

            if (saveFileDialog1.FileName != "")
            {
                pictureBox1.Image.Save(saveFileDialog1.FileName, ImageFormat.Png);
            }
        }
    }
}

(完)

相關

2022年7月1日 星期五

[研究]PowerPoint 2019插入圖片、去背(透明圖)

[研究]PowerPoint 2019插入圖片去背(透明圖)

2022-07-01



********************************************************************************

另一個測試,PowerPoint 去背後形狀怪異

(左上角是小畫家用「色彩選擇器」(滴管),畫2條線,用「填入色彩」(傾倒水桶)畫的


********************************************************************************

免費去背景軟體:移除影像背景| Adobe Express
https://www.adobe.com/tw/express/feature/image/remove-background

和PowerPoint去背結果不同。



(完)


2022年3月4日 星期五

[研究]png圖片去背透明化

[研究]png圖片去背透明化

2022-03-04

找了幾個,有的線上軟體和Google找到的教學畫面不同,已經改版,不會操作;

下面這個是實際測試確實可用的、而且使用方便的。

將圖片背景色變為透明 | 可免費後製圖片的網站 PEKO STEP
https://www.peko-step.com/zhtw/tool/alphachannel.html

實際測試:線上去背,只能選一張,要手動選擇去背的顏色,下載存檔免費、免註冊。推薦。

********************************************************************************

免費去背景軟體:移除影像背景| Adobe Express
https://www.adobe.com/tw/express/feature/image/remove-background

實際測試:只能線上去背,但去背完成後,下載要註冊。

********************************************************************************

PicWish - 免費線上照片去背,線上移除浮水印,裁剪圖片,為您提供完全免費的圖片編輯工具
https://picwish.com/tw/

實際測試:線上去背只支援一張,下載時要有帳號,可使用Google, Facebook, Twitter帳號,或註冊PicWish帳號。

批次去背要下載Windows程式安裝,去背時要求註冊PicWish帳號,或使用Google, Facebook, Twitter帳號;批次去背完成後,下載時要求購買次數 (預設0次,1張都無法下載)

********************************************************************************

Pixlr Remove BG
https://pixlr.com/tw/remove-background/
支援批次去背功能

********************************************************************************

軟體名稱:AI BG Eraser 1.2.2.0 英文免費軟體

系統支援:Windows, macOS

AI BG Eraser Online

http://bgeraser.com/software.html

下載

https://123.briian.com/forum.php?mod=viewthread&tid=10346

線上去背網站網址:http://bgeraser.com/

支援格式:JPG, JPEG, PNG

檔案大小:2MB 以下,長寬小於 1200×1200

實際測試:免費版一次只能處理1張圖片,處理後要從線上下載;付費版才可以批次處理到30張。

********************************************************************************

Pixlr Remove BG
https://pixlr.com/tw/remove-background/
支援批次去背功能

實際測試:線上去背,選擇本機多檔案,實際上只會顯示一個,其他都不會顯示,Bug?

高階版本功能
https://pixlr.com/tw/pricing/

Pixlr 推出桌面版相片修圖軟體,支援 Windows、Mac 平台

作業系統:Windows、Mac

官方網站:https://pixlr.com/desktop

軟體下載:官方網站下載

https://pixlr.com/desktop

教學

https://free.com.tw/pixlr-desktop/

實際測試:它是從 Microsoft Apps Store 下載,敝人使用 Windows Server 2019,所以無法安裝

********************************************************************************

Favicon ICON (.ico) 圖標 也可以透明化 (去背)

(完)