Example #1
0
 private void SplatFilm(IFilmFrame frame, int curY = -1)
 {
     var bmpWidth = frame.Width;
     var bmpHeight = (curY > 0 ? curY : frame.Height);
     for (int i = 0; i < bmpHeight; i++)
     {
         for (int j = 0; j < bmpWidth; j++)
         {
             var pixOffset = frame.Width * ((bmpHeight - i - 1)) + j;
             var color = ((frame.Data[pixOffset] / frame.Weight[pixOffset])).Transform();
             this.imagePlane.Data[pixOffset] = color;
         }
     }
 }
Example #2
0
 public RenderJobResult(IFilmFrame frame, int percentage,IRenderJob job) {
     this.Image = frame;
     this.JobLeftPercentage = percentage;
     this.JobId = job.Id;
     this.PathToFile = job.OutputSettings.FilePath;
 }
Example #3
0
 private void PreviewSplatFilm(IFilmFrame frame, int curY = -1, int pixelsInPreview = 10000)
 {
     var bmpWidth = frame.Width;
     var bmpHeight = (curY > 0 ? curY : frame.Height);
     var rnd = new FastRandom();
     RgbSpectrum.Gamma = true;
     for (int n = 0; n < pixelsInPreview; n++)
     //for (int i = 0; i < bmpHeight; i++)
     {
         //for (int j = 0; j < bmpWidth; j++)
         {
             var i = rnd.Next(0, bmpHeight);
             var j = rnd.Next(0, bmpWidth);
             var pixOffset = frame.Width * ((bmpHeight - i - 1)) + j;
             var color = ((frame.Data[pixOffset] / frame.Weight[pixOffset])).Transform();
             this.imagePlane.Data[pixOffset] = color;
         }
     }
 }