ReduceColourDepth() public method

public ReduceColourDepth ( object o, BackgroundWorker w, DoWorkEventArgs e ) : object
o object
w System.ComponentModel.BackgroundWorker
e System.ComponentModel.DoWorkEventArgs
return object
Ejemplo n.º 1
0
        public void RecolourImage(bool startAgain)
        {
            this.Cursor = Cursors.WaitCursor;
            ImagingTool tool;

            if (mRecolouredImage == null || startAgain)
            {
                CreateNewColourMap();
                tool = new ImagingTool(mResizedImage, ColourMap);
                //tool.ReduceColourDepth();
                tool.ReduceColourDepth(ColourMap);
                mRecolouredImage = tool.OutputImage;
            }
            else
            {
                tool = new ImagingTool(mRecolouredImage, ColourMap);
                tool.ReduceColourDepth((int)maxColoursUpDown.Value);
                mRecolouredImage = tool.OutputImage;
            }
            //UpdateColourMap();
            this.Cursor = Cursors.Default;
            RedrawTab2Images();
        }
Ejemplo n.º 2
0
 public void RecolourImage(bool startAgain)
 {
     this.Cursor = Cursors.WaitCursor;
     ImagingTool tool;
     if (mRecolouredImage == null || startAgain)
     {
         CreateNewColourMap();
         tool = new ImagingTool(mResizedImage, ColourMap);
         //tool.ReduceColourDepth();
         tool.ReduceColourDepth(ColourMap);
         mRecolouredImage = tool.OutputImage;
     }
     else
     {
         tool = new ImagingTool(mRecolouredImage, ColourMap);
         tool.ReduceColourDepth((int)maxColoursUpDown.Value);
         mRecolouredImage = tool.OutputImage;
     }
     //UpdateColourMap();
     this.Cursor = Cursors.Default;
     RedrawTab2Images();
 }