sekihin
using System.Drawing;
using System.Drawing.Imaging;

class Program
{
  static void Main(string[] args)
  {
    // 画像を読み込む
    string baseFilePath = @"C:\bitmapBase.gif";
    Bitmap bmpBase = new Bitmap(baseFilePath);

    // 画像を切り抜く
    Rectangle rect = new Rectangle(2090450100);
    Bitmap bmpNew = bmpBase.Clone(rect, bmpBase.PixelFormat);

    // 画像をGIF形式で保存
    string newFilePath = @"C:\ bitmapNew.gif";
    bmpNew.Save(newFilePath, ImageFormat.Gif);

    // 画像リソースを解放
    bmpBase.Dispose();
    bmpNew.Dispose();
  }

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2021-11-29
  • 2021-07-06
  • 2021-11-11
  • 2022-12-23
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
相关资源
相似解决方案