<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Magick.NET圖像操作庫(kù)

          聯(lián)合創(chuàng)作 · 2023-09-29 17:09

          ImageMagick 是一個(gè)很強(qiáng)大的圖像操作庫(kù),支持超過(guò) 100 種的文件格式。而 Magick.NET 可以讓你在 .NET 環(huán)境中使用 ImageMagick ,而無(wú)需在系統(tǒng)中單獨(dú)安裝 ImageMagick。

          示例代碼:

          // Read first frame of gif image
          using (MagickImage image = new MagickImage("Snakeware.gif"))
          {
            // Save frame as jpg
            image.Write("Snakeware.jpg");
          }
          
          // Write to stream
          MagickReadSettings settings = new MagickReadSettings();
          // Tells the xc: reader the image to create should be 800x600
          settings.Width = 800;
          settings.Height = 600;
          
          using (MemoryStream memStream = new MemoryStream())
          {
            // Create image that is completely purple and 800x600
            using (MagickImage image = new MagickImage("xc:purple", settings))
            {
              // Sets the output format to png
              image.Format = MagickFormat.Png;
              // Write the image to the memorystream
              image.Write(memStream);
            }
          }
          
          // Read image from file
          using (MagickImage image = new MagickImage("Snakeware.png"))
          {
            // Sets the output format to jpeg
            image.Format = MagickFormat.Jpeg;
            // Create byte array that contains a jpeg file
            byte[] data = image.ToByteArray();
          }

          軟件要求:

          Visual C++ Redistributable for Visual Studio

          • .NET 4.0: Visual C++ Redistributable for Visual Studio 2012 (x86 or x64)

          • .NET 2.0: Visual C++ Redistributable for Visual Studio 2008 (x86 orx64)

          瀏覽 25
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  亚洲一级电影片 | 成人无码AV高潮大毛片 | 丁香乱伦 | 成人a片黄色免费电影 | 爱爱视频欧美 |