• 大小: 7.56MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-17
  • 语言: C#
  • 标签: 图像处理  

资源简介

图像处理软件源码(C#),完整的图像处理系统,供参考

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;

namespace PhotoSprite
{
  /// 
  /// 图像处理历史记录
  /// 

  public class HistoryImage
  {
    private int current = -1;
    private string [] History;
    private string initDirectory = ““;
    private int max = 0;
    private int count = 0;
    private int save = -1;

    /// 
    /// 获取或设置初始化文件目录
    /// 

    public string InitDirectory
    {
      get
      {
        return initDirectory;
      }
      set
      {
        initDirectory = value;
      }
    }

    /// 
    /// 获取 bool 值,指示是否可以撤消
    /// 

    public bool CanUndo
    {
      get
      {
        if (current > 0)
          return true;
        else
          return false;
      }
    }

    /// 
    /// 获取 bool 值,指示是否可以重复
    /// 

    public bool CanRedo
    {
      get
      {
        if (current < count - 1 && count != 0)
          return true;
        else
          return false;
      }
    }

    /// 
    /// 获取 bool 值,指示图像是否已经修改过
    /// 

    public bool IsDirty
    {
      get
      {
        if (current != save)
          return true;
        else
          return false;
      }
    }

    /// 
    /// 获取最大历史记录数
    /// 

    public int Max
    {
      get
      {
        return max;
      }
    }

    /// 
    /// 获取当前已记录的最大历史记录数
    /// 

    public int Count
    {
      get
      {
        return count;
      }
    }

    /// 
    /// 获取或设置当前图像文件
    /// 

    public int Current
    {
      get
      {
        return current;
      }
      set
      {
        current = value;

        // 队列循环
        if (current < 0)
        {
          if (count < max)
            current = 0;
          else
            current = max - 1;
        }
        else if (current >= max)
        {
          current = 0;
          count = max;
        }

        if (current >= count)
          count = current + 1;

        OnHistoryChanged();
      }
    }

    /// 
    /// 获取当前图像文件名
    /// 

    public string CurrentImage
    {
      get
      {
        if (current >= 0)
          return History[current];
        else
          return ““;
      }
    }

    /// 
    /// 获取下一个图像文件名
    /// 

    public string NextImage
    {
      get
      {
        int next = (current + 1) % max;
        return History[next];
      }
    }

    /// 
    /// 建立历史记录类
    /// 

    /// 初始化文件目录
    /// 统计次数
    public HistoryImage(string initDirectory int max)
    {
      this.initDirectory = initDirectory;
      this.max = max;

      History = new string[max];

      for (int i = 0; i < max; i++)
      {
        History

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         54  2006-03-29 03:01  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-1.ACF

     文件         54  2006-03-29 03:01  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-2.ACF

     文件         54  2006-03-29 03:02  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-3.ACF

     文件         54  2006-03-29 03:02  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-4.ACF

     文件         54  2006-03-29 03:02  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-5.ACF

     文件         54  2006-03-29 03:02  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-6.ACF

     文件         54  2006-03-29 03:02  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-7.ACF

     文件         54  2006-03-29 03:02  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Kirsch-8.ACF

     文件         54  2006-03-29 03:00  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Prewitt-1.ACF

     文件         54  2006-03-29 03:00  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Prewitt-2.ACF

     文件         54  2006-03-29 02:59  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Prewitt-3.ACF

     文件         54  2006-03-29 03:00  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Prewitt-4.ACF

     文件         54  2006-03-08 08:33  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Sobel-1.ACF

     文件         54  2006-03-08 08:34  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Sobel-2.ACF

     文件         54  2006-03-29 02:57  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Sobel-3.ACF

     文件         54  2006-03-29 02:58  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\Sobel-4.ACF

     文件         54  2006-01-06 17:44  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-1 Smooth.ACF

     文件         54  2006-02-16 05:28  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-10 EdgeDetectHorizontal.ACF

     文件         54  2006-01-10 14:07  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-11 EdgeDetectVertical.ACF

     文件         54  2006-01-07 09:37  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-12 Emboss.ACF

     文件         54  2006-02-16 03:16  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-13.ACF

     文件         54  2006-02-16 17:17  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-14.ACF

     文件         54  2006-02-16 03:25  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-15.ACF

     文件         54  2006-03-29 03:04  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-16.ACF

     文件         54  2006-03-29 03:04  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-17.ACF

     文件         54  2006-03-29 03:04  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-18.ACF

     文件         54  2006-03-29 03:04  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-19.ACF

     文件         54  2006-03-29 02:46  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-2.ACF

     文件         54  2006-03-29 03:05  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-20.ACF

     文件         54  2006-03-29 03:05  txbcPS\PhotoSprite_Demo_3.0.0.0\Filter\T-21.ACF

............此处省略580个文件信息

评论

共有 条评论