public void WriteTooManyPixels()
 {
     try {
         WritableImage image = new WritableImage(gisImagePath);
         OutputRaster <Erdas74Pixel8> raster = new OutputRaster <Erdas74Pixel8>(image);
         using (raster) {
             Erdas74Pixel8 pixel8    = new Erdas74Pixel8();
             int           totPixels = raster.Dimensions.Rows * raster.Dimensions.Columns;
             for (int i = 0; i < totPixels; i++)
             {
                 raster.WritePixel(pixel8);
             }
             // write one too many
             raster.WritePixel(pixel8);
         }
     }
     catch (System.Exception exc) {
         Data.Output.WriteLine(exc.Message);
         throw;
     }
 }
        public void WritePixels()
        {
            WritableImage image = new WritableImage(gisImagePath);
            OutputRaster <Erdas74Pixel8> raster = new OutputRaster <Erdas74Pixel8>(image);
            Erdas74Pixel8 pixel8    = new Erdas74Pixel8();
            int           totPixels = raster.Dimensions.Rows * raster.Dimensions.Columns;

            for (int i = 0; i < totPixels; i++)
            {
                raster.WritePixel(pixel8);
            }
            raster.Close();
        }